Otherwise domainCreateWithFlags via remote returns -1 as domid.
Signed-off-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
---
src/libxl/libxl_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index c95b387..ce3a99b 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2375,6 +2375,9 @@ libxlDomainCreateWithFlags(virDomainPtr dom,
}
ret = libxlDomainStart(driver, vm, (flags & VIR_DOMAIN_START_PAUSED) != 0, -1);
+ if (ret < 0)
+ goto cleanup;
+ dom->id = vm->def->id;
cleanup:
if (vm)
--
1.8.3.1