[Openstack] [nova] Libvirt driver domain metadata - add instance metadata dictionary?

Jay Pipes jaypipes at gmail.com
Tue Aug 12 16:04:02 UTC 2014


On 08/12/2014 10:50 AM, Markus Zoeller wrote:
> Maybe the direction I'm heading is wrong. My intention is to enable a
> correlation
> between multiple libvirt domains independent from their flavor.
> E.g.
> --------------     --------------    --------------
> | Server: A  |     | Server: B  |    | Server: C  |
> | Flavor: X  |     | Flavor: X  |    | Flavor: Y  |
> | Group: foo |     | Group: bar |    | Group: foo |
> --------------     --------------    --------------
>
> I'd like to enable the hypervisor to understand that server A and C are
> correlated
> because of the same "Group: foo". Is there already another mechanism which
> enables
> that?

The current way to do this is indeed by using the server's 
instance_metadata. You would add a "group" meta key with a value during 
boot:

nova boot ... --flavor X --meta group=foo serverA
nova boot ... --flavor X --meta group=bar serverB
nova boot ... --flavor Y --meta group=foo serverC

Note that Sergey Nikitin is working on a more simple string-tagging 
functionality in Juno that will allow you to just tag the instances, 
like so:

nova boot ... --flavor X --tag foo serverA
nova boot ... --flavor X --tag bar serverB
nova boot ... --flavor Y --tag foo serverC

You can see his work stream here:

https://blueprints.launchpad.net/nova/+spec/tag-instances

Best,
-jay




More information about the Openstack mailing list