Quickemu – FAQ

How to open the spicy window I just closed?

  1. Go to the folder where you have all your VMs
  2. Get the name of the virtual machine, in this case ubuntu-22.04 then run
spicy --uri="spice+unix://$PWD/ubuntu-22.04/ubuntu-22.04.sock"

How to increase the size of the VM disk?

Lets say the volume of ubuntu-22.04 is 16GB and you want to increase to 50GB.

  1. Shut down the VM completely (not suspended/paused)
  2. Go to the folder where you have all your VMs
  3. Go inside the folder ubuntu-22.04
  4. Find the disk image. It’s inside the VM’s data folder, usually named disk.qcow2
  5. Check current size (optional, sanity check)
    • qemu-img info disk.qcow2
  6. Resize it by setting new size
    • qemu-img resize disk.qcow2 50G
  7. Boot the VM and grow the filesystem/partition inside the VM (ubuntu-22.04) resizing the qcow2 file only extends the virtual disk, the partition table and filesystem inside still need to be expanded.
  8. For which you need to install growpart inside VM
    • sudo apt install cloud-guest-utils
  9. Identify the disk and partition.
    • lsblk
    • Note the disk device (vda) and the partition number you want to grow
  10. Run growpart (aasuming vda and 2)
    • sudo growpart /dev/vda 2
  11. Check again
    • lsblk
  12. Grow the filesystem to use the new partition space (assuming vda2)
    • sudo resize2fs /dev/vda2
  13. Check
    • df -h /