[Libguestfs] How to make a Google Compute Engine boot image with guestfish?

Richard W.M. Jones rjones at redhat.com
Fri Feb 17 11:14:57 UTC 2017


On Fri, Feb 17, 2017 at 09:15:09PM +1100, Andrew Stuart wrote:
> I have a zipfile containing a kernel and an initramfs. These are all
> that is needed to boot an in-memory operating system.  I want to put
> these into an image suitable for booting on Google Compute Engine,
> using syslinux or extlinux.

I've not specifically tried it with GCE, but a good starting point
might be this Perl script:

  https://rwmj.wordpress.com/2013/04/04/new-in-libguestfs-use-syslinux-or-extlinux-to-make-bootable-guests/

I skimmed the GCE requirements, and you'll probably need to modify
that script a little bit, particularly to make the size be an exact
multiple of a gigabyte (currently it uses a fixed 100MB size).  Also
you'll need to modify it to upload your kernel and initramfs instead
of the ones from /boot on the host.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list