使用上载的vhd创建图像时找不到资源 [英] Resource was not found when creating images using uploaded vhd

查看:53
本文介绍了使用上载的vhd创建图像时找不到资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我一直在尝试使用上传的CentOS vhd在azure中创建CentOS映像.但是,它向我显示未找到该资源,它可能已被删除".当我尝试创建它时.

Hi, i been trying to create a CentOS image in azure using uploaded CentOS vhd. However, it shows me that "This resource was not found, it may have been deleted." when i tried to create it. 

我遵循了https://docs.microsoft.com/zh-cn/azure/virtual-machines/linux/create-upload-centos中提到的过程,并且vhd已成功上传到存储blob.我可以知道是什么原因造成的吗?

i followed the procedure mentioned in https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-centos and the vhd was uploaded successfully to the storage blob. May i know what is the problem causing this?

推荐答案

在门户中,转到将VHD上传到的位置.确保有VHD.

当您单击容器中的VHD时,您将看到一个源URL.确保它与您在create命令中提供的URL相同

az磁盘创建\\
--resource-group  myResourceGroup \
--name  myManagedDisk \
-源https://mystorageaccount.blob.core.windows.net/mydisks/myDisk.vhd

如果一切正确,请关闭您的PowerShell实例,然后再次登录.

Login-AzureRMAccount

运行Get-AzureRMSubscription以查看您有权访问的所有订阅的列表.然后跑

Select-AzureRMSubscription -SubscriptionID SUBID

这将确保您选择了正确的订阅.再次尝试创建命令. 


In the portal, go to the location you uploaded the VHD to. Ensure that the VHD is there. 

When you click on the VHD in the container you will see a source URL. Make sure it is the same URL you are providing in the create command

az disk create \
--resource-group  myResourceGroup \
--name  myManagedDisk \
--source https://mystorageaccount.blob.core.windows.net/mydisks/myDisk.vhd

If that is all correct, close your PowerShell instance and login again. 

Login-AzureRMAccount

Run Get-AzureRMSubscription to see a list of all subscriptions you have access to. Then run

Select-AzureRMSubscription -SubscriptionID SUBID

This will make sure you have the selected the correct subscription. Try the create command again. 



这篇关于使用上载的vhd创建图像时找不到资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆