If you already have an installed VM you can simply copy the installed VM This would allow you to go through the installation process only once although you may have to do some editing...
First copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host.
Next, run virsh dumpxml VMNAME > domxml.xml on the source host and copy this xml to the dest. host
Then, on the destination host run virsh define domxml.xml
and start the VM.
Addendum: If the VM has snapshots that you want to preserve, you should dump the snapshot xml-files on the source with virsh snapshot-dumpxml $dom $name > file.xml
for each snapshot in the snapshot list of the VM virsh snapshot-list --name $dom
.
Then on the destination use virsh snapshot-create --redefine $dom file.xml
to finish migrating the snapshots.
If you also care about which snapshot is the current one, then additionally do on the source:
virsh snapshot-current --name $dom
and on the destination:
virsh snapshot-current $dom $name
Note:
If the disk location differs, you need to edit the xml's devices/disk node to point to the image on the destination host
If the VM is attached to custom defined networks, you'll need to either edit them out of the xml on the destination host or redefine them as well (virsh net-dumpxml > netxml.xml and the virsh net-define netxml.xml && virsh net-start NETNAME & virsh net-autostart NETNAME)
Sources:
This answer shamelessly modeled on answers found on
https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
– nadermx Feb 27 '18 at 15:22