Hi,

I've read the virt-v2v OpenStack output code to understand how it works and I've seen this:

>   (* The server name or UUID of the conversion appliance where
>    * virt-v2v is currently running.  In future we may be able
>    * to make this optional and derive it from the OpenStack
>    * metadata service instead.
>    *)
>   server_id : string;

Indeed, it can be derived from OpenStack metadata service. The following URL called from within the conversion appliance will return the metadata: http://169.254.169.254/openstack/latest/meta_data.json. As you can see, the IP address is 169.254.169.254, which will is the metadata service. The JSON body contains a uuid entry that is the current appliance UUID, hence the server_id used by virt-v2v.

I don't know how to code that in OCaml, so I defer implementation to anyone with such skills. And by reading the patch, I may learn how to write small pieces of OCaml and contribute further changes :)

--

Fabien Dupont

PRINCIPAL SOFTWARE ENGINEER

Red Hat - Solutions Engineering

fabien@redhat.com     M: +33 (0) 662 784 971

  TRIED. TESTED. TRUSTED.

Twitter: @redhatway | Instagram: @redhatinc | Snapchat: @redhatsnaps