[fedora-virt] info on resize support for virtio disk

Dennis Jacobfeuerborn dennisml at conversis.de
Sat Apr 30 00:41:54 UTC 2011


On 04/30/2011 01:19 AM, Richard W.M. Jones wrote:
> On Fri, Apr 29, 2011 at 05:01:42PM +0200, Gianluca Cecchi wrote:
>> I extend the disk with qemu-img at host side:
>> qemu-img resize /var/lib/libvirt/images/f15_001.img +1G
>>
>> In guest neither partprobe nor kpartx show any change...
>> I put the xml definition in disk.xml and try to update device from
>> libvirt point of view (my domain id is 4):
>>
>> [root ~]# virsh update-device 4 disk.xml
>> error: Failed to update device from disk.xml
>> error: unsupported configuration: disk bus 'virtio' cannot be updated.
>
> At the qemu level, what has to happen is that the "block_resize"
> command gets sent to the human monitor.  It appears from the output
> above that libvirt doesn't support that.
>
> However a bigger problem is that guests don't see the resize if any
> active (eg. mounted / in use) partition is on the disk, and since
> almost any useful disk is going to have multiple active partitions,
> this really is a show-stopper.
>
> So basically we don't support this in any useful sense of the word.  I
> always say from experience that resizing disks is *much* harder than
> people imagine.  I've not seen any guests that can do anything useful
> when the disk is (online) resized.
>
> I suggest offline resizing and virt-resize :-)

What you can do (at least using Xen on Centos but I presume KVM supports 
this too) is to add a new disk to the VM and then add it to the volume 
group in the Guest. That way you can extend for example the root partition 
while keeping the VM live the whole time.

Regards,
   Dennis


More information about the virt mailing list