Prerequisite: Operating System and Software Versions
- Operating System: – Redhat 7.3
- Software: – libvirtd (libvirt) 2.0.0
Obtain Source Virtual Machine’s information
Before we begin cloning any virtual machine we first need to obtain some basic information about it. The absolute minimum information required about the source virtual machine we are about to clone would be its name and number of disk in use. To get virtual machines name run:
# virsh list Id Name State ---------------------------------------------------- 1 server1.local running Next, we may would like to know the number of disk our source virtual machines is using as well as its location. The information about disks location is optional as it only provides us with a hint on where to store new clone disk files for the sake of consistency: # virsh dumpxml server1.local | grep "source file" <source file='/var/lib/libvirt/images/server1.local.qcow2'/> <source file='/var/lib/libvirt/images/server1.local-1.qcow2'/> <source file='/var/lib/libvirt/images/server1.local-2.qcow2'/>
From the above output we can see that our original virtual machine has three disks stored in location /var/lib/libvirt/images/. Continue reading “Clone KVM-based Virtual Machines on Redhat / CentOS Linux” »