在Azure管理控制台中的“虚拟机”下;磁盘,我看到2个磁盘都说它们连接到虚拟机。但是,这些虚拟机已被删除。此外,磁盘blob vhds已被删除。所以现在我留下了2个无法移除的鬼盘。我不确定留下这些是什么影响,我想删除它们。当我尝试使用remove-azuredisk删除它们时,我收到错误。我知道人们已经引用的BreakLease.ps1脚本来破坏VHD上的租约以删除VHD,但在我的情况下没有VHD。 BreakLease.ps1脚本似乎只接受URI作为参数,但我没有URI,因为它不是VHD / blob。
有没有人对如何摆脱这些孤立的磁盘对象有任何想法?
谢谢!
PS C:\> get-azuredisk | where-object {$_.diskname -like "*memb*"} | select diskname
VERBOSE: 2:35:33 PM - Begin Operation: Get-AzureDisk
VERBOSE: 2:35:34 PM - Completed Operation: Get-AzureDisk
DiskName
--------
coco2008memb3-coco2008memb3-0-201307022204430928
coco2008memb5-coco2008memb5-0-201307022204540471
PS C:\> get-azuredisk | where-object {$_.diskname -like "*memb*"} | remove-azuredisk
VERBOSE: 2:35:56 PM - Begin Operation: Get-AzureDisk
VERBOSE: 2:35:57 PM - Completed Operation: Get-AzureDisk
VERBOSE: 2:35:57 PM - Begin Operation: Remove-AzureDisk
remove-azuredisk : "An exception occurred when calling the ServiceManagement API. HTTP Status Code: 400. Service
Management Error Code: BadRequest. Message: A disk with name coco2008memb3-coco2008memb3-0-201307022204430928 is
currently in use by virtual machine coco2008memb3 running within hosted service coco2008memb3, deployment
coco2008memb3.. Operation Tracking ID: 8a8ab4956d5948ec9c23ec047259d086."
At line:1 char:61
+ get-azuredisk | where-object {$_.diskname -like "*memb*"} | remove-azuredisk
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Remove-AzureDisk], ServiceManagementClientException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.RemoveAzureDiskCommand
VERBOSE: 2:35:58 PM - Begin Operation: Remove-AzureDisk
remove-azuredisk : "An exception occurred when calling the ServiceManagement API. HTTP Status Code: 400. Service
Management Error Code: BadRequest. Message: A disk with name coco2008memb5-coco2008memb5-0-201307022204540471 is
currently in use by virtual machine coco2008memb5 running within hosted service coco2008memb5, deployment
coco2008memb5.. Operation Tracking ID: 69471c6e365e4dbca7ab714dfaddbe98."
At line:1 char:61
+ get-azuredisk | where-object {$_.diskname -like "*memb*"} | remove-azuredisk
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Remove-AzureDisk], ServiceManagementClientException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.RemoveAzureDiskCommand
答案 0 :(得分:0)
问题在几个小时后自行消失,没有任何额外的互动。我只是在当天晚些时候重新登录,两个孤立的磁盘已经消失了!
答案 1 :(得分:0)
您可以使用IaaS Management Studio,您有一个窗口可以查看孤立的磁盘,因此您可以快速删除它们。但是,在某些情况下,我几天都无法删除孤立的磁盘。 (使用powershell命令也存在同样的问题。