mattmcspirit / azurestack

Azure Stack Resources
80 stars 41 forks source link

Ubuntu Image Uploading failed #50

Closed xkhahuss closed 5 years ago

xkhahuss commented 6 years ago

VERBOSE: [3:20 PM]::[UBUNTUIMAGE]:: Uploading image failed.Exception.Message

mattmcspirit commented 6 years ago

Sorry, but I'll need more information than that.

Please review the log file, and provide more information about the exception message.

Thanks, Matt

xkhahuss commented 6 years ago

VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: Upload failed. VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: This operation is not supported for a relative URI..Exception.Message VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: No existing image found. Upload Attempt: 2 VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: Upload failed. VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: This operation is not supported for a relative URI..Exception.Message VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: No existing image found. Upload Attempt: 3 VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: Upload failed. VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: This operation is not supported for a relative URI..Exception.Message VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: Uploading VHD to Azure Stack storage failed and 3 upload attempts. Rerun the ConfigASDK.ps1 script to retry. VERBOSE: [8:53 AM]::[UBUNTUIMAGE]:: ASDK Configuration Stage: UbuntuImage Failed

Stage Status


ExtractZip Skipped
InstallPowerShell Complete
DownloadTools Complete
HostConfiguration Complete
Registration Skipped
UbuntuImage Failed
WindowsImage Incomplete MySQLGalleryItem Incomplete SQLServerGalleryItem Incomplete VMExtensions Incomplete MySQLRP Incomplete SQLServerRP Incomplete MySQLSKUQuota Incomplete SQLServerSKUQuota Incomplete UploadScripts Incomplete MySQLDBVM Incomplete SQLServerDBVM Incomplete MySQLAddHosting Incomplete SQLServerAddHosting Incomplete AppServiceFileServer Incomplete AppServiceSQLServer Incomplete DownloadAppService Incomplete GenerateAppServiceCerts Incomplete CreateServicePrincipal Incomplete GrantAzureADAppPermissions Incomplete InstallAppService Incomplete RegisterNewRPs Incomplete CreatePlansOffers Incomplete InstallHostApps Incomplete CreateOutput Incomplete

BR, Hussain

mattmcspirit commented 6 years ago

Did you install the Azure Stack PowerShell modules and AzureRMProfile before running my script? The error suggests to me that may be true.

xkhahuss commented 6 years ago

Yes, I installed already, but one time running this configuration script, all PowerShell modules uninstalled. I rerun it but no luck.

mattmcspirit commented 6 years ago

My 1808.1 version of the script does some basic cleanup and before we released the newer hybrid AzureRM profile. The cleanup doesn't remove this, and there is potential for conflict.

I would clean up the system fully:

https://github.com/mattmcspirit/azurestack/issues/45#issuecomment-426355082

Then re-download the 1808.1 script (i made some fixes last night) and retry.

Thanks, Matt

xkhahuss commented 6 years ago

Matt, Its same problem

VERBOSE: Preparing to expand... VERBOSE: Created 'D:\ASDKfiles\ASDK\images\xenial-server-cloudimg-amd64-disk1.vhd'. VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: Extraction Complete. Beginning upload of VHD to Platform Image Repository https://asdkimagesstor.blob.local.azurestack.external/ VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: No existing image found. Upload Attempt: 1 VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: Upload failed. VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: This operation is not supported for a relative URI..Exception.Message VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: No existing image found. Upload Attempt: 2 VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: Upload failed. VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: This operation is not supported for a relative URI..Exception.Message VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: No existing image found. Upload Attempt: 3 VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: Upload failed. VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: This operation is not supported for a relative URI..Exception.Message VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: Uploading VHD to Azure Stack storage failed and 3 upload attempts. Rerun the ConfigASDK.ps1 script to retry. VERBOSE: [10:48 AM]::[UBUNTUIMAGE]:: ASDK Configuration Stage: UbuntuImage Failed

I did all process with 1808.1

but no luck.

do I need to redeploy whole ASDK again ?

mattmcspirit commented 6 years ago

The problem, I think, is on lines 1468-1470 in the ConfigASDK.ps1 file.

# Upload VHD to Storage Account
$asdkStorageAccount.PrimaryEndpoints.Blob
$ubuntuServerURI = '{0}{1}/{2}' -f $asdkStorageAccount.PrimaryEndpoints.Blob.AbsoluteUri, $asdkImagesContainerName, $UbuntuServerVHD.Name

The .AbsoluteUri works fine when PowerShell 1.4.0 and AzureRMProfile 2017-X-X is installed, but fails when you're using the new Hybrid profile and 1.5.0. I'm very confident this is your issue, even though you say they've been cleaned, i suspect there's something left behind. This has been all fixed in my new version of the ConfigASDK however I wouldn't run the new version on a system where you have already run the old one - the results may be unpredictable.

What are the results of the following?

Get-AzureRmProfile

Get-Module -Name Azs.* -ListAvailable
Get-Module -Name AzureStack -ListAvailable
Get-Module -Name AzureRM.* -ListAvailable

Thanks, Matt

mattmcspirit commented 5 years ago

Closing this one out - let me know if you’re still having an issue.