quickemu-project / quickgui

An elegant virtual machine manager for the desktop
MIT License
989 stars 78 forks source link

Is it possible to rezise the VM disk size? #37

Closed olividir closed 2 years ago

olividir commented 2 years ago

Hello, awesome program.

I am wondering, can I resize the VM's partition? I am actually trying to install a program on my Ubuntu inside of Quickgui, but the zip file is over 8 GB in size. When I try to unzip it, the system says not enough space.

I installed the program through AUR (quickgui-bin) and is default in German (can't find any menu to change it). The other version would not install.

Is this possible?

philclifford commented 2 years ago

Hi Ólafur,

Thanks for your interest and kind words.

Sorry I'm not quite clear what you mean by "VM's partition" - do you mean the Qemu disk you're trying to install into? If so, then after downloading the VM you can edit the config file to increase the size(see the README.md), but that should not be needed because quickget should have set it large enough for a supported system. If you do, and there is already a virtual disk that is too small then (with the VM shut down) just delete it and supply a new size parameter and it will be recreated to that size when you run the VM. If you don't want to lose the VM contents, but do not have enough space to unpack an 8GB zip into it then (assuming you have enough space on the host!) you have a few choices: the three main options would be:

  1. Backup the contents, remove the disk, recreate the vm having added a larger disk size to the config, then restore the contents once you have a larger base system
  2. Add another disk of an appropriate size to the vm config (you'll need to use qemu-img for this and will have an easier time with the VM already shut down), then start the VM, find and mount that new disk somewhere and install your 8GB there.
  3. Shut down your VM, use qemu-img to grow the disk, then boot the VM (or the install live ISO as a recovery system) and extent the (partition and ) filesystem into the free space. Depending on the filesystem/installation options you decided on you may be able to do this on-line on a mounted filesystem, but likely not and probably will have to. WARNING: if you have encrypted anything in your VM install ( $HOME, rootFS, LUKS volume...) you will almost certainly lose it all trying to grow it and should either find a wizard or adopt option 1)

There are some guides for growing disks with qemu-img and you should research them, and also growing partitions and filesystems for your VM's OS and also the filesystem (and possibly volume management) you opted for during the install as there are complications, simplifications and significant differences for some scenarios.

So the answer is probably yes: and a VM is a good place to learn and practice these valuable skills. You probably want to snapshot and/or backup your VM disk before you start and plan to need more than one attempt. You might also find that starting afresh with a bigger disk parameter is quicker, easier, and ultimately gets you to a larger working VM without fear of some nasty surprise further down the line.

You could also consider unzipping whatever it is you're trying to install on the host and accessing it from within the VM (in the mapped Public area or using Samba or similar file sharing mechanism to access from within the VM), or using the SPICE client to pass a USB disk with enough room into the VM.

Hope that helps. If I've misinterpreted your situation please correct me (and providing details of your host OS, the VM OS etc and including the output of running the vm from the cli (quickemu -vm <your vm>.conf ) and also what you're trying to install would be helpful). If you need more help it would probably be better to seek help in the Wimpy's World discord

ymauray commented 2 years ago

@olividir was the answer above enough for you?

olividir commented 2 years ago

Probably, my question to resize became obsolete before I got the answer. I will give it a proper look after exams next week.

ymauray commented 2 years ago

Ok, merry Christmas, and feel free to re-open an issue if you need to.