IF I need to have concurrently running versions of a Windows VM (using KVM 0.10.2 on CentOS), each one configured differently ( a snapshot that will then branch off unto its own VM) what is the best, fastest way? Is my only option to use virt-sysprep and then virt-clone or is there a faster way? LVM snapshots are good if I don't want to run BOTH versions of the VM, but I do.

  • virt-sysprep does not work on Windows currently. You will have to access the Windows system and directly run sysprep – AngerClown May 22 '13 at 16:19

I think you have to clone VMs. This shouldn't be too bad if you create a good template VM first.

  1. Install Windows. Note that if you are using virtio the VM will need to have the virtio-win CD mounted on a second CD drive so you can load the disk driver.
  2. Update Windows
  3. Setup any common software.
  4. Don't forget to enable Remote Desktop and any other Windows features / settings / tunings.
  5. Reboot Windows
  6. Run sysprep (C:\Windows\System32\sysprep\sysprep.exe).Make sure the Generalize option is checked and set the Shutdown Options to Shutdown.

This is now your template. Do not restart this VM or your will lose the sysprep setup.

For each VM, clone this template. Note that sysprep removed your network settings, so you will have to setup the network on each clone.

The clone process will be completely driven by disk speed on the host. You can speed things up by having faster disks (maybe a SAN).

Also, it will go faster if you have smaller vdisks. Windows 2008 will just fit on 32GB. If you need more than that for particular VMs, my preferred method would be to add a second vdisk after the cloning and mount that as a D: drive on the guest rather than expanding C: for that VM.


Your Answer

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