From 13488f55c5f440580aaff312cbb4e5100494ac90 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 2 Jun 2011 14:42:21 +0100 Subject: [PATCH] Make sure virDomainSave/virDomainManagedSave reset id to -1 After successfull virDomainSave/virDomainManagedSave calls the guest will no longer be active, so the domain ID must be reset to -1 * daemon/remote_generator.pl: Special case virDomainSave & virDomainManagedSave for same reason as virDomainDestroy --- daemon/remote_generator.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl index e204b76699..632972c40a 100755 --- a/daemon/remote_generator.pl +++ b/daemon/remote_generator.pl @@ -1363,8 +1363,11 @@ elsif ($opt_k) { print "\n"; } - if ($call->{ProcName} eq "DomainDestroy") { - # SPECIAL: virDomainDestroy needs to reset the domain id explicitly + if ($call->{ProcName} eq "DomainDestroy" || + $call->{ProcName} eq "DomainSave" || + $call->{ProcName} eq "DomainManagedSave") { + # SPECIAL: virDomain{Destroy|Save|ManagedSave} need to reset + # the domain id explicitly on success print " dom->id = -1;\n"; }