When cloning a VM, an unpleasant bug occurs related to its configuration file. This file contains a section:
<channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-test/org.qemu.guest_agent.0'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel>
where test is the VM name. When cloning using the command:
the name in the path does not change from test to test2, and if the VM test is not running, the new VM test2 will not start and will display the following error:
To fix this, you need to manually change the VM name in the path from test to test2, resulting in:
<channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-test2/org.qemu.guest_agent.0'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel>
and then execute the command:
