From 554e5fdcec25368daf2bb96c68fd5fc80486ed82 Mon Sep 17 00:00:00 2001 From: Brennan Novak Date: Fri, 20 Nov 2015 00:57:10 +0100 Subject: [PATCH] harmonized names for 'Resizing' things and improved Root Disk Size (QubesOS/qubes-issues#1441) --- en/configuration/resize-disk-image.md | 4 +- en/configuration/resize-root-disk-image.md | 46 ++++++++++++++-------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/en/configuration/resize-disk-image.md b/en/configuration/resize-disk-image.md index 77ba022e..683b5549 100644 --- a/en/configuration/resize-disk-image.md +++ b/en/configuration/resize-disk-image.md @@ -7,8 +7,8 @@ redirect_from: - /wiki/ResizeDiskImage/ --- -Resizing Disk Image -------------------- +Resize Disk Image +----------------- There are several disk images which can be easily extended. But pay attention to the overall consumed space of your sparse disk images. diff --git a/en/configuration/resize-root-disk-image.md b/en/configuration/resize-root-disk-image.md index 66a4e862..1fa833bc 100644 --- a/en/configuration/resize-root-disk-image.md +++ b/en/configuration/resize-root-disk-image.md @@ -7,28 +7,40 @@ redirect_from: - /wiki/ResizeRootDiskImage/ --- -Resizing `root.img` Size --------------------------- +Resize Root Disk Image +---------------------- -The safest way to increase the size of `root.img` is to do it for a standalone -VM (qvm-create --standalone) - which has its own root filesystem -(copy of template, instead of smart sharing). -But it should also work for a normal template (as long as changes in the -template between reboots didn't exceed 10G). +The safest way to increase the size of `root.img` is to turn your TemplateVM into a StandaloneVM. Doing this means it will have it's own root filesystem *(StandaloneVMs use a copy of template, instead of smart sharing)*. To do this run `qvm-create --standalone` from `dom0` Konsole. -Replace the size and the path (name) of the template as wished and run your -modified command: +### Resize a StandaloneVM Root Image -``` -truncate -s 20G /var/lib/qubes/vm-templates/fedora-21/root.img -``` +In `dom0` Konsole run the following command (replace the size and path): -Then start your template or standalone VM and run: +~~~ +truncate -s 20G /var/lib/qubes/appvms/standalonevm/root.img +~~~ -``` +Then start Terminal for this StandaloneVM and run: + +~~~ sudo resize2fs /dev/mapper/dmroot -``` +~~~ -after that shutdown the template. +Shutdown the StandaloneVM and you will have extended the size of it's `root.img` -Then you should have extended `root.img` in your VM/template + +### Resize a TemplateVM Root Image + +In `dom0` Konsole run the following command (replace the size and path):*Make sure changes in the TemplateVM between reboots didn't exceed 10G.* + +~~~ +truncate -s 20G /var/lib/qubes/vm-templates/fedora-21/root.img +~~~ + +Then start Terminal for this TemplateVM and run the following: + +~~~ +sudo resize2fs /dev/mapper/dmroot +~~~ + +Shutdown the TemplateVM and you will have extended the size of it's `root.img`