Fer*_*eia 153 vhd azure azure-storage
我正在使用Windows Azure持久虚拟机.最后,我删除了虚拟机(成功)并尝试删除关联的存储帐户.
删除存储帐户的请求失败.
在删除存储帐户时,在预览门户(manage.windowsazure.com)上出现此错误:
Failed to delete Storage account 'portalvhdscwtwycpsxxxxx'
Details:
Storage account portalvhdscwtwycpsxxxxx has 1 container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.
Run Code Online (Sandbox Code Playgroud)
在以前的门户网站(windows.azure.com)上,我收到此错误:
Submit Failed
Storage account portalvhdscwtwycpsxxxxx has 1 container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.
Run Code Online (Sandbox Code Playgroud)
尝试在Azure存储资源管理器上删除blob本身(30GB VHD)我收到此错误:
There is currently a lease on the blob and no lease ID was specified in the request.
Run Code Online (Sandbox Code Playgroud)
所以我的评估是这个blob是租用的(由之前的,现在删除的虚拟机),我不能删除它,除非我可以得到这个租约ID.
问题是:如何删除此Blob,从而删除存储帐户?
Fer*_*eia 330
解决方案的关键是容器具有活动磁盘工件的消息以及从存储库中删除它的建议.
从blob存储库中删除磁盘映像的过程是:
之后,可以删除存储帐户.
笔记:
另请参阅:无法删除VHD,"blob上目前有租约......"
dim*_*mid 16
不幸的是,阿隆索的回答并没有为我工作,因为存储是"孤儿",因为我删除存储之前删除其虚拟机.我找不到从门户网站上执行此操作的方法,因此我安装了azure-cli,并在身份验证后运行以下命令:
azure storage account delete <my-account>
Run Code Online (Sandbox Code Playgroud)
这失败了,错误消息包含罪魁祸首的名字,例如:
error: Storage account <my-account> has some active image(s) and/or disk(s), e.g. <my-image>. Ensure these image(s) and/or disk(s) are removed before deleting this storage
然后我删除了有问题的图像
azure vm disk delete <my-image>
并再次尝试删除存储,这次成功.
azure storage account delete <my-account>
小智 12
不幸的是,有些虚拟机被删除但是磁盘显示连接到blob的VM(30GB VHD),导致删除.此外,还有一种情况是使用Azure存储资源管理器,您可以找到无法删除的orfan但租用的VHD blob,并且预览门户上没有引用.
小智 5
在我的情况下,由于vmimages,无法删除存储.
使用power shell命令
get-azurevmimage | Where-Object -Property Category -in -Value"user"
列出所有图像要删除所有图像,请使用以下脚本:
get-azurevmimage | Where-Object -Property Category -in -Value "user" |
foreach {
echo "remove $($_.ImageName)"
Remove-AzureVMImage –ImageName $($_.ImageName)
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
46211 次 |
最近记录: |