While expanding qcow2 images is easy, finding an easy way to shrink them was not.
Recently, my Matrix VM ran out of disk space, while my miscellaneous hosting VM had way too much space.
Since resizing images is often useful, I decided to make a fairly simple tutorial on how to expand and shrink the images.
Expanding images This is fairly straightforward. Due to the design of qcow2 images, you don’t even need to have the disk space available right away.
While GRUB usually works just fine, there can be cases where everything doesn’t work as expected and you might just find yourself in a situation where you can’t get GRUB to load, especially if you have more than one OS installed. These instructions have helped me fix most that problem in most cases.
Capital letters in commands in the following instructions are variables which you should replace with appropriate values for your setup.
Hello. I’m Tulir.
I’m a programmer, GNU/Linux user, sysadmin and a fan of Star Trek and Doctor Who.
I’ll be writing various tutorials and other possibly interesting and/or useful things here.