Windows 2012 Server - How to Copy / Replicate a VM

I want to copy a VM on the same physical Windows Server 2012, and rename it as VM-COPY.  How do I do this?

I looked at Hyper V Server Replication, but it seems like this is only for replicating VMs to a different server.
benc007Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aravind ancheWindows/Vmware Commented:
i will copy the vhd disk and make it as copy and create new Vm with vhd copy
1
Alvaro LamadridNetwork AdminCommented:
It seems like there is a very useful wizard in hyper v to accomplish such task. Here is the link.

https://techjourney.net/how-to-clone-vm-virtual-machine-in-hyper-v/

They will approach it from a cloning stand point, but since hyper be dosent seems to support cloning a running VM out of the box this tutorial will guide you through make a full copy of the VM.

PD: watch out for the network config...
1
benc007Author Commented:
RE: i will copy the vhd disk and make it as copy and create new Vm with vhd copy
Please provide steps on how to do this, but I think this only copies the files and not an entire image of the VM (which has certain programs, settings, etc.)

When I right click the VM I want to copy, I also see Save, Checkpoint and Export.  Can this be used to copy the VM and all the settings to VM-COPY which is on the same physical server?
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

aravind ancheWindows/Vmware Commented:
ok here what I did couple days ago!
I was low on space on a drive , So i saved the vm (There is a save button on top left hand side when you connect to VM.).
Then I copied the vhd and snapshots associated to that to the another drive and created new vm using that vhd. It has all just like the parent VM.
0
benc007Author Commented:
Alvaro Lamadrid - I have events and processes running on the source VM.  If I clone it, do I have to stop the events and processes that are running on the source VM first?

dj 3094 - Do you think Alvaro's way is faster and easier?
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
Is the VM part of a domain?  if so, you can't do that without causing problems.  Windows networks do not support cloning / imaging systems that are in production.
0
Alvaro LamadridNetwork AdminCommented:
The comment regarding the computer being joined to a domain or not , and your comment regarding your services etc... Sadly I don't think I can't give an specific advise , I'll say clone it and remove the PC from the domain change the name of it , then put it back . Remember backing up user profiles if you don't have roaming profiles or folder redirection . This steps should give a computer just like the one you cloned from and I don't think you will have an issue with Active Directory
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
I'll say clone it and remove the PC from the domain change the name of it , then put it back . Remember backing up user profiles if you don't have roaming profiles or folder redirection . This steps should give a computer just like the one you cloned from and I don't think you will have an issue with Active Directory

its unwise AT BEST to do such a thing with a production environment- such steps would leave you in an unsupported state.
1
Alvaro LamadridNetwork AdminCommented:
Lee, maybe I wasn't clear enough , when I said un join the PC from the domain a meant the new clone , the one in production oviously needs to stay in production.
0
benc007Author Commented:
Lee W - "Is the VM part of a domain? " ... what do you mean exactly?  The VM uses a few IP addresses but it doesn't host any websites.
0
Alvaro LamadridNetwork AdminCommented:
benc007 - I think we are assuming too much at the time of give you an advise

I use Xen Server 7 and my replication or cloning process is seamlessly. I guess we touched the domain part because we assumed that you have a Windows based network and that the VM was running Windows .

In my opinion if you need not only the answer to "How to clone a VM in Hyper V" but also how to plan to deploy a clone of a machine that can be a server of some service or a user computer I feel like we will need more info to help with the plan.
0
aravind ancheWindows/Vmware Commented:
""Alvaro Lamadrid - I have events and processes running on the source VM.  If I clone it, do I have to stop the events and processes that are running on the source VM first?

dj 3094 - Do you think Alvaro's way is faster and easier?"

Both  take same effort
1
Alvaro LamadridNetwork AdminCommented:
Even though Hyper V might allow you to clone the VM while its on (It depends on your environment), I would like to recommend you to schedule a Maintenance WIndow and perform the cloning while the original VM is off. Then at the time of turning on the new VM make sure your network settings wont create a problem with the original VM  (IP conflicts). That should give you a functional clone of the original VM. So, yes I will recommend to have the VM off.
1
benc007Author Commented:
Alvaro - RE: Even though Hyper V might allow you to clone the VM while its on (It depends on your environment), I would like to recommend you to schedule a Maintenance WIndow and perform the cloning while the original VM is off. Then at the time of turning on the new VM make sure your network settings wont create a problem with the original VM  (IP conflicts). That should give you a functional clone of the original VM. So, yes I will recommend to have the VM off.

I can't turn the original VM off because it's running critical processes.  How can I clone this VM without turning the original VM off?

After cloning, how can I run the same critical processes on the clone?
0
Alvaro LamadridNetwork AdminCommented:
Benc007 ,

Before I post anything you MUST! read this part. This is a recommendation that I found online and I agreed 100% with the guy who posted:

"Before cloning a VM, you may want to prepare the source VM with the Sysprep (System Preparation Tool) utility to reset and remove the unique security identifier (SID) for the VM, and avoid issues such as two computers have a same IP address or two computers have the same computer name. This step is recommended for VM that is joined to Active Directory (AD) domain on the same network, but is not required most of the time, and can usually be skipped for virtual machines running as workstation (don’t join domain).
Sysprep.exe utility is normally located in the following location:

C:\Windows\System32\Sysprep

In the System Preparation Tool window, select Enter System Out-of-Box Experience (OOBE), check the Generalize checkbox’, and choose Shutdown as the shutdown options when the Sysprep process completed.

Syspreg VM for Cloning

After Syspreg the virtual machine, you have to go through the entire setup process again when you boot up the virtual machine or its clones again. However, all applications installed and all user data remain exactly as it is"

I dont know if you can do it , since you said that you are running critical processes on it but its a good point to pay attention to.

It seems like Hyper V does not support "hot clonning" by default or it does not supports it natively . However you can use this System Center Virtual Machine Manager.

You might have to do a lot of reading or 10 mins of a Youtube video, in any case here is the primary link on how to succeed with Center Virtual Machine Manager :

https://technet.microsoft.com/en-us/library/gg610610(v=sc.12).aspx

Sincerely,

Alvaro Lamadrid
0
benc007Author Commented:
I was able to clone the VM  =)

I exported the VM, imported it to create a new VM, renamed the VM, and changed the IP address.  

The IP, subnet, and gateway are correct, but it doesn’t have an internet connection.  

I read something about arp/broadcast domain/virtual switch settings/ but I’m not sure ... do you have any suggestions?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Seth SimmonsSr. Systems AdministratorCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: benc007 (https:#a42103239)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.