我正在尝试应该是一项非常基本的任务。我创建了一个工作站模板的本地 VHD,我想上传它以在我的 Azure 环境中使用。我正在使用 Azure Powershell。
我已上传 .cer 文件以创建管理证书。我已导入 .publishsettings 文件,并且可以使用 Set-AzureSubscription 和 Select-AzureSubscription 没有明显问题:
Set-AzureSubscription -SubscriptionName "Windows Azure Enterprise" -CurrentStorageAccount ATOQA
Select-AzureSubscription -SubscriptionName "Windows Azure Enterprise"
当我尝试使用 Add-AzureVHD 时遇到的问题是:
PS C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10\bin> add-azurevhd -destination "https://ATOQA.blob.core.windows.net/vhds/ztemplate-W7.vhd" -localfilepath "C:\VM\W7_Template\ztemplate-w7.vhd"
add-azurevhd : "An exception occurred when calling the ServiceManagement API. HTTP Status Code: 404. Service Management Error Code: ResourceNotFound. Message: The requested storage account
'atoqa' was not found.. Operation Tracking ID: df91c24901254047b39a7a7d5b037ea0."
At line:1 char:1
+ add-azurevhd -destination "https://ATOQA.blob.core.windows.net/vhds/ztemplate-W7 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Add-AzureVhd], ServiceManagementClientException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.StorageServices.AddAzureVhdCommand
我相当确定我用来指定 -destination 的信息是正确的,因为我直接从 Azure 站点上的容器 URL 字段复制了它。
我哪里错了?我一直在使用一些网站作为指南,让您了解我的工作内容:
http://www.cloudtec.ch/blog/tech/upload-vhd-to-azure.html
http://msdn.microsoft.com/en-us/library/windowsazure/dn205185.aspx
我还尝试使用具有相同基本步骤的 CSUPLOAD 并收到一条消息,指出“未找到存储帐户”,这让我相信我正在用错误的信息填充参数,但我真的很困惑什么我的错误正是。
非常非常感谢提前!