The trick for modifying the libvirt XML is to use virsh edit {machine name}
You can also use virsh dump {machine name}, edit the file, then use virsh define /path/to/machine-name.xml
Of course, if you use a volume manager and there is free storage in the volume group, then you can expand the specific logical volume without much effort. No need to move files around. For example,
Code:
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg01-libvirt--01 ext4 134G 131G 2.8G 98% /var/lib/libvirt
is for 1 single, file-based QCOW VM. All my other VMs are managed by LVM directly and cannot be mounted on the VM host system at all.
Code:
$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
libvirt-01 vg01 -wi-ao---- 137.00g
lxd vg00 -wi-ao---- 50.00g
Mint21.1 vg00 -wi-ao---- 40.00g
lv-vpn09-2004 vg00 -wi-ao---- 7.50g
lv-xen41-1804 vg00 -wi-ao---- 12.50g
lv-zcs45-1804 vg00 -wi-ao---- 35.00g
usrv2404 vg01 -wi-a----- 15.00g
ubuntu22.04-srv-2 vg00 -wi-a----- 15.00g
ubuntu2204-srv vg00 -wi-a----- 15.00g
None of those are mounted outside their specific VMs ... er ... except the libvirt-01 LV. 137G has some overhead for the ext4 file system (134G usable).
Bookmarks