defect 3588: For rpower reset on kvm, in the case persistkvmguests is enabled, check the domain is inactive before resetting the domain

This commit is contained in:
daniceexi 2013-10-24 08:58:21 -04:00
parent 0c5aa5d8bf
commit 9b89fdcc07

View File

@ -2348,7 +2348,7 @@ sub power {
$dom->shutdown();
} else { $retstring .= "$status_noop"; }
} elsif ($subcommand eq 'reset') {
if ($dom) {
if ($dom && $dom->is_active()) {
my $oldxml=$dom->get_xml_description();
my $newxml=reconfigvm($node,$oldxml);
#This *was* to be clever, but libvirt doesn't even frontend the capability, great...