From: "Daniel P. Berrange" <berrange(a)redhat.com>
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 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
index e204b76..6bddfa9 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";
}
--
1.7.5.2