1

I have seen various methods of cloning an Azure VM that all require the original VM to be sysprepped and generalized, therefore destroying it.

Instead of this method, I just took a backup of the source VM, restored into a new VM, logged on to the new VM (Windows Server), changed the name of the new VM, and then started the source VM. All seems to work fine, without the need to destroy the source VM. This has worked for many years with VMWare and HyperV too.

Are there any issues with this method that I am missing? Is it a bad idea? If so, why?

BTW, this VM does not use managed disks.

Thank you

0

This has worked for many years with VMWare and HyperV too.

Yes, you are right, the On-prem environment we use this way to clone VMs.

But in Azure, if we use this method to clone VMs, the private DNS will not work for original VM.

For example, if original VM name is server1, we can ping server1 in the same Vnet by default. then we use original VM's backup to restore this VM, the new VM name is server1 too, we ping server1 the network traffic will go to this new VM.

If you want to rename the new VM to server2 and want original VM to use server1, we should rename new VM then restart original VM.

So, I think sysprepped and generalized the VM, and use this VM to create an image is a right way.

  • Unsure what you mean by this answer. It looks like you are suggesting what I already did. This was my actual steps: 1) Shut down the source Azure VM "Server1" 2) Restore the overnight backup of that VM into a new Azure VM "Server2", but of course, it is called Server1 in Windows. 3) Start Server2 while Server1 is still shut down. 4) Rename the new server from Server1 to Server2 in the windows machine properties 5) Restart Server2 6) Start Server1 – Madbison Sep 20 '17 at 1:47
  • @Madbison I mean if we use this method to create new VM, we need to rename and reboot original VM and new VM but prepare an image, we can create new VM without a reboot. – Jason Ye Sep 20 '17 at 1:51
  • OK I think I see what you are saying. It's that I will save the rename steps if I use the Sysprep and Generalize. In this case, it was a one off, so I was happy to do it. My plan now is actually Sysprep and generalise Server2, so it can be used as the base for automatically spinning up a variable number of performance testing machines. The point was I did not want to lose the original Server1, as it was critical to someone else's work. – Madbison Sep 20 '17 at 1:56
  • @Madbison You are right, create a new VM to sysprep and Generalize is a good idea, in this way you can keep your server1. – Jason Ye Sep 20 '17 at 1:59
  • @Madbison Just checking in to see if the information provided was helpful. Please let me know if you would like further assistance. – Jason Ye Sep 20 '17 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.