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?