I’m using a LVM storage for virtual machines. So resizing them is pretty easy.
Note: Replace the
XX below with your virtual machines ID, as you can find out with e.g.
onevm list or
1 2 3
Then, you need to tell libvirt about the new size. This can be done with the following command:
Note: The –path argument is the device name of the partition used by the guest. You can find it
out by using
virsh domblklist one-XX
Now simply login your guest machine and adapt the filesystem (no reboot required)
Unfortunately, the new size will not display in the
SIZE attribute of the image in OpenNebula (as
oneimage show XX).
Apparently this is only set when creating the image.
As far as I know, this only works when using the
scsi block drivers. In OpenNebula you
can e.g. set
DEV_PREFIX="vd" in your image configuration to use
Many thanks to Humble Chirammal
for pointing out