aboutsummaryrefslogtreecommitdiff
path: root/IDEAS.md
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2020-05-09 21:34:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2020-05-09 21:34:23 -0300
commit521838ecfee5095770214a2246c0c95307215bd1 (patch)
tree2e7c0bfed28639c3b3acd9e3e64622c3d2f0b139 /IDEAS.md
parent82373cd0c432ff6043fa45120d0de846a2e306c1 (diff)
downloadkvmx-521838ecfee5095770214a2246c0c95307215bd1.tar.gz
kvmx-521838ecfee5095770214a2246c0c95307215bd1.tar.bz2
Ideas: image resize action
Diffstat (limited to 'IDEAS.md')
-rw-r--r--IDEAS.md18
1 files changed, 18 insertions, 0 deletions
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