I'm not sure if it's ok or not to modify dom->id as I did here.
Regards,
Jean-Baptiste
From 7fd011393a80da32949e4aa5468532140d250021 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Rouault <[email protected]>
Date: Fri, 30 Jul 2010 10:36:06 +0200
Subject: [PATCH] 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.
---
src/openvz/openvz_driver.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 98381fb..e5bbdd0 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;
--
1.7.0.4
--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list