[Libguestfs] OpenStack output - server_id

Fabien Dupont fdupont at redhat.com
Mon Sep 24 08:00:21 UTC 2018


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 at redhat.com     M: +33 (0) 662 784 971 <+33662784971>

<http://redhat.com>  *TRIED. TESTED. TRUSTED.*

Twitter: @redhatway <https://twitter.com/redhatway> | Instagram: @redhatinc
<https://www.instagram.com/redhatinc/> | Snapchat: @redhatsnaps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180924/e3e7b57d/attachment.htm>


More information about the Libguestfs mailing list