mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
libxl: don't remove persistent domain on start failure
libxlDomainCreateXML() would remove a persistent domain if libxlDomainStart() failed. Check if domain is persistent before removing. Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
29b154e29a
commit
4b53d0d4ac
@ -918,7 +918,10 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
|
||||
|
||||
if (libxlDomainStart(driver, vm, (flags & VIR_DOMAIN_START_PAUSED) != 0,
|
||||
-1) < 0) {
|
||||
virDomainObjListRemove(driver->domains, vm);
|
||||
if (!vm->persistent) {
|
||||
virDomainObjListRemove(driver->domains, vm);
|
||||
vm = NULL;
|
||||
}
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user