]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vmx: Parse vm.genid
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 28 Jul 2021 11:32:10 +0000 (13:32 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Aug 2021 10:54:17 +0000 (12:54 +0200)
commit7d661d6e20fe82e5472d5ab6dcd97ed76291f256
tree1b29d643cc0bd967b9aca5b1ea6b3a5ce0f4b8be
parent919f25d36ef0ea41c50bdb5afa0b83187ffb3c87
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>
src/vmx/vmx.c
tests/vmx2xmldata/vmx2xml-esx-in-the-wild-10.xml