- list vm in the host:
virsh list
[root@host1 ~]# virsh list
Id Name State
2 server2 running
- If the guest to be cloned is running, suspend or shutdown it first
virsh shutdown server2
- To clone a KVM guest, user virt-clone command
virt-clone --original server2 --auto-clone
- The new vm will be named as server2-clone. Its configuration xml are saved and a new disk image is allocated for it. You can start it now.
virsh start server2-clone
If new vm report any error, you may need to edit vm xml file manually.
read virt-clone manual for further information
man virt-clone