Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tests/testscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,27 @@ def test_live_migration(self):
)
assert wait_for_ssh(controllerVM)

def test_live_migration_no_p2p(self):
"""
Test the live migration via virsh between 2 hosts without using peer-to-peer
connection (--p2p is not set).
"""

controllerVM.succeed("virsh define /etc/domain-chv.xml")
controllerVM.succeed("virsh start testvm")

assert wait_for_ssh(controllerVM)

# Explicitly use IP in desturi as this was already a problem in the past
controllerVM.succeed(
"virsh migrate --domain testvm --desturi ch+tcp://192.168.100.2/session --persistent --live"
)
assert wait_for_ssh(computeVM)
computeVM.succeed(
"virsh migrate --domain testvm --desturi ch+tcp://controllerVM/session --persistent --live"
)
assert wait_for_ssh(controllerVM)

def test_live_migration_with_hotplug(self):
"""
Test that transient and persistent devices are correctly handled during live migrations.
Expand Down Expand Up @@ -1030,6 +1051,7 @@ def suite():
suite.addTest(LibvirtTests("test_hotplug"))
suite.addTest(LibvirtTests("test_libvirt_restart"))
suite.addTest(LibvirtTests("test_live_migration"))
suite.addTest(LibvirtTests("test_live_migration_no_p2p"))
suite.addTest(LibvirtTests("test_live_migration_with_hotplug"))
suite.addTest(LibvirtTests("test_live_migration_with_hugepages"))
suite.addTest(LibvirtTests("test_live_migration_with_hugepages_failure_case"))
Expand Down