From Fedora Project Wiki

Revision as of 09:16, 13 April 2011 by Mamasun (talk | contribs) (черновой вариант страницы)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Описание

This test case checks that live migration properly cleans up after itself if the migration were to fail for any reason. There are three stages to live migration:

  1. Prepare runs on the destination machine, and sets up the incoming qemu process for migration
  2. Perform runs on the source machine, and actually migrates the guest
  3. Finish runs on the destination machine, and cleans up after the migration is complete (or has failed).

If Prepare fails, the qemu process on the destination machine should be destroyed, and nothing further should be done. If Perform fails, then it should return a negative error code, which will be passed to Finish, which should clean up the qemu on the destination machine. Only if both Prepare and Perform succeeds should Finish start the VM on the destination machine and destroy the VM on the source machine.


Как проводить тестирование

  1. On the source machine, start the guest.
  2. Once the guest has fully booted, find out the IP address of the guest (by logging into the guest and running ifconfig, or whatever is equivalent in the guest OS of your choice). From the source machine, start a ping to the guest:

    $ ping <guest-IP>

  3. Now on the source machine execute:

    $ virsh migrate --live <guestname> qemu+ssh://<destination host>/system foo://bar

  4. Now on the destination machine execute:

    # iptables -A INPUT -m multiport --dports 49152:49216 -j DROP

  5. Now on the source machine execute:

    $ virsh migrate --live <guestname> qemu+ssh://<destination host>/system

Ожидаемые результаты

  1. After executing the virsh migrate command with the last parameter of foo://bar, the prepare step should fail, the migration should fail, and the guest should still be running on the source machine.
  2. After executing the virsh migrate command in step 5, the perform step of migration should fail, and the guest should still be running on the source machine.