Azure VM Cloning from snapshot error

Frank VanDyke 121 Reputation points
2021-09-29T19:56:34.317+00:00

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
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,017 questions
0 comments No comments
{count} vote

Accepted answer
  1. Frank VanDyke 121 Reputation points
    2021-10-01T13:22:22.417+00:00

    @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

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 20,772 Reputation points Microsoft Employee Moderator
    2021-09-30T02:02:58.943+00:00

    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://learn.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.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.