![qemu img resize qemu img resize](https://mike42.me/blog/wp-content/uploads/2016/03/2016-04-disk01.png)
Guest: Shutdown the Guest Virtual Machineīefore getting started, lets just summarise some details about the guest, in particular the LVM Physical Volumes, Logical Volumes and filesystems. Decreasing the size is a bit different and has greater potential of data loss. Note that these steps only apply for increasing the size. On the guest: Increase the file system size.On the guest: Increase the LVM physical and logical volumes.On the guest: Increase the disk partition.On the host: Increase the size of the guests image.I've basically copied his instructions, with some minor changes to resizing the guest image. Mathew Branwell gives a detailed description of the steps involved. In this case I will increase it from 20GB to 45GB. My goal is to increase the size of the guests hard disk, i.e. In the guest virtual machine I am using LVM and ext4 filesystems. (The -s option for ls shows the actual size). But note that as Linux ext4 file systems support sparse files, it only takes up 14GB on the disk, as the guest is only using 14GB of the 20GB space available.
![qemu img resize qemu img resize](https://i.stack.imgur.com/CxAbo.jpg)
One of the guests image is stored on the host ls -lhs /var/vm/ġ4G -rwxr-xr-x 1 libvirt-qemu kvm 20G May 18 14:26 it.imgĬurrently the image is allocated 20GB of space. My instructions for setting up the virtual machines are here.
![qemu img resize qemu img resize](http://woshub.com/wp-content/uploads/2020/05/qemu-img-resize-trying-to-reduce-virtual-disk-si.png)
The guests are raw images (as opposed to QEMU qcow2 or disk partitions). Both the host and guest operating systems are Ubuntu 12.04 LTS. Scenario: I am running several virtual machine guests using QEMU/KVM. Increasing a KVM Virtual Machine Disk when using LVM and ext4