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>
Support url based installs for Ubuntu
Update tests for Ubuntu url installs and current releases