Issues cloning a vm

Trevor Lewandowski 1 Reputation point
2021-07-15T15:10:01.543+00:00

I am having issues cloning a VM in Azure, I have created a snapshot of the current VM(both the OS and the Data Disks) i want to clone, then I created a managed disk of that snapshot, (both again) when I go into the OS managed disk the Create a VM link is not selectable.

I am using this as a refence to create the Clone
https://getanadmin.com/azure/how-to-easily-clone-a-virtual-machine-in-azure/

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,111 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. ChristopherW-MSFT 1,681 Reputation points
    2021-07-15T19:44:58.21+00:00

    Hi @Trevor Lewandowski ,

    When creating a Disk from a Snapshot for an OS, make sure the Disk Size is the same as the OS Volume - You may also want to make sure the VM is turned off so it doesn't have any issues with the Snapshot creation.

    After the OS Disk is created, you can find the Disk resource in the Resource Group and '+ Create VM' as long as it the Disk creation detected an OS.

    If the '+Create VM' is not selectable, the Disk/Snapshot may be missing the 'Operating System' Property, or your user account might not have appropriate VM Creation Privileges for the Resource Group or Subscription.

    If the Operating System is still missing after re-creation, you can force it through

    $update = New-AzureRmDiskUpdateConfig -OsType <OSType>
    Update-AzureRmDisk -DiskName <diskname> -DiskUpdate $update -ResourceGroupName <rgname>

    Or by copying the existing Disk to a new Managed Disk and setting the OS Type on creation.
    https://learn.microsoft.com/en-us/previous-versions/azure/virtual-machines/scripts/virtual-machines-powershell-sample-copy-managed-disks-to-same-or-different-subscription

    0 comments No comments

  2. Prashant Chirde 1 Reputation point
    2021-07-21T18:06:44.467+00:00
    0 comments No comments