New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to autoresize with kvm?
picateclas
Member
in General
Hello everyone,
I'm seeing that providers like digitalocean expand the space in the VM automatically when you reboot and upgrade. Vultr seems to be doing it too.
How do they do it? Can this be done with proxmox and KVM?
Greetings
Comments
There are several tools for this, like virt-resize followed by live resize2fs in the guest, or if you use lvm can just resize the disk and then resize partition/filesystem in the guest (http://www.naturalborncoder.com/virtualization/2014/12/05/increasing-the-size-of-a-qcow2-image-under-kvm/).
For Centos7 example with xfs filesystem..
yum install -y epel-release & yum install -y cloud-utils-growpart
Add to rc.local or some script
growpart /dev/sda 1 & xfs_growfs /dev/sda1