How can I extend / increase / grow a virtual Disk in KVM?. I personally use KVM for all Linux virtualization projects. Sometimes I need to extend or add disk space to my running VM (guest) to satisfy growing software requirements. KVM uses QEMU which supports several image types, among them raw, cow, qcow, qcow2, vmdk, vdi among others available.
The “native” and most flexible type is qcow2, which supports copy on write, encryption, compression, and VM snapshots.
Step 1: Shut down the Virtual Machine on KVM
Before you can extend your guest machine Virtual disk, you need to first shut it down.
$ sudo virsh list
Id Name State
-----------------------
4 rhel8 running
If your guest machine is in running state, power it off using its ID or Name.
$ sudo virsh shutdown rhel8
Domain rhel8 is being shutdown
Confirm that it is truly down before proceeding to manage its disks.
$ sudo virsh list
Id Name State
--------------------
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.