Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, May 22, 2018 7:17 AM
Hi,
I am trying to create a copy of a managed disk (it is an OS disk) that is attached to a running VM in Azure but it fails, I tried the script that is shown in this link: https://docs.microsoft.com/en-us/azure/virtual-machines/scripts/virtual-machines-windows-powershell-sample-copy-managed-disks-to-same-or-different-subscription , I also stopped the VM before trying but with no luck...
How can I clone this VM or make a copy of its managed disk? Is it possible I do that while it is running?
All replies (3)
Wednesday, May 23, 2018 2:31 PM ✅Answered
I would suggest you to take a snapshot of the managed OS disk and create a New/Clone VM by using the Snapshot. A Managed Snapshot is a read-only full copy of a managed disk which is stored as a standard managed disk by default. With snapshots, you can back up your managed disks at any point in time. These snapshots exist independent of the source disk and can be used to create new Managed Disks.
To learn more about how to create snapshots with Managed Disks, please check out these resources:
Create copy of VHD stored as a Managed Disk using Snapshots in Windows
Create copy of VHD stored as a Managed Disk using Snapshots in Linux
Create a virtual machine from a snapshot with PowerShell
“If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on your forum experience, click here
Tuesday, May 22, 2018 9:09 AM
Hello,
Are you making copy of VM in same subscription or in different subscription?
Can you please post the error you received while trying the script.
Please Mark as Answer if my post works for you or Vote as Helpful if it helps you. Kapil Singh
Tuesday, May 22, 2018 9:30 AM
Hi,
I am making copy of VM in same subscription, the error was related to change date not allowed or something..
I will try again and post the error I receive.