Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
kacper.blog.redpill-linpro.com/archives/82 - qcow2 overlays are nice. –  n8whnp May 22 '13 at 17:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.