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.
This commit is contained in:
Jean-Baptiste Rouault 2010-07-30 10:36:06 +02:00 committed by Matthias Bolte
parent 549b839960
commit fd81a09729

View File

@ -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;