Installation guide

Dell Inc.
KVM Virtualization in RHEL 6 Made Easy
10
1. Suspend the VM to be cloned. This is a requirement since it ensures that all data and network I/O
on the VM is stopped.
# virsh suspend vm1
2. Run the virt-clone command:
# virt-clone \
--connect qemu:///system \
--original vm1 \
--name vm1-clone \
--file /vm-images/vm1-clone.img
This operation will take 2-3 minutes, depending on the size of the VM.
3. When done, you can resume the original VM:
# virsh resume vm1
4. The cloned VM is placed in shutdown mode. To start it:
# virsh start vm1-clone
The cloned VM is an exact copy of the original VM, all VM properties (VCPUs, memory, disk space) and
disk contents will be the same. The virt-clone command takes care to generate a new MAC address for
the VM clone and updates the proper network controller configuration file (i.e.
/etc/sysconfig/network-scripts/ifcfg-em1), thus avoiding duplicate MAC addresses.
For more information, refer to the virt-clone man page.
5. Managing VMs
These are some of the commands I use to administer my VMs, and to be honest I don‟t use them very
often, but they can be handy. As always, for a list of all available commands, your best bet is the virsh
man page.
5.1 Common tasks
List all VMs on a host, running or otherwise:
# virsh list all
Show VM information:
# virsh dominfo vm1
Show VCPU/memory usage for all running VMs: