Exercise: Cloning VMs with virt-clone

  • Clone kvm1 to a new VM host, kvm3, by executing the command below:
    virt-clone --connect=qemu:///system -o kvm1 -n kvm3 -f /home/hostadm/KVM/kvm3.img
    
  • Check if the new VM is in the list, start it, then login to its console:
    virsh list --all
    virsh start kvm3
    virsh console kvm3
    
  • Fix the host name and the MAC address:
    remove line with "127.0.0.1 kvm1" in /etc/hosts file, then
    replace kvm1 with kvm3 in /etc/hostname file.
    reboot
    
    After reboot, the new VM should come up with the correct host name and the MAC address.