vmx: Expose datacenter path in domain XML

Tool such as libguestfs need the datacenter path to get access to disk
images. The ESX driver knows the correct datacenter path, but this
information cannot be accessed using libvirt API yet. Also, it cannot
be deduced from the connection URI in a robust way.

Expose the datacenter path in the domain XML as <vmware:datacenterpath>
node similar to the way the <qemu:commandline> node works. The new node
is ignored while parsing the domain XML. In contrast to <qemu:commandline>
it is output only.
This commit is contained in:
Matthias Bolte
2015-09-11 12:00:47 +02:00
committed by Richard W.M. Jones
parent b421a70811
commit 636a990587
11 changed files with 126 additions and 16 deletions

View File

@@ -221,6 +221,7 @@ mymain(void)
ctx.parseFileName = NULL;
ctx.formatFileName = testFormatVMXFileName;
ctx.autodetectSCSIControllerModel = testAutodetectSCSIControllerModel;
ctx.datacenterPath = NULL;
DO_TEST("minimal", "minimal", 4);
DO_TEST("minimal-64bit", "minimal-64bit", 4);
@@ -293,6 +294,8 @@ mymain(void)
DO_TEST("svga", "svga", 4);
DO_TEST("datacenterpath", "datacenterpath", 4);
virObjectUnref(caps);
virObjectUnref(xmlopt);