
On 8/2/21 7:00 AM, Michal Prívozník wrote:
On 7/30/21 2:02 PM, Richard W.M. Jones wrote:
On Thu, Jul 29, 2021 at 10:30:30AM +0200, Michal Privoznik wrote:
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> ---
I've successfully ran vmx2xmltest on an s390x machine which means that there shouldn't be any endiandness problem.
src/vmx/vmx.c | 30 +++++++++++++++++++ .../vmx2xml-esx-in-the-wild-10.xml | 1 + 2 files changed, 31 insertions(+)
Looked reasonable and seems to match the description here:
https://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg02019.html
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Pushed, thanks.
Out of interest, what is this being consumed by? I will add this to virt-v2v when it goes upstream.
I don't recall all the specifics (it was John who implemented it), but IIRC it was needed for Windows guests. Something about identifying them uniquely. John?
Tugging at a memory strand that's 3+ years old results in a blank stare followed by some amount of panic ;-) I do have vague recollections of issues w/ snapshots though - scanning the libvirt code for 'genid' or 'GEN_VMID' would seem to give some hints. There were some very specific options / processing. I recall a few qemu patches after the initial implementation, but the specifics have long since been erased from the recall buffer. I do see Gal who is still at Red Hat did some reviews for the original implementation - whether he has any recollections. John
Here's the commit that implemented it in libvirt:
https://gitlab.com/libvirt/libvirt/-/commit/b50efe97ad1357f9dff26450daf68a7a...
Michal