+Wed Feb 14 16:47:24 EST 2007 Daniel P. Berrange <berrange@redhat.com>
+
+ * qemud/conf.c: Fixed generation of <features> block, and
+ don't include ID, or VNC port in inactive XML generation
+
Wed Feb 14 16:45:24 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_internal.c: Fixed path to the libvirt_qemud
goto cleanup;
}
- if (vm->id >= 0) {
+ if (vm->id >= 0 && live) {
if (qemudBufferPrintf(&buf, "<domain type='%s' id='%d'>\n", type, vm->id) < 0)
goto no_memory;
} else {
if (qemudBufferPrintf(&buf, " <cmdline>%s</cmdline>\n", def->os.cmdline) < 0)
goto no_memory;
- if (def->features & QEMUD_FEATURE_ACPI) {
- if (qemudBufferAdd(&buf, " <features>\n") < 0)
- goto no_memory;
- if (qemudBufferAdd(&buf, " <acpi>\n") < 0)
- goto no_memory;
- if (qemudBufferAdd(&buf, " </features>\n") < 0)
- goto no_memory;
- }
-
-
for (n = 0 ; n < def->os.nBootDevs ; n++) {
const char *boottype = "hd";
switch (def->os.bootDevs[n]) {
if (qemudBufferAdd(&buf, " </os>\n") < 0)
goto no_memory;
+ if (def->features & QEMUD_FEATURE_ACPI) {
+ if (qemudBufferAdd(&buf, " <features>\n") < 0)
+ goto no_memory;
+ if (qemudBufferAdd(&buf, " <acpi/>\n") < 0)
+ goto no_memory;
+ if (qemudBufferAdd(&buf, " </features>\n") < 0)
+ goto no_memory;
+ }
+
+
if (qemudBufferAdd(&buf, " <devices>\n") < 0)
goto no_memory;
if (def->graphicsType == QEMUD_GRAPHICS_VNC) {
if (def->vncPort) {
qemudBufferPrintf(&buf, " <graphics type='vnc' port='%d'/>\n",
- vm->id == -1 ? def->vncPort : def->vncActivePort);
+ vm->id >= 0 && live ? def->vncActivePort : def->vncPort);
} else {
qemudBufferPrintf(&buf, " <graphics type='vnc'/>\n");
}