]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: don't overwrite domain state from statedir config
authorJim Fehlig <jfehlig@suse.com>
Wed, 24 Jun 2015 21:02:15 +0000 (15:02 -0600)
committerJim Fehlig <jfehlig@suse.com>
Tue, 30 Jun 2015 17:02:29 +0000 (11:02 -0600)
When restarting libvirtd and reconnecting to running domains,
libxlReconnectDomain() would unconditionally set the domain state
to VIR_DOMAIN_RUNNING, overwriting the state maintained in
$statedir/<domname>.xml.  A domain in a paused state would have
the state changed to running, even though it was actually in a
paused state.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
src/libxl/libxl_driver.c

index 36e4e066ba2f0e90170c4e9eaf5ba876214a07d4..6bcd34962f0289dc345134fc0f7c294bd1a56eae 100644 (file)
@@ -372,8 +372,6 @@ libxlReconnectDomain(virDomainObjPtr vm,
                                             vm->def, VIR_HOSTDEV_SP_PCI) < 0)
         goto out;
 
-    virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_UNKNOWN);
-
     if (virAtomicIntInc(&driver->nactive) == 1 && driver->inhibitCallback)
         driver->inhibitCallback(true, driver->inhibitOpaque);