From: Jean-Baptiste Rouault Date: Fri, 30 Jul 2010 08:36:06 +0000 (+0200) Subject: openvzDomainCreateWithFlags: set domain id to the correct value X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fd81a097298c64870c78beff5615319b9f86e895;p=libvirt.git openvzDomainCreateWithFlags: set domain id to the correct value When an openvz domain is defined with virDomainDefineXML, domain id is set to -1. A call to virDomainGetInfo after starting the domain would then fail because this invalid id is passed to openvzGetProcessInfo. --- diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 98381fbad8..e5bbdd0d54 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -992,6 +992,7 @@ openvzDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) vm->pid = strtoI(vm->def->name); vm->def->id = vm->pid; + dom->id = vm->pid; vm->state = VIR_DOMAIN_RUNNING; ret = 0;