What’s the easiest way to clone a production virtual machine for testing

clonehyper-vvirtualization

We're running Hyper-V on Windows Server 2008. I have a production environment VM for which I'm planning some major application upgrades. These upgrades are completely within the VM (not at the host level) and are not related to the OS.

I'd like to clone the production VM so I can test the upgrade procedure without affecting active users.

So my questions are:

  1. what's the easiest way to clone the production machine?
  2. When I do the actual upgrade, is a VM snapshot a good way to make a just-in-case backup? What does a snapshot not protect me from?

Best Answer

  1. shut down the machine and export. To replicate the machine copy the export folder into your Hyper-V directory and import it. NB you can only import once, so import a copy!

  2. yes.

JR

Re Michael's question: You can't export a machine without shutting it down first. You could snapshot it (e.g. www.drivesnapshot.de) and then restore the snapshot to a new machine with disks of the same size. However when you boot it the new VM will think the original network card(s) have been removed and replaced with new one(s). Not a big deal, but you'll be left with a ghost network card that's hard to remove, just as if you had fiddled with the network cards in a real PC.

I would shrug and shut down the PC to use an export. It takes only the time needed to make a copy of the hard disk file(s), which can be a while if they're big.

Related Topic