GCE Images with Imagefactory/oz
Richard W.M. Jones
rjones at redhat.com
Wed Jun 25 16:12:38 UTC 2014
On Wed, Jun 25, 2014 at 03:29:00AM -0500, Renich Bon Ciric wrote:
> Ok, playing around with the mighty oz-install now.
> https://github.com/renich/gce-images-fedora/blob/master/imagefactory/f20.tdl
So I've only skimmed the Google Cloud Engine docs, but this would be
how you could do this with virt-builder ...
$ virt-builder fedora-20 --output disk.raw --size 10G \
--install bash-completion,denyhosts,irqbalance,ntp,patch,rsyslog,yum-cron-daily \
--hostname metadata.google.internal \
--write '/etc/hosts:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
169.254.169.254 metadata.google.internal metadata
' \
# use --write or --upload for the other files
--delete /etc/sysconfig/networking \
--edit '/etc/ntp.conf:
/^server [1-3]\.fedora.*$/d' \
--run-command 'systemctl disable firewalld.service iptables.service' \
# (I got bored, there are more commands ...)
$ tar zcf fedora-20.tar.gz disk.raw
No root needed!
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
More information about the cloud
mailing list