On Mon, Dec 07, 2009 at 03:33:41PM +0100, Pierre Riteau wrote:
This is much better (on my test system it writes at about 15 MB/s). However, it is still far from what the hardware can do (more than 60 MB/s).
It'd be interesting to know whether the problem is with reading from the ISO image, or with writing to the disk, or with all the processing that tar and the virtual kernel is doing. Tricky to measure that though ...
Now the last problem is that I need to install a bootloader. Can I easily install grub in the appliance, or do I need to recreate a new one?
You should be able to issue the grub-install command: http://libguestfs.org/guestfish.1.html#grub_install IIRC the syntax is something like: grub-install /boot hd0
However we found experimentally that the fastest method of all for creating distributions was to prebuild an ext2/3/4 image, and 'dd' it over to the target partition, then resize it to the final (larger) size. This method is extremely quick, enabling us to build Fedora images in just a minute or two:
http://rwmj.wordpress.com/2009/11/23/prebuilt-distributions-part-2/#content
I've read your blog, this is interesting. I will see how I can leverage that.
I'm pretty certain this is the way to go. Note that the 'dd' command hasn't made it into a released version of libguestfs. It was added in this commit, just after 1.0.79 was released: http://git.annexia.org/?p=libguestfs.git;a=commit;h=22e531bc459309d9a871a845... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/