22.3. Live KVM migration with virsh
virsh command. The migrate command accepts parameters in the following format:
# virsh migrate --live GuestName DestinationURLGuestName parameter represents the name of the guest which you want to migrate.
DestinationURL parameter is the URL or hostname of the destination system. The destination system must run the same version of Red Hat Enterprise Linux, be using the same hypervisor and have libvirt running.
This example migrates from test1.example.com to test2.example.com. Change the host names for your environment. This example migrates a virtual machine named RHEL4test.
Verify the guest is running
From the source system,test1.example.com, verifyRHEL4testis running:[root@test1 ~]# virsh list Id Name State ---------------------------------- 10 RHEL4 running
Migrate the guest
Execute the following command to live migrate the guest to the destination,test2.example.com. Append/systemto the end of the destination URL to tell libvirt that you need full access.# virsh migrate --live
RHEL4test qemu+ssh://test2.example.com/systemOnce the command is entered you will be prompted for the root password of the destination system.Wait
The migration may take some time depending on load and the size of the guest.virshonly reports errors. The guest continues to run on the source host until fully migrated.Verify the guest has arrived at the destination host
From the destination system,test2.example.com, verifyRHEL4testis running:[root@test2 ~]# virsh list Id Name State ---------------------------------- 10 RHEL4 running
Note

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.