Shutdown state can be entered in between checks and therby a shutdown
is called on an already shut down guest.
That would trigger an unexpected error like:
error: Requested operation is not valid: domain is not running
Avoid that by ignoring the RC of the shutdown/destroy calls as long as
eventually a shut down state is reached.
Signed-off-by: Christian Ehrhardt <email address hidden>
Without this - depending on the kind of fail - it might just fail every
time with:
E: dpkg was interrupted, you must manually run 'dpkg --configure -a'
to correct the problem.
Signed-off-by: Christian Ehrhardt <email address hidden>