How to expand VM memory, CPU and disks
In this article we’ll cover three practical cases for expanding resources in a VM managed with libvirt/KVM:
Increase the number of vCPUs (cores) Increase RAM memory Expand disk and filesystem inside the guest We’ll use virsh commands, libguestfs tools where applicable, and standard utilities inside the guest (growpart, resize2fs, xfs_growfs, LVM). I’ll include “hot” methods when the system supports them and safe cold alternatives.
Note: To run without sudo, your user must belong to the libvirt and kvm groups.