I (will) have a VM in libvirt (using QEMU/KVM) that I will set up and consider the "gold master". I would then like to be able to clone it 'n' times to create multiple systems. What is the best way to do this, and how best to "individualize" the cloned systems after they are instantiated? The hypervisor platform is:

OS: Ubuntu 12.04.2

Hypervisor pkg: qemu-kvm 1.0+noroms-0ubuntu14.8

Libvirt: 1.0.4 (compiled from source)

I am managing the VMs from another system (Fedora 18 OS) using virt-manager 0.9.5

I know I can shut down the VM and then use virt-manager's "Clone..." function, but am wondering if there is a better way (especially if I could do multiple clones at once, not sure if that's possible or not...)


To massively clone (baseline or even customized) installations I would say that the best method is to set up a PXE+TFTP server and provide a preseed/kickstart file.

Add your config management tool of choice (puppet/chef/cfengine/other) to the mix and you will have a powerful framework to deploy as many clones as you need. Moreover, add local mirrored repositories to increase speed.

The upper limit for simultaneously deployed clones will be the ethernet and I/O throughput you can sustain.


First prepare the master vm (not sure about ubuntu but sys-unconfig works great in RHEL

Then simply run virt-clone as many times as you need, using an ampersand at the end of the command to send it to background

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.