Skip to content

Commit

Permalink
incus-storage-vm: Handle live root disk resize
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Oct 18, 2024
1 parent 6884d48 commit 1c1a512
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions bin/test-incus-storage-vm
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,16 @@ do
incus start v1
waitVMAgent v1

echo "==> Increasing VM root disk size for next boot"
incus config device set v1 root size=11GiB
incus config get v1 volatile.root.apply_quota | grep true
incus stop -f v1
incus start v1
waitVMAgent v1
if [ "${poolDriver}" = "dir" ] || [ "${poolDriver}" = "btrfs" ]; then
echo "==> Increasing VM root disk size for next boot"
incus config get v1 volatile.root.apply_quota | grep true
incus stop -f v1
incus start v1
waitVMAgent v1
else
echo "==> Increasing VM root disk size"
fi

echo "==> Checking VM root disk size is 11GiB"
[ $(($(incus exec v1 -- blockdev --getsize64 /dev/sda) / GiB)) -eq "11" ]
Expand Down

0 comments on commit 1c1a512

Please sign in to comment.