From 521838ecfee5095770214a2246c0c95307215bd1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 9 May 2020 21:34:23 -0300 Subject: Ideas: image resize action --- IDEAS.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'IDEAS.md') diff --git a/IDEAS.md b/IDEAS.md index c83fedd..ac2f6bf 100644 --- a/IDEAS.md +++ b/IDEAS.md @@ -23,3 +23,21 @@ * Pull from remote repository and check source integrity. * Automatic VM (re-)creation and/or provisioning. * Status report. +* Image resize action, doing something like this, thanks to + https://ahelpme.com/linux/online-resize-of-a-root-ext4-file-system-increase-the-space/ + + # poweroff + kvmx poweroff $guest + + # resize image + qemu-img resize `kvmx list_image $guest` +5G + + # power up + kvmx up $gues + + # resize virtual machine root fs - while the partition is mounted! + # this parted command currently need to be done manually + echo resizepart 2 -1 | kvmx ssh $guest sudo parted /dev/vda + kvmx ssh $guest sudo resize2fs /dev/vda2 + kvmx ssh $guest sudo touch /forcefsck + kvmx ssh $guest sudo poweroff -- cgit v1.2.3