qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: jferlan@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org,
	mxie@redhat.com
Subject: Re: [Qemu-devel] Byte ordering of VM Generation ID in Windows VMs
Date: Mon, 9 Jul 2018 16:50:17 +0100	[thread overview]
Message-ID: <20180709155017.GG16293@redhat.com> (raw)
In-Reply-To: <20180709073647.GF16293@redhat.com>

On Mon, Jul 09, 2018 at 08:36:47AM +0100, Richard W.M. Jones wrote:
> On Thu, Jul 05, 2018 at 03:11:32PM +0100, Richard W.M. Jones wrote:
> > VMware represents these internally as two signed 64 bit integers, eg:
> > 
> >   vm.genid = "-570734802784577186"
> >   vm.genidx = "-5042519231342505152"
> > 
> > I am still trying to get verification, but I believe the first is the
> > low 64 bit word and the second is the high 64 bit word.
> 
> I have now been able to verify how this works using a real VMware
> hypervisor (thanks to help from Ming Xie).  For the record, here is
> how it maps, since I could not find any documentation about this.
> 
> VMX file contains:
> 
>   vm.genid = "7344585841658099715"
>   vm.genidX = "-8483171368186442967"

As a follow-on, here is some code which can convert VMware's VMX
numbers into a qemu-style UUID.  Note for both of these I mean the
textual representation, not the in-memory representation.

  https://github.com/libguestfs/libguestfs/blob/b11b870166b7ae27f728dbb58b6498788bf97329/v2v/input_vmx.ml#L430-L449

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v

  parent reply	other threads:[~2018-07-09 15:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 12:39 [Qemu-devel] Byte ordering of VM Generation ID in Windows VMs Richard W.M. Jones
2018-07-05 12:52 ` Richard W.M. Jones
2018-07-05 13:54   ` Michael S. Tsirkin
2018-07-05 14:11     ` Richard W.M. Jones
2018-07-09  7:36       ` Richard W.M. Jones
2018-07-09  9:05         ` Laszlo Ersek
2018-07-09  9:11           ` Richard W.M. Jones
2018-07-09 15:50         ` Richard W.M. Jones [this message]
2018-07-05 14:20   ` Laszlo Ersek
2018-07-05 16:43     ` Richard W.M. Jones
2018-07-05 17:10       ` Michael S. Tsirkin
2018-07-05 20:59         ` Richard W.M. Jones
2018-07-05 17:13       ` Daniel P. Berrangé
2018-07-05 17:15       ` Laszlo Ersek
2018-07-05 17:34         ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180709155017.GG16293@redhat.com \
    --to=rjones@redhat.com \
    --cc=jferlan@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=mxie@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).