From 29b154e29ad8270f435a23f8b94e4b3d8cf0960d Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Wed, 24 Jun 2015 15:02:15 -0600 Subject: [PATCH] libxl: don't overwrite domain state from statedir config 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/.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 --- src/libxl/libxl_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 36e4e066ba..6bcd34962f 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -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);