[virt-tools-list] How to determine if installation is successful?

Kay Williams kwilliams at renditionsoftware.com
Tue Mar 8 20:17:49 UTC 2011


Rich and Cole, thanks for the quick and helpful suggestions. The kickstart
approach Cole mentioned will work for the scenario I outlined, but I will
also take a look at libguestfs/guestfish as a general solution for
evaluating vm state. 

Kay

-----Original Message-----
From: Richard W.M. Jones [mailto:rjones at redhat.com] 
Sent: Tuesday, March 08, 2011 7:39 AM
To: Kay Williams
Cc: virt-tools-list at redhat.com
Subject: Re: [virt-tools-list] How to determine if installation is
successful?

On Mon, Mar 07, 2011 at 06:09:06PM -0800, Kay Williams wrote:
> Hello,
>
> I am writing a python script to automate the installation of new
> virtual machines using virt-install. The question I have is how to
> determine when an installation has completed successfully.  In our
> particular case, we are installing RHEL and CentOS 5 and 6 systems.
> If we happen to provide invalid information for the virt-install
> "extra-args" parameter, or in the kickstart, the anaconda install
> stops and waits for user input.  If the user chooses to halt the
> installation by sending a CTRL+ALT+DELETE, control returns to
> virt-install, which provides an misleading message that installation
> was complete along with a misleading error code "0" (success).
>
> Can anyone suggest a good way to determine if a vm installation is
> successful?

As Cole said .. it's a difficult problem to solve.

libguestfs can help, but you're going to need to define very
specifically what you mean by "successful".

Obviously you've listed some examples of bad outcomes above, but how
about these ones:

- installation succeeds but VM isn't bootable after install

- firstboot processing started but not completed

- installation succeeds but important security updates could not be
  downloaded and/or applied

Another alternative is to go through the install once manually and
package that up so that you can "stamp out" guests.  The basic process
is described here:

https://rwmj.wordpress.com/2010/10/30/notes-on-producing-a-minimal-compresse
d-filesystem/

Note that the 'virt-builder' tool never got completed because various
people are working on more comprehensive versions which do similar
things.  See eg the 'Oz' tool which is part of Aeolus
(http://aeolusproject.org/page/FUDCon_2011_Aeolus_outline).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the virt-tools-list mailing list