Skip to content

Commit

Permalink
tests/storage-volumes-vm: Test VM disk device unmount (#409)
Browse files Browse the repository at this point in the history
Tests for canonical/lxd#14929

I have verified that these fail before applying those changes.
  • Loading branch information
tomponline authored Feb 12, 2025
2 parents df6b755 + 8f3151a commit 77ca544
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/storage-volumes-vm
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ do
lxc storage volume attach "${poolName}" virtual-machine/v2 v1 v2-root
sleep 3
lxc exec v1 -- test -L /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_v2--root

# `lxc stop [-f]` won't fail if unmounting the device fails
# `detach` will fail if the unmount fails, so just detach/reattach
lxc storage volume detach "${poolName}" virtual-machine/v2 v1
lxc storage volume attach "${poolName}" virtual-machine/v2 v1 v2-root
lxc stop --force v1

# Can't unset security.shared when v1's root volume is attached elsewhere
Expand Down

0 comments on commit 77ca544

Please sign in to comment.