locked
Using Azure Storage explorer copy/paste - disk loosing it's VM Generation RRS feed

  • Question

  • Hello

    When I copy a disk from one subscription to another, it's Gen is not "2" anymore but rather marked with "-".

    If I copy within the sub, the Gen is kept intact.

    Destination sub:

    Source sub:

    V2

    Monday, May 25, 2020 2:24 PM

Answers

  • looks like a bug. Try to report it to MS: Where's the best place to report bugs regarding the Azure Portal website.

    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - https://github.com/sadomovalex/camlex

    I believe its a missing feature rather than a bug. It's not using the parameter when it's copying, so I used a script to overcome the limitation.
    -HyperVGeneration Vx

    #Provide the subscription Id of the subscription where managed disk exists
    $sourceSubscriptionId='source-sub'
    
    #Provide the name of your resource group where managed disk exists
    $sourceResourceGroupName='source-rg'
    
    #Provide the name of the managed disk
    $managedDiskName='source-disk-name'
    
    #Set the context to the subscription Id where Managed Disk exists
    Select-AzSubscription -SubscriptionId $sourceSubscriptionId
    
    #Get the source managed disk
    $managedDisk= Get-AzDisk -ResourceGroupName $sourceResourceGroupName -DiskName $managedDiskName
    
    #Provide the subscription Id of the subscription where managed disk will be copied to
    #If managed disk is copied to the same subscription then you can skip this step
    $targetSubscriptionId='destination-sub'
    
    #Name of the resource group where snapshot will be copied to
    $targetResourceGroupName='destination-rg'
    
    #Set the context to the subscription Id where managed disk will be copied to
    #If snapshot is copied to the same subscription then you can skip this step
    Select-AzSubscription -SubscriptionId $targetSubscriptionId
    
    $diskConfig = New-AzDiskConfig -HyperVGeneration V2 -SourceResourceId $managedDisk.Id -Location $managedDisk.Location -CreateOption Copy 
    
    #Create a new managed disk in the target subscription and resource group
    New-AzDisk -Disk $diskConfig -DiskName $managedDiskName -ResourceGroupName $targetResourceGroupName


    Monday, May 25, 2020 6:34 PM

All replies

  • Monday, May 25, 2020 2:37 PM
  • looks like a bug. Try to report it to MS: Where's the best place to report bugs regarding the Azure Portal website.

    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - https://github.com/sadomovalex/camlex

    I believe its a missing feature rather than a bug. It's not using the parameter when it's copying, so I used a script to overcome the limitation.
    -HyperVGeneration Vx

    #Provide the subscription Id of the subscription where managed disk exists
    $sourceSubscriptionId='source-sub'
    
    #Provide the name of your resource group where managed disk exists
    $sourceResourceGroupName='source-rg'
    
    #Provide the name of the managed disk
    $managedDiskName='source-disk-name'
    
    #Set the context to the subscription Id where Managed Disk exists
    Select-AzSubscription -SubscriptionId $sourceSubscriptionId
    
    #Get the source managed disk
    $managedDisk= Get-AzDisk -ResourceGroupName $sourceResourceGroupName -DiskName $managedDiskName
    
    #Provide the subscription Id of the subscription where managed disk will be copied to
    #If managed disk is copied to the same subscription then you can skip this step
    $targetSubscriptionId='destination-sub'
    
    #Name of the resource group where snapshot will be copied to
    $targetResourceGroupName='destination-rg'
    
    #Set the context to the subscription Id where managed disk will be copied to
    #If snapshot is copied to the same subscription then you can skip this step
    Select-AzSubscription -SubscriptionId $targetSubscriptionId
    
    $diskConfig = New-AzDiskConfig -HyperVGeneration V2 -SourceResourceId $managedDisk.Id -Location $managedDisk.Location -CreateOption Copy 
    
    #Create a new managed disk in the target subscription and resource group
    New-AzDisk -Disk $diskConfig -DiskName $managedDiskName -ResourceGroupName $targetResourceGroupName


    Monday, May 25, 2020 6:34 PM