mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
committed by
Richard W.M. Jones
parent
b421a70811
commit
636a990587
10
tests/xml2vmxdata/xml2vmx-datacenterpath.vmx
Normal file
10
tests/xml2vmxdata/xml2vmx-datacenterpath.vmx
Normal file
@@ -0,0 +1,10 @@
|
||||
.encoding = "UTF-8"
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
guestOS = "other"
|
||||
uuid.bios = "56 4d 9b ef ac d9 b4 e0-c8 f0 ae a8 b9 10 35 15"
|
||||
displayName = "datacenterpath"
|
||||
memsize = "4"
|
||||
numvcpus = "1"
|
||||
floppy0.present = "false"
|
||||
floppy1.present = "false"
|
||||
9
tests/xml2vmxdata/xml2vmx-datacenterpath.xml
Normal file
9
tests/xml2vmxdata/xml2vmx-datacenterpath.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'>
|
||||
<name>datacenterpath</name>
|
||||
<uuid>564d9bef-acd9-b4e0-c8f0-aea8b9103515</uuid>
|
||||
<memory unit='KiB'>4096</memory>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
</os>
|
||||
<vmware:datacenterpath>folder1/folder2/datacenter1</vmware:datacenterpath>
|
||||
</domain>
|
||||
Reference in New Issue
Block a user