Consolidate the libvirt XML serial code.

There were two places that we doing essentially the same
thing; consolidate them here.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Do an up-front ssh check to make sure we can login.

On any OS with parallel startup, it could be the case that
the operating system sets an IP address and runs reportip
*before* ssh key generation has completed (or sshd has
started).  We don't generally see this problem, as I
think most of the time KVM is too fast, but it is a
problem in theory.  This commit tries to connect to the
guest several times with a dummy command just to ensure
the connection is up.  Once it is confirmed to be up,
the rest of the code runs.

Thanks to Geert Jansen for the heads up.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Add a fix for unclean shutdown with Fedora guests.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Update the oz-install man page to document -s/--disk

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Make configurable libvirt memory work again.

We expected to get a value in megabytes from the
configuration file.  Libvirt expects a value in kilobytes.
Therefore, we were taking the value from the configuration
and multiplying by 1024.  However, I forgot that
config_get_key() returns strings, not integers.  Multiplying
a string by a number gives you that many copies of the
string, which is not what we want.  Instead, cast to
an integer before multiplying.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Handle broken symlinks on ISOs

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Fix up ISO checksum checking.

The ISO checksum is actually not 1's complement,
since carry bits are thrown away.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Depend on libguestfs >= 1.18

Otherwise, customization and ICICLE generation on Fedora
17 and 18 will not work.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Fix up the unittests to work with python2

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Release 0.10.0

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Bump version to next release of Oz

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Get rid of a silly "hasattr" for the cmdline.

Instead, pass it in, which is a much saner way to do
things.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Cleanup the customize code.

This should be no functional change, but it makes the code
much easier to understand.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Support url based installs for Ubuntu

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Switch to slightly more compact exception handling

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Cleanup the copyright notices.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Added ability to create qcow2 images.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Add in a documentation string to _parse_disk_size

Signed-off-by: Chris Lalancette <clalancette@gmail.com>