none
Unable to remove VHDs

    Question

  • From Stefan Scherer @stefscherer  via Twitter
     
    Hi @AzureSupport! I can't remove a vhds with your portal. Just created a TP4 VM and removed it some minutes later. pic.twitter.com/Uluz0f2RHR 
    I already have deleted the disk and the VM. Currently I have 0 VM's, but the blob/vhds still has a lease. 
    VM images (classic) -> Nothing to display. All resources -> 1 group -> 1 blob -> 1 Container with vhds -> infinite lease 

    https://twitter.com/AzureSupport/status/676303196571111424
     
    Thanks,
    @AzureSupport
    Monday, December 14, 2015 8:09 AM

Answers

  • Hi Stefan,

    Every so often I have experienced the error that you describe.

    One way of addressing the lease is to access the Virtual Machines (area in the old portal), click the "disks" menu item and delete the rogue vhd there. If the lease error is persistent and won't allow you to delete, then you may proceed as follows using Powershell:

    1> Set Up PowerShell Management Environment by importing your Azure Subscription Settings and run as Administrator

    2>Run -> Set-ExecutionPolicy Unrestricted 

    3>Execute this Script " Script Contents Courtesy of Brian Lewis - IT Pro Evangelist

    Param([string]$Uri = $(Read-Host -prompt "Please specify a blob URL"))
    
    $ProgressPreference = 'SilentlyContinue'
    
    
    echo "Processing $Uri"
    
    echo "Reading storage account information..."
    $acct = Get-AzureStorageAccount | ? { (new-object System.Uri($_.Endpoints[0])).Host -eq (new-object System.Uri($Uri)).Host }
    if(-not $acct) {
    	write-host "The supplied URL does not appear to correspond to a storage account associated with the current subscription." -foregroundcolor "red"
    	break
    }
    
    $acctKey = Get-AzureStorageKey ($acct.StorageAccountName)
    $creds = "DefaultEndpointsProtocol=http;AccountName=$($acctKey.StorageAccountName);AccountKey=$($acctKey.Primary)"
    $acctobj = [Microsoft.WindowsAzure.CloudStorageAccount]::Parse($creds)
    $uri = $acctobj.Credentials.TransformUri($uri)
    echo "Confirmed - storage account '$($acct.StorageAccountName)'."
    
    
    $blobclient = New-Object Microsoft.WindowsAzure.StorageClient.CloudBlobClient($acctobj.BlobEndpoint, $acctobj.Credentials)
    $blobclient.Timeout = (New-TimeSpan -Minutes 1)
    $blob = New-Object Microsoft.WindowsAzure.StorageClient.CloudPageBlob($uri, $blobclient)
    
    
    echo "Checking whether the blob is currently registered as a disk or image..."
    $disk = Get-AzureDisk | ? { (new-object System.Uri($_.MediaLink)) -eq $blob.Uri }
    if($disk) {
    	write-host "The blob is still registered as a disk with name '$($disk.DiskName)'.  Please delete the disk first." -foregroundcolor "red"
    	break
    }
    $image = Get-AzureVMImage | ? { $_.MediaLink -eq $blob.Uri.AbsoluteUri }
    if($image) {
    	write-host "The blob is still registered as an OS image with name '$($image.ImageName)'.  Please delete the OS image first." -foregroundcolor "red"
    	break
    }
    echo "Confirmed - the blob is not in use by the Windows Azure platform."
    
    
    
    
    echo "Inspecting the blob's lease status..."
    try {
    	$blob.FetchAttributes()
    } catch [System.Management.Automation.MethodInvocationException] {
    	write-host $_.Exception.InnerException.Message -foregroundcolor "red"
    	break
    }
    
    echo "Current lease status: $($blob.Properties.LeaseStatus)"
    
    if($blob.Properties.LeaseStatus -ne [Microsoft.WindowsAzure.StorageClient.LeaseStatus]::Locked) {
    	write-host "Success - the blob is unlocked." -foregroundcolor "green"
    	break
    }
    
    
    
    echo "Unlocking the blob..."
    $request = [Microsoft.WindowsAzure.StorageClient.Protocol.BlobRequest]::Lease($uri, 0, [Microsoft.WindowsAzure.StorageClient.Protocol.LeaseAction]::Break, $null)
    $request.Timeout = $blobclient.Timeout.TotalMilliseconds
    $acctobj.Credentials.SignRequest($request)
    try {
    	$response = $request.GetResponse()
    	$response.Close()
    }
    catch {
    	write-host "The blob could not be unlocked:" -foregroundcolor "red"
    	write-host $_.Exception.InnerException.Message -foregroundcolor "red"
    	break
    }
    
    $blob.FetchAttributes()
    echo "Current lease status: $($blob.Properties.LeaseStatus)"
    
    write-host "Success - the blob is unlocked." -foregroundcolor "green"

    If this helps you please remember to mark the response as answered.

    Regards,

    Brent

    Monday, December 14, 2015 8:25 AM
  • Hi Stefan,

    You will find tools for interacting with Azure here:

    http://www.windowsazure.com/en-us/manage/downloads/

    (There are CLI tools for Mac as well. )

    Once Installed, Access PowerShell from the Installed Applications Menu or typing "ISE" in the run area

    Once you have opened PowerShell ISE / Command Prompt :

    Type :  Get-AzurePublishSettingsFile and hit enter which will redirect you to a login page and you can then save the file is a safe location.

    Type : Import-AzurePublishSettingsFile <details of where you saved the file>

    You can then follow the remainder of the steps from the answer above :)

    Regards and goodluck :)

    Brent

    Monday, December 14, 2015 12:07 PM
  • Hi Stefan,

    Apologies for the extended wait.

    Generally the One Click removal of a VM works. In very rare occasions we experience the issues that you are wrestling with at the moment.

    The error message above is as a result of the associated cloud service still existing. And Also the OS Image still has a reference.

    1> Please navigate to Browse -> Cloud Services (Classic ) and remove the associated Cloud Service

    2> Once the above step is completed, Navigate to Browse -> OS Disks (Classic ) and delete the resulting file from this location

    3>Then execute the command again. Taking care that you also select the correct Blob URL.

    (PS. I will debug the script to insure that I haven't introduced issues into it during my Copy-Paste operation)

    Kind Regards,

    Brent

    Monday, December 14, 2015 9:35 PM
  • Hi Brent,

    thanks for your further instructions.

    1> No cloud services (classic) to display

    2> Browse -> OS Disks (Classic) -> Ah, here is another Windows disc unattached. And a delete button that removed the disc. After entering this dialog -> Nothing to display

    3> Now I clicked back to "All resources" -> dockerxyz group -> Blobs -> vhds -> page blob I found the remaining vhds with this status:

    • LEASE STATUS
      Unlocked
    • LEASE STATE
      Available
    • LEASE DURATION
      -

    Looks promising. Now I click on delete. -> Successfully deleted blob.
    Afterwards I also was able to delete the remaining resource group.


    So the missing link was to have a look at 
    Browse -> OS Disks (Classic)

    Thank you very much.

    Kind Regards,
    Stefan

    Monday, December 14, 2015 9:49 PM

All replies

  • Hi Stefan,

    Every so often I have experienced the error that you describe.

    One way of addressing the lease is to access the Virtual Machines (area in the old portal), click the "disks" menu item and delete the rogue vhd there. If the lease error is persistent and won't allow you to delete, then you may proceed as follows using Powershell:

    1> Set Up PowerShell Management Environment by importing your Azure Subscription Settings and run as Administrator

    2>Run -> Set-ExecutionPolicy Unrestricted 

    3>Execute this Script " Script Contents Courtesy of Brian Lewis - IT Pro Evangelist

    Param([string]$Uri = $(Read-Host -prompt "Please specify a blob URL"))
    
    $ProgressPreference = 'SilentlyContinue'
    
    
    echo "Processing $Uri"
    
    echo "Reading storage account information..."
    $acct = Get-AzureStorageAccount | ? { (new-object System.Uri($_.Endpoints[0])).Host -eq (new-object System.Uri($Uri)).Host }
    if(-not $acct) {
    	write-host "The supplied URL does not appear to correspond to a storage account associated with the current subscription." -foregroundcolor "red"
    	break
    }
    
    $acctKey = Get-AzureStorageKey ($acct.StorageAccountName)
    $creds = "DefaultEndpointsProtocol=http;AccountName=$($acctKey.StorageAccountName);AccountKey=$($acctKey.Primary)"
    $acctobj = [Microsoft.WindowsAzure.CloudStorageAccount]::Parse($creds)
    $uri = $acctobj.Credentials.TransformUri($uri)
    echo "Confirmed - storage account '$($acct.StorageAccountName)'."
    
    
    $blobclient = New-Object Microsoft.WindowsAzure.StorageClient.CloudBlobClient($acctobj.BlobEndpoint, $acctobj.Credentials)
    $blobclient.Timeout = (New-TimeSpan -Minutes 1)
    $blob = New-Object Microsoft.WindowsAzure.StorageClient.CloudPageBlob($uri, $blobclient)
    
    
    echo "Checking whether the blob is currently registered as a disk or image..."
    $disk = Get-AzureDisk | ? { (new-object System.Uri($_.MediaLink)) -eq $blob.Uri }
    if($disk) {
    	write-host "The blob is still registered as a disk with name '$($disk.DiskName)'.  Please delete the disk first." -foregroundcolor "red"
    	break
    }
    $image = Get-AzureVMImage | ? { $_.MediaLink -eq $blob.Uri.AbsoluteUri }
    if($image) {
    	write-host "The blob is still registered as an OS image with name '$($image.ImageName)'.  Please delete the OS image first." -foregroundcolor "red"
    	break
    }
    echo "Confirmed - the blob is not in use by the Windows Azure platform."
    
    
    
    
    echo "Inspecting the blob's lease status..."
    try {
    	$blob.FetchAttributes()
    } catch [System.Management.Automation.MethodInvocationException] {
    	write-host $_.Exception.InnerException.Message -foregroundcolor "red"
    	break
    }
    
    echo "Current lease status: $($blob.Properties.LeaseStatus)"
    
    if($blob.Properties.LeaseStatus -ne [Microsoft.WindowsAzure.StorageClient.LeaseStatus]::Locked) {
    	write-host "Success - the blob is unlocked." -foregroundcolor "green"
    	break
    }
    
    
    
    echo "Unlocking the blob..."
    $request = [Microsoft.WindowsAzure.StorageClient.Protocol.BlobRequest]::Lease($uri, 0, [Microsoft.WindowsAzure.StorageClient.Protocol.LeaseAction]::Break, $null)
    $request.Timeout = $blobclient.Timeout.TotalMilliseconds
    $acctobj.Credentials.SignRequest($request)
    try {
    	$response = $request.GetResponse()
    	$response.Close()
    }
    catch {
    	write-host "The blob could not be unlocked:" -foregroundcolor "red"
    	write-host $_.Exception.InnerException.Message -foregroundcolor "red"
    	break
    }
    
    $blob.FetchAttributes()
    echo "Current lease status: $($blob.Properties.LeaseStatus)"
    
    write-host "Success - the blob is unlocked." -foregroundcolor "green"

    If this helps you please remember to mark the response as answered.

    Regards,

    Brent

    Monday, December 14, 2015 8:25 AM
  • Hi Brent,

    thanks for the script. I'll setup a Windows VM with it. I started with Azure from a Mac and only using the Azure Portal in my browser and tried the TP4 VM on Azure.

    Any fast hint how I jump into Azure PowerShell on an empty Windows machine?

    What do I have to install?
    Where do I get my Azure Subscription Settings?

    Thanks!

    Kind Regards,
    Stefan

    Monday, December 14, 2015 11:23 AM
  • Hi Stefan,

    You will find tools for interacting with Azure here:

    http://www.windowsazure.com/en-us/manage/downloads/

    (There are CLI tools for Mac as well. )

    Once Installed, Access PowerShell from the Installed Applications Menu or typing "ISE" in the run area

    Once you have opened PowerShell ISE / Command Prompt :

    Type :  Get-AzurePublishSettingsFile and hit enter which will redirect you to a login page and you can then save the file is a safe location.

    Type : Import-AzurePublishSettingsFile <details of where you saved the file>

    You can then follow the remainder of the steps from the answer above :)

    Regards and goodluck :)

    Brent

    Monday, December 14, 2015 12:07 PM
  • Hi Brent,

    thanks, yes that helped. In the meantime I saw there also is a Chocolatey package (choco install windowsazurepowershell).

    So running the script above shows this error:

    PS C:\Users\vagrant\Downloads> .\azureblob.ps1

    Please specify a blob URL: https://dockerl6d2u1c8.blob.core.windows.net/

    Processing https://dockerl6d2u1c8.blob.core.windows.net/

    Reading storage account information...

    VERBOSE: 15:29:36 - Begin Operation: Get-AzureStorageAccount

    VERBOSE: 15:29:38 - Completed Operation: Get-AzureStorageAccount

    WARNING: GeoReplicationEnabled property will be deprecated in a future release of Azure PowerShell. The value will be

    merged into the AccountType property.

    VERBOSE: 15:29:38 - Begin Operation: Get-AzureStorageKey

    VERBOSE: 15:29:41 - Completed Operation: Get-AzureStorageKey

    Unable to find type [Microsoft.WindowsAzure.CloudStorageAccount].

    At C:\Users\vagrant\Downloads\azureblob.ps1:17 char:1

    + $acctobj = [Microsoft.WindowsAzure.CloudStorageAccount]::Parse($creds ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidOperation: (Microsoft.Windo...dStorageAccount:TypeName) [], RuntimeException

        + FullyQualifiedErrorId : TypeNotFound

    You cannot call a method on a null-valued expression.

    At C:\Users\vagrant\Downloads\azureblob.ps1:18 char:1

    + $uri = $acctobj.Credentials.TransformUri($uri)

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException

        + FullyQualifiedErrorId : InvokeMethodOnNull

    Confirmed - storage account 'dockerl6d2u1c8'.

    New-Object : Cannot find type [Microsoft.WindowsAzure.StorageClient.CloudBlobClient]: verify that the assembly

    containing this type is loaded.

    At C:\Users\vagrant\Downloads\azureblob.ps1:22 char:15

    + ... lobclient = New-Object Microsoft.WindowsAzure.StorageClient.CloudBlob ...

    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException

        + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

    The property 'Timeout' cannot be found on this object. Verify that the property exists and can be set.

    At C:\Users\vagrant\Downloads\azureblob.ps1:23 char:1

    + $blobclient.Timeout = (New-TimeSpan -Minutes 1)

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException

        + FullyQualifiedErrorId : PropertyNotFound

    New-Object : Cannot find type [Microsoft.WindowsAzure.StorageClient.CloudPageBlob]: verify that the assembly

    containing this type is loaded.

    At C:\Users\vagrant\Downloads\azureblob.ps1:24 char:9

    + $blob = New-Object Microsoft.WindowsAzure.StorageClient.CloudPageBlob ...

    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException

        + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

    Checking whether the blob is currently registered as a disk or image...

    VERBOSE: 15:29:41 - Begin Operation: Get-AzureDisk

    VERBOSE: 15:29:43 - Completed Operation: Get-AzureDisk

    VERBOSE: 15:29:43 - Begin Operation: Get-AzureVMImage

    VERBOSE: 15:29:51 - Completed Operation: Get-AzureVMImage

    VERBOSE: 15:29:51 - Begin Operation: Get-AzureVMImage

    VERBOSE: 15:29:55 - Completed Operation: Get-AzureVMImage

    The blob is still registered as an OS image with name '03f55de797f546a1b29d1b8d66be687a__CoreCLR-x64-Beta5-Linux-PartsUn

    limited-Demo-App-201504.29 03f55de797f546a1b29d1b8d66be687a__Team-Foundation-Server-2013-Update4-WS2012R2 03f55de797f546

    a1b29d1b8d66be687a__Team-Foundation-Server-2013-Update4-WS2012R2-201503.20 03f55de797f546a1b29d1b8d66be687a__Team-Founda

    tion-Server-2013-Update4-WS2012R2-201503.27 03f55de797f546a1b29d1b8d66be687a__VS-2013-Community-VSU5-AzureSDK-2.7-WS2012

    R2 03f55de797f546a1b29d1b8d66be687a__VS-2013-Community-VSU5-Cordova-CTP3.2-AzureSDK-2.7-WS2012R2 03f55de797f546a1b29d1b8

    d66be687a__VS-2015-Comm-VSU1-AzureSDK-2.8-WS2012R2 03f55de797f546a1b29d1b8d66be687a__VS-2015-Community-AzureSDK-2.7-WS20

    12R2 03f55de797f546a1b29d1b8d66be687a__VS-2015-Ent-VSU1-AzureSDK-2.8-WS2012R2 03f55de797f546a1b29d1b8d66be687a__VS-2015-

    Enterprise-AzureSDK-2.7-WS2012R2 03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-Community-12.0.31101.0-ApacheCordo

    va-CTP3.1-AzureSDK-2.6-WS2012R2-201505.27 03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-Community-VSU4-AzureSDK-2

    .51-NTVS-1.0-WS2012R2 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.2-x64-v5.8.8.1 0b11de9248dd4d87b18621318e037

    d37__RightImage-CentOS-6.3-x64-v5.8.8 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8.5 0b11de9248dd4

    d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8.6 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8

    .8.7 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8.8 0b11de9248dd4d87b18621318e037d37__RightImage-C

    entOS-6.3-x64-v5.8.8.9 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.4-x64-v13.4 0b11de9248dd4d87b18621318e037d3

    7__RightImage-CentOS-6.4-x64-v13.5.0.1 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.4-x64-v13.5.0.2 0b11de9248d

    d4d87b18621318e037d37__RightImage-CentOS-6.5-x64-v13.5.2 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.5-x64-v13

    .5.3 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.5-x64-v14.1 0b11de9248dd4d87b18621318e037d37__RightImage-Cent

    OS-6.5-x64-v14.1.3 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.5-x64-v14.1.5.1 0b11de9248dd4d87b18621318e037d3

    7__RightImage-CentOS-6.6-x64-v13.5.5 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.6-x64-v14.2 0b11de9248dd4d87b

    18621318e037d37__RightImage-CentOS-6.6-x64-v14.2.1 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-7.0-x64-v14.1.5.1

     0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-7.0-x64-v14.2 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-7

    .0-x64-v14.2.1 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v13.4 0b11de9248dd4d87b18621318e037d37__Rig

    htImage-Ubuntu-12.04-x64-v13.5.0.1 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v13.5.2 0b11de9248dd4d8

    7b18621318e037d37__RightImage-Ubuntu-12.04-x64-v13.5.3 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v13

    .5.5 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v14.1.1 0b11de9248dd4d87b18621318e037d37__RightImage-

    Ubuntu-12.04-x64-v14.1.3 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v14.1.5.1 0b11de9248dd4d87b186213

    18e037d37__RightImage-Ubuntu-12.04-x64-v14.2 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v14.2.1 0b11d

    e9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v5.8.8 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.0

    4-x64-v5.8.8.5 0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-12.04-x64-v5.8.8.7 0b11de9248dd4d87b18621318e037d37__

    ...

    (shortened the string due to 6000 byte limit here in forum)

    ...

    49e48fdbe814fb54b36b60e__hwx232v6 d570a118449e48fdbe814fb54b36b60e__hwx_sandbox_2.2.4.2 d570a118449e48fdbe814fb54b36b60e

    __hwx_sandbox_hdp_2.2 d570a118449e48fdbe814fb54b36b60e__hwx_sandbox_hdp_2.2.4.2v2 d570a118449e48fdbe814fb54b36b60e__hwx_

    sandbox_hdp_2.2.4.2v3 d570a118449e48fdbe814fb54b36b60e__hwx_sandbox_hdp_2.2.4.2v4 d570a118449e48fdbe814fb54b36b60e__hwx_

    sandbox_hdp_2.2.4.2v5 d570a118449e48fdbe814fb54b36b60e__hwx_sandbox_hdp_2.3v10 d570a118449e48fdbe814fb54b36b60e__hwx_san

    dbox_hdp_2.3v7 eed8e6be226e414095ba1fbf8fc3931f__dse-node-20141010 eed8e6be226e414095ba1fbf8fc3931f__dse-opscenter-20141

    010 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2012-SP2-11.0.5537.0-DW-ENU-Win2012-cy14su09 fb83b3509582419d99629ce476

    bcb5c8__SQL-Server-2012-SP2-11.0.5537.0-OLTP-ENU-Win2012-cy14su09 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2012-SP2-

    11.0.5548.0-DW-ENU-Win2012R2-cy14su11 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2012-SP2-11.0.5548.0-OLTP-ENU-Win2012

    R2-cy14su11 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2012-SP2-11.0.5569.0-DW-ENU-Win2012-cy15su02 fb83b3509582419d99

    629ce476bcb5c8__SQL-Server-2012-SP2-11.0.5569.0-DW-ENU-Win2012-cy15su04 fb83b3509582419d99629ce476bcb5c8__SQL-Server-201

    2-SP2-11.0.5569.0-DW-ENU-Win2012R2-cy15su04 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2012-SP2-11.0.5569.0-OLTP-ENU-W

    in2012-cy15su04 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2012-SP2-11.0.5569.0-OLTP-ENU-Win2012R2-cy15su04 fb83b35095

    82419d99629ce476bcb5c8__SQL-Server-2014-RTM-12.0.2048.0-DW-ENU-Win2012R2-cy15su04 fb83b3509582419d99629ce476bcb5c8__SQL-

    Server-2014-RTM-12.0.2048.0-OLTP-ENU-Win2012R2-cy15su04 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2014-RTM-12.0.2361.

    0-DW-ENU-Win2012R2-cy14su08 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2014-RTM-12.0.2361.0-OLTP-ENU-Win2012R2-cy14su0

    8 fb83b3509582419d99629ce476bcb5c8__SQL-Server-2014-RTM-12.0.2430.0-DW-ENU-Win2012R2-cy14su11 fb83b3509582419d99629ce476

    bcb5c8__SQL-Server-2014-RTM-12.0.2430.0-OLTP-ENU-Win2012R2-cy14su11 fb83b3509582419d99629ce476bcb5c8__SQL-Server-20140SP

    1-12.0.4100.1-DW-ENU-Win2012R2-cy15su05 fb83b3509582419d99629ce476bcb5c8__SQL-Server-20140SP1-12.0.4100.1-OLTP-ENU-Win20

    12R2-cy15su05 fb83b3509582419d99629ce476bcb5c8__SQL2014RTMonWIN2012R2Special16 fb83b3509582419d99629ce476bcb5c8__SQL2014

    RTMonWIN2012R2Special31 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site-Recovery-Config-Server-Non-VPN-201507.03

    d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site-Recovery-Config-Server-Non-VPN-201507.04 d4a65b493c36471ba82b42d5

    3fbd8063__Microsoft-Azure-Site-Recovery-Config-Server-Non-VPN-201507.05 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azur

    e-Site-Recovery-Config-Server-VPN-201507.03 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site-Recovery-Config-Serve

    r-VPN-201507.04 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site-Recovery-Config-Server-VPN-201507.05 d4a65b493c36

    471ba82b42d53fbd8063__Microsoft-Azure-Site-Recovery-Configuration-Server-201503.06 d4a65b493c36471ba82b42d53fbd8063__Mic

    rosoft-Azure-Site-Recovery-Master-Target-Server-201503.06 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site-Recover

    y-Master-Target-Server-201507.04 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site-Recovery-Master-Target-Server-20

    1507.05 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site-Recovery-Process-Server-201503.06 d4a65b493c36471ba82b42d

    53fbd8063__Microsoft-Azure-Site-Recovery-Process-Server-201507.04 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site

    -Recovery-Process-Server-201507.05 d4a65b493c36471ba82b42d53fbd8063__Microsoft-Azure-Site-Recovery-Process-Server-V2-201

    512.02'.  Please delete the OS image first.



    Any more hints to. I still seem to be blocked.

    Kind Regards,

    Stefan

    Monday, December 14, 2015 2:35 PM
  • Hello Azure Team,

    I still have problems. It seems to me like a deadlock of this blob. I don't understand the PowerShell script good engough and I just wanted to remove the blob is still costs some money. So is it possible to just remove the blob from someone at the Azure team?


    Perhaps this problem is reproducable.

    What I did when I created that TP4 VM eleven days ago was:
    * Create the TP4 VM within the Azure Portal

    * Played around and found out that nested virtualization is not possible. I wanted to test the Hyper-V containers.
    * So I clicked on the VM and found a remove/delete button. The VM still was running and the button was visible and clickable. So I clicked and wondered if I have to stop the VM first. After some seconds an error message appeared that the VM is obviously running. So I stopped it and then tried to remove the VM. Found out that I have to remove some other things first and clicked all the parts.
    * Perhaps this wrong order lead to the situation of that orphaned blob. I don't know of any leases as the VM has been already removed.

    A simpler way to remove a VM with all its dependencies in one click (with some "are you sure" questions) would help first time users of Azure, I think.

    Of course I want to learn that automation part of Azure and its PowerShell and other API's, but not right now. :)

    Kind Regards,

    Stefan

    Monday, December 14, 2015 6:24 PM
  • Hi Stefan,

    Apologies for the extended wait.

    Generally the One Click removal of a VM works. In very rare occasions we experience the issues that you are wrestling with at the moment.

    The error message above is as a result of the associated cloud service still existing. And Also the OS Image still has a reference.

    1> Please navigate to Browse -> Cloud Services (Classic ) and remove the associated Cloud Service

    2> Once the above step is completed, Navigate to Browse -> OS Disks (Classic ) and delete the resulting file from this location

    3>Then execute the command again. Taking care that you also select the correct Blob URL.

    (PS. I will debug the script to insure that I haven't introduced issues into it during my Copy-Paste operation)

    Kind Regards,

    Brent

    Monday, December 14, 2015 9:35 PM
  • Hi Brent,

    thanks for your further instructions.

    1> No cloud services (classic) to display

    2> Browse -> OS Disks (Classic) -> Ah, here is another Windows disc unattached. And a delete button that removed the disc. After entering this dialog -> Nothing to display

    3> Now I clicked back to "All resources" -> dockerxyz group -> Blobs -> vhds -> page blob I found the remaining vhds with this status:

    • LEASE STATUS
      Unlocked
    • LEASE STATE
      Available
    • LEASE DURATION
      -

    Looks promising. Now I click on delete. -> Successfully deleted blob.
    Afterwards I also was able to delete the remaining resource group.


    So the missing link was to have a look at 
    Browse -> OS Disks (Classic)

    Thank you very much.

    Kind Regards,
    Stefan

    Monday, December 14, 2015 9:49 PM
  • Just another notice. I always used the "All resources" link to have a look what I'm still using. So I would expect that the OS disks show up there, too.

    Monday, December 14, 2015 9:53 PM