1

I would like to be able to reliably determine the UUID associated with an OpenStack guest from within the guest. A klugey way to do it would be something like:

# nova show `hostname` | grep ' id '
| id                                   | 10493365-870f-4ff1-86ed-500b4b8db814                                 |

However, the hostname that a system knows itself as would not necessarily be the hostname that OpenStack knows the guest as.

Is there a way do do what I want? BTW, I'd actually be running this at Rackspace.

jcollie
  • 627
  • 5
  • 7

1 Answers1

0

I like to use xenstore-read name. This asks the hypervisor for the instance's name.

# xenstore-read name
instance-10493365-870f-4ff1-86ed-500b4b8db814

I refer to this page frequently, specifically the section "XenStore commands to be run on guest VM".

Joe A
  • 300
  • 2
  • 9