question

FrankVanDyke-4792 avatar image
1 Vote"
FrankVanDyke-4792 asked FrankVanDyke-4792 answered

Azure VM Cloning from snapshot error

I am trying to clone a SQL Server from a snapshot and followed a guide recommended by several admins. In the process I created snapshots of the OS Disk and Data disks and then created managed disks from the snapshots. I had made a resource group of its own just to house the disks until the cloning was complete. When trying to deploy the VM from the Managed OS Disk the processes fails with a Bad Request error.

{
"status": "Failed",
"error": {
"code": "BadRequest",
"message": "Disk R-OSDISK-ManagedDisk is duplicated and attached to the following VM's /subscriptions//resourceGroups/Clone-portal/providers/Microsoft.Compute/virtualMachines/s01, /subscriptions/resourceGroups/Clone-portal/providers/Microsoft.Compute/virtualMachines/*s01."
}
}
I've checked all of my resource groups and made sure there are no stray instances of the VM I'm trying to create hanging around. I've done the cloning process before and not had this error. What am I missing?

azure-virtual-machines
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

FrankVanDyke-4792 avatar image
0 Votes"
FrankVanDyke-4792 answered

@karishmatiwari-msft

Thank you for your reply! Based on what you sent me I found what the problem was. In the steps leading to creating the VM from the managed disk I was making the error myself. When choosing the disks to attach I selected and attached all the data disks correctly but mistakenly attached the OS Managed Disk (which the interface will let you without comment at this step...) That resulted in it trying to build the VM with the OS Disk but also trying to attach it as a data disk. Ugh!!!

Any way thank you again for the submission. I appreciate your time!

Frank

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karishmatiwari-msft avatar image
1 Vote"
karishmatiwari-msft answered karishmatiwari-msft edited

Please check and confirm that you followed these steps to achieve it:

  1. Click on the OS disk of your desired VM.
    136513-image.png

  2. Create a snapshot of your OS disk.
    136426-image.png

  3. Once the snapshot is created then create Disk.
    136427-image.png

  4. Once the disk is created then create a VM from that disk.

  5. Then perform the same steps for creating a data disk and attach into the VM after deploying the cloned VM

Please find the below public facing document for reference:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/create-vm-specialized-portal#create-a-vm-from-a-disk

Let me know if you followed the same steps and are still seeing issues and I can further help investigate. Thanks.


image.png (147.6 KiB)
image.png (31.4 KiB)
image.png (24.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.