提交 c1b2aea8 编写于 作者: C Cole Robinson

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.
上级 a06b407f
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册