libvirt/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-10.xml
Michal Privoznik 7d661d6e20 vmx: Parse vm.genid
The VMware metadata file contains genid but we are not parsing
and thus reporting it in domain XML. However, it's not as
straightforward as one might think. The UUID reported by VMware
is not in its usual string form, but split into two signed long
longs. That means, we have to do a bit of trickery when parsing.
But looking around it's the same magic that libguestfs does:

https://github.com/libguestfs/virt-v2v/blob/master/v2v/input_vmx.ml#L421

It's also explained by Rich on qemu-devel:

https://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg02019.html

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1598348
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2021-08-02 12:54:17 +02:00

38 lines
1.1 KiB
XML

<domain type='vmware'>
<name>w2019biosvmware</name>
<uuid>421a6177-5aa9-abb7-5924-fc376c18a1b4</uuid>
<genid>13c67c91-9f47-526f-b0d6-e4dd2e4bb4f9</genid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<cputune>
<shares>2000</shares>
</cputune>
<os>
<type arch='x86_64'>hvm</type>
</os>
<cpu>
<topology sockets='1' dies='1' cores='2' threads='1'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='[datastore] directory/windows2019biosvmware.vmdk'/>
<target dev='sda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='00:50:56:9a:9c:7a' type='generated'/>
<source bridge='VM Network'/>
<model type='e1000e'/>
</interface>
<video>
<model type='vmvga' vram='8192' primary='yes'/>
</video>
</devices>
</domain>