[libvirt] [virt-tools-list] Tracking VM installations

Daniel P. Berrange berrange at redhat.com
Thu Jul 5 09:19:10 UTC 2012


On Thu, Jul 05, 2012 at 08:54:20AM +0100, Richard W.M. Jones wrote:
> On Thu, Jul 05, 2012 at 04:49:49AM +0300, Zeeshan Ali (Khattak) wrote:
> > On Thu, Jul 5, 2012 at 12:09 AM, Richard W.M. Jones <rjones at redhat.com> wrote:
> > > You can use libguestfs (specifically, virt-df) to display the amount
> > > of disk space used in the guest.
> > 
> > For target disk, we use libvirt's storage volume API and that provides
> > us API to get current allocation.
> 
> libvirt storage API gives you a different number (blocks allocated) so
> it won't work for VMs backed with LVs or preallocated files.  virt-df
> looks inside the filesystem(s).  However a guest agent will give you
> the most accurate figures when the guest is running, and I imagine a
> guest agent may even be able to query the installer somehow.
> 
> > > Finally I've always thought it would be a good idea if guests
> > > communicated information down to the host about progress, whether that
> > > is progress booting or progress installing.  There is (on PC hardware)
> > > even an I/O port reserved for this purpose (port 0x80)!  You'd have to
> > > get buy-in and get it upstream in qemu and every installer out there.
> > > http://stackoverflow.com/questions/6793899/what-does-the-0x80-port-address-connects/6796109#6796109
> > 
> > That would indeed be awesome but it seems way too much work and fight
> > (not to mention, its impossible to fix this in proprietary OSs if they
> > don't already support this) for just one progress bar.
> 
> I wouldn't necessarily discount this one.  It's a standard of sorts,
> and useful in other scenarios that we very much care about,
> eg. getting a libvirt event when a guest has started booting, finished
> booting, is ready for login, etc.

IMHO this is all a job for a guest agent to do using virtio-serial.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list