0

在 Azure 管理控制台中,在虚拟机 > 磁盘下,我看到 2 个磁盘都表示它们已附加到虚拟机。但是,这些虚拟机已被删除。此外,磁盘 blob vhd 已被删除。所以现在我剩下 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
4

2 回答 2

0

您可以使用IaaS Management Studio,您有一个可以查看孤立磁盘的窗口,因此您可以快速删除它们。但是,在某些情况下,我几天都无法删除孤立磁盘。(使用 powershell 命令也有同样的问题。

于 2013-12-08T12:49:54.117 回答
0

几个小时后,问题自行消失了,而我没有进行任何额外的交互。我只是在当天晚些时候重新登录,两个孤立的磁盘已经消失了!

于 2013-07-04T01:39:41.497 回答