mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
test driver: Fix domain ID after redefining a running VM
The ID of the existing VM was being unconditionally set to -1, which was upsetting virt-manager.
This commit is contained in:
parent
a06b407fce
commit
c1b2aea80c
@ -1,3 +1,7 @@
|
||||
Mon Jun 22 11:09:18 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
* src/test.c: Fix domain ID after redefining a running VM
|
||||
|
||||
Mon Jun 22 12:27:39 CEST 2009 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/conf.[ch]: restrict VMX syntax parsing types, patch by Matthias
|
||||
|
@ -1623,16 +1623,16 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
|
||||
def)) == NULL) {
|
||||
goto cleanup;
|
||||
}
|
||||
def = NULL;
|
||||
dom->persistent = 1;
|
||||
dom->def->id = -1;
|
||||
|
||||
event = virDomainEventNewFromObj(dom,
|
||||
VIR_DOMAIN_EVENT_DEFINED,
|
||||
VIR_DOMAIN_EVENT_DEFINED_ADDED);
|
||||
|
||||
ret = virGetDomain(conn, def->name, def->uuid);
|
||||
def = NULL;
|
||||
ret = virGetDomain(conn, dom->def->name, dom->def->uuid);
|
||||
if (ret)
|
||||
ret->id = -1;
|
||||
ret->id = dom->def->id;
|
||||
|
||||
cleanup:
|
||||
virDomainDefFree(def);
|
||||
|
Loading…
x
Reference in New Issue
Block a user