guest-migrate: add autostart command

Signed-off-by: Mark O Brien <markobri@redhat.com>
This commit is contained in:
Mark O Brien 2022-02-15 17:01:53 +00:00
parent ef099b722f
commit d71d6cdda7

View file

@ -40,10 +40,16 @@ virsh dumpxml guestname > guest.xml
depending on if the system was originally xen or such. I normally need depending on if the system was originally xen or such. I normally need
to compare an existing xml on the target system and the one we dumped to compare an existing xml on the target system and the one we dumped
out to make up the differences. out to make up the differences.
. Define the guest on the new machine: 'virsh define guest.xml'. . Define the guest on the new machine:
....
virsh define guest.xml
....
Depending on the changes in the xml this may not work and you will need Depending on the changes in the xml this may not work and you will need
to make many manual changes plus copy the guest.xml to to make many manual changes plus copy the guest.xml to
`/etc/libvirtd/qemu` and do a `/sbin/service libvirtd restart` `/etc/libvirtd/qemu` and do a `/sbin/service libvirtd restart`
. Insert iptables rule for nc transfer: . Insert iptables rule for nc transfer:
+ +
.... ....
@ -68,6 +74,13 @@ to it.
.... ....
``virsh start guest`` ``virsh start guest``
.... ....
. To ensure that the new vm starts automatically after boot run:
....
virsh autostart guest
....
. On the source host, rename storage and undefine guest so it's not . On the source host, rename storage and undefine guest so it's not
started. started.
. In ansible change the host_vars to reflect the new host . In ansible change the host_vars to reflect the new host