How to clone a prodcution VM in azure?

Anonymous
2021-12-09T15:38:42.56+00:00

I need to clone a windows server VM in azure. The clone will be used for testing purposes.

My questions are:
How do I sandbox the clone VM? I imagine that we can't have two VM's with the same hostname on the network?
How do I rename the clone VM without it affecting the production VM? The production VM is joined to our domain on Azure AD.

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

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2021-12-09T17:04:37.547+00:00

    Hi @Anonymous ,

    1. Create a snapshot of the machine, for example VM01.
    2. Create a managed disk from the snapshot
    3. Shutdown VM01
    4. Create a new VM, for example VM01Clone and use the managed disk you created in step 2
    5. If VM01Clone is running login and rename the computer to VM01Clone
    6. If renaming is done you can start the VM01 again

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    3 people found this answer helpful.

  2. Chris Hemphill 16 Reputation points
    2022-07-07T20:09:32.683+00:00

    In my case, this does not work for Linux systems, it creates the cloned disk as disk 2 data disk, not the OS disk, and it may be that I did not perform the steps properly. More detail would be nice for each step.

    3 people 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.