Skip to content

Commit

Permalink
tests/vm-migration: check VM location before/after move
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Dec 17, 2024
1 parent 8c4130d commit 792ba21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/vm-migration
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@ lxc exec member1 -- lxc config device add v1 vol1-disk disk pool=ceph source=vol
lxc exec member1 -- lxc start v1
sleep 60

# Ascertain that the VM is indeed on member1.
[ "$(lxc exec member1 -- lxc list -c L -f csv v1)" = "member1" ]

# Move the VM to member2 but with a timeout as this sometimes hangs indefinitely but when it works it's fast.
lxc exec member1 -- timeout 600 lxc move v1 --target member2

# Verify the migration did succeeded and the VM is running on member2.
[ "$(lxc exec member1 -- lxc list -c L -f csv v1)" = "member2" ]

# shellcheck disable=SC2034
FAIL=0

0 comments on commit 792ba21

Please sign in to comment.