[libvirt] [virt-tools-list] Tracking VM installations
Richard W.M. Jones
rjones at redhat.com
Wed Jul 4 21:09:46 UTC 2012
On Wed, Jul 04, 2012 at 10:45:29PM +0300, Zeeshan Ali (Khattak) wrote:
> We have a requirement in Boxes for showing progress bars on VMs under
> However, we are bit clueless on how that could be achieved. The only
> idea I have is to know the number of passes (reboots) and typical disk
> usage in each pass for "every" (we only do this for express installs
> so we don't need this for all) OS and estimate the progress based on
> that knowledge. If that idea is worth looking into, we'll need this
> information in libosinfo and hence me cross-posting this to
> Other ideas welcome! Keep in mind that we don't need to be very
> accurate, just accurate enough to not annoy the user.
It's a tricky one :-)
You can take a screenshot of the guest (assuming a visual
installation). Oz does this. Displaying an icon-sized screenshot
might be a surrogate for displaying a progress bar, since many
installers will display a progress bar themselves.
You can use libguestfs (specifically, virt-df) to display the amount
of disk space used in the guest. For many installers, disk space will
monotonically increase as it proceeds, although of course you've no
idea what the final disk usage will be. You can turn this into a
pulse-mode progress bar.
Oz also uses network and disk activity to tell if the installer is
making progress. This again doesn't tell you when the installer is
going to finish, but it allows you to do a pulse-mode bar.
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.
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
More information about the libvir-list