Recently, we needed to increase the size of the root image
for the fedora-23
TemplateVM
.
We had to do this as we wanted to install in /opt
a few IDEs, including android-studio
which takes a lot of space when accompanied by the Android SDK
.
Following the excellent guide at https://www.qubes-os.org/doc/resize-root-disk-image/, we did the following:
- Made sure that the
fedora-23
TemplateVM
and all VMs based on that template were shut down.
This included stopping thesys-firewall
andsys-net
VMs as well (in this order). - Then, in the
VM Settings
window at theBasic
tab for thefedora-23
TemplateVM, we disabled the networking by selectingnone
on theNetVM:
drop-down list and pressedOK
to apply the settings changes.
- Following, in
dom0
Terminal Emulator
we run the following command:
truncate -s 40G /var/lib/qubes/vm-templates/fedora-23/root.img;
- Afterwards we started the
fedora-23
TemplateVM
and run the following in the terminal:
sudo resize2fs /dev/mapper/dmroot;
Please note that if your output isNothing to do!
then most likely you forgot a VM that is based on thefedora-23
TemplateVM
running. Normally your screen should print something along the lines ofResizing the filesystem..
. - Next, we shut down the
fedora-23
TemplateVM
, and went to theVM Settings
window to enable networking by selecting whatever we had there before (for us it wasdefault (sys-firewall)
). - Finally, we could start using our VMs, their
root.img
were of the new extended size.
This post is also available in: Αγγλικα