how to Removing a VHD with a ghost VM

how to Removing a VHD with a ghost VM

I deleted a VM and the tried to delete the disk, yet the VHD is still attached to the VM. I've tried to remove the VHD with power shell and got:

Remove-AzureDisk : "An exception occurred when calling the ServiceManagement API. HTTP Status Code: 400. Servi
Management Error Code: BadRequest. Message: A disk with name XXXXXXXXXXXXXXX is currently in use
virtual machine XXXXXX running within hosted service XXXXXXX, deployment XXXXXXX.. Operation Tracking ID:
XXXXXXXXXXXXXXXXX."
At line:1 char:1
+ Remove-AzureDisk -DiskName XXXXXXXXXXXXXXXXXX
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzureDisk], ServiceManagementClientException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.RemoveAzureDiskCommand


When I list the VM's with PS the VM that is blocking isn't listed. I tried to remove it even though it wasn't listed, nothing happened.


Any help in this matter is greatly welcomed.
If you still can't deleting the disk, and it's showing "-" under "Attached To" in the portal, then you'll need to contact support so they can help you perform the deletion.

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright