[Openstack-operators] Quick type : find the instance directory by instance id

Michael Still mikal at stillhq.com
Sat Jul 13 22:20:30 UTC 2013

On Sat, Jul 13, 2013 at 12:11 AM, Razique Mahroua <
razique.mahroua at nuage-and-co.fr> wrote:

> Hey guys,
> many asked me for that, here is the small sql query :
> select concat("/var/lib/nova/instance/instance-00000",conv(id, 10,
> 16),"/") as instance_path,power_state,vm_state,display_name from instances
> where deleted=0 and host="vs11" order by id
> It'll give you the according directory :)

Unfortunately this wont work with grizzly and later, which instance UUIDs
are preferred for directory names instead of ids (for instances created
after you upgrade). This change happened because the code assumed that the
instance name is unique, which isn't always true. UUIDs on the other hand
are always unique.

Sorry about that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20130714/be729a14/attachment.html>

More information about the OpenStack-operators mailing list