When I create a new Virtual Machine in Virtual Box, I always choose "Dynamically expanding storage".
And when I first install the gest OS (usually Windows to run iTunes) it starts very small, just Windows 7 and iTunes on it. (My iTunes library is usually on another disk).
I am playing with virtual hosts in Fedora 12, trying to install various versions of Windows, various distro of Linux, and some other OS. One problem is that I don't always know how much disk space is need for each of the OS. Some may change the disk usage after install, for example, online update for Windows.
I have an image of an existing partition generated with dd if=/dev/sdXN of=image.bin. Now I want to use this image as the basis for a virtual machine. I know how to convert the image into a format that VirtualBox can use.
The problem is that the "disk" image is really just the image of one partition and thus does not contain an MBR or a partition table.
How do you decrease or shrink the size of a KVM virtual machine disk?
I allocated a virtual disk of 500GB (stored at /var/lib/libvirt/images/vm1.img), and I'm finding that overkill, so now I'd like to free up some of that space for use with other virtual machines. There seems to be a lot answers on how to increase image storage, but not decrease it.
I'm looking at the differences between using a file versus a partition to store a virtual disk image in VM use. The common knowledge is that partition-based images are faster than file-based images because of a decreased overhead. It makes sense, but I've never seen any actual numbers.
My own testing bears out a different result.
Minimum system
requirements
for Xubuntu (...)
5 GB of disk space
With Lubuntu, you can use computers with even less memory.
I read the above as Xubuntu and Lubuntu both requiring a minimum of 5 GB free disk space.
How to mount compressed disk image?
Here is my situation: I have hard drive with (fresh) OS installation. I made compressed image of that disk to another disk.
How to make compressed disk image to file (on another disk):
sudo cat /dev/sdb | gzip > disk.img.gz (sdb is source)
If free space is zero-ed, compression is much better.
We use a StarWind SAN which has the concept of thin-provisioned disks that grow as needed. You can allocate a 4TB drive but it starts off tiny and grows as blocks are written to the virtual disk (via iSCSI).
The virtual disk used for our main file system has grown to 1.5TB and has plenty of virtual space left (2.5TB) but disk space on the SAN is another matter - it's getting a bit tight.
I need to extend the root partition of a virtual machine (VM) using LVM (Logical Volume Manager) . I can afford a few minutes of downtime so a VM shutdown/reboot is fine.
The virtual hard disk is in qcow2 format but I can translate it to a raw format easily if it helps.