[Rdo-list] Automatic resizing of root partitions in RDO Icehouse

Richard W.M. Jones rjones at redhat.com
Sat May 17 16:10:47 UTC 2014


On Fri, May 09, 2014 at 01:04:56PM +0000, St. George, Allan L. wrote:
> I'm sure someone could make this better, but this is what I've been
> using and it works well:

[...]

Here's a shorter and faster method.  It needs virt-builder 1.26 which
is in Fedora >= 20.  You don't need to (and should not) run it as root.

virt-builder centos-6 \
  --size 10G \
  --format qcow2 \
  --root-password password:123456 \
  --run-command 'rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm https://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm' \
  --update \
  --install cloud-utils,cloud-init,parted,git,puppet \
  --edit '/etc/cloud/cloud.cfg:
     s/(cloud_init_modules)/$1\n - resolv-conf/' \
  --edit '/etc/ssh/sshd_config:
     s/.*PermitRootLogin.*/PermitRootLogin yes/;
     s/.*PasswordAuthentication.*/PasswordAuthentication yes/'

Well there's some puppet configuration that I got bored converting,
but you can use --edit or --run-command or --firstboot-command to do
essentially arbitrary customization.  There's much more information in
the manual.

I guarantee this will run at least an order of magnitude faster or
your money back.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the dev mailing list