On Wed, Jul 04, 2012 at 10:45:29PM +0300, Zeeshan Ali (Khattak) wrote: > Hi, > > We have a requirement in Boxes for showing progress bars on VMs under > installation: > > https://github.com/gnome-design-team/gnome-mockups/raw/master/boxes/boxes-install6.png > https://bugzilla.gnome.org/show_bug.cgi?id=679107 > > 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 > virt-tools-list. > > 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. https://github.com/clalancette/oz/blob/74d99497840e3bade4d679ed94cf9a4628827bcc/oz/Guest.py#L624 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. http://libguestfs.org/virt-df.1.html 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. https://github.com/clalancette/oz/blob/74d99497840e3bade4d679ed94cf9a4628827bcc/oz/Guest.py#L569 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. ttp://stackoverflow.com/questions/6793899/what-does-the-0x80-port-address-connects/6796109#6796109 Rich. -- 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. http://et.redhat.com/~rjones/virt-top -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list