Ask Your Question
0

Guest OS details from OpenStack

asked 2014-12-01 00:27:42 -0600

akshik gravatar image

Is there a way to find the OS installed in the Guest VM. assuming we have given control to the used for uploading images, can we get the info from elsewhere.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
3

answered 2014-12-01 12:58:37 -0600

paulreiber gravatar image

updated 2014-12-01 13:15:52 -0600

AFAIK OpenStack doesn't know this. That is entirely down to the bits inside the image. As dbaxps mentions, the OS might identify itself in the logs as it boots. If you know what identifying pattern to search for, that can work.

However, if you can have your image-creating end-users follow a convention, this can be done by agreement. You can have end-users who are adding images specify an 'OS' property for the image. For updating existing images that don't have the property (yet):

glance image-update --property OS=Linux <image>

More info on the glance commandline: http://docs.openstack.org/cli-reference/content/glanceclient_commands.html (http://docs.openstack.org/cli-referen...)

edit flag offensive delete link more
1

answered 2014-12-01 12:56:09 -0600

dbaxps gravatar image

updated 2014-12-01 12:59:26 -0600

Not sure it would a fair for you. On Compute Node:-

# source keystonerc_boris
# [root@juno2 ~(keystone_boris)]# nova list
+--------------------------------------+----------------+-----------+------------+-------------+----------------------------------------+
| ID                                   | Name           | Status    | Task State | Power State | Networks                               |
+--------------------------------------+----------------+-----------+------------+-------------+----------------------------------------+
| 4c768639-ed74-483d-95b5-19abdeb65402 | CentOS7RSX2811 | SUSPENDED | -          | Shutdown    | boris_network=15.0.0.15, 192.168.1.159 |
| acadbc2d-db8b-4a62-ade4-8fc45f17477a | VF20RSX522711  | SUSPENDED | -          | Shutdown    | boris_network=15.0.0.12, 192.168.1.179 |
+--------------------------------------+----------------+-----------+------------+-------------+----------------------------------------+
[root@juno2 ~(keystone_boris)]# cat /var/lib/nova/instances/4c768639-ed74-483d-95b5-19abdeb65402/console.log | grep "Linux version"
[    0.000000] Linux version 3.10.0-123.6.3.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Wed Aug 6 21:12:36 UTC 2014
[    0.000000] Linux version 3.10.0-123.9.3.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Thu Nov 6 15:06:03 UTC 2014
[    0.000000] Linux version 3.10.0-123.9.3.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Thu Nov 6 15:06:03 UTC 2014

CentOS 7 or RHEL 7 detected
Switch to another tenant

  [root@juno2 ~(keystone_kashyap)]# nova list
    +--------------------------------------+----------------+-----------+------------+-------------+------------------------------------------+
    | ID                                   | Name           | Status    | Task State | Power State | Networks                                 |
    +--------------------------------------+----------------+-----------+------------+-------------+------------------------------------------+
    | 422ea8f6-24d7-4feb-884f-60bc06d15e56 | UbuntuUTRX2911 | SUSPENDED | -          | Shutdown    | kashyap_private=40.0.0.14, 192.168.1.157 |
    +--------------------------------------+----------------+-----------+------------+-------------+------------------------------------------+
    [root@juno2 ~(keystone_kashyap)]# cat /var/lib/nova/instances/422ea8f6-24d7-4feb-884f-60bc06d15e56/console.log | grep "Linux version"
    [    0.000000] Linux version 3.16.0-25-generic (buildd@komainu) (gcc version 4.9.1 (Ubuntu 4.9.1-16ubuntu6) ) #33-Ubuntu SMP Tue Nov 4 12:06:54 UTC 2014 (Ubuntu 3.16.0-25.33-generic 3.16.7)

Ubuntu 14.10 detected

Actually, having  in /var/lib/nova/instances/instance-id/console.log  output of "dmesg utility" 
it's not  a problem to detect  which OS particular VM is running
edit flag offensive delete link more

Comments

Interesting approach. The guest operating system can be "fingerprinted" from the logfiles once launched.

paulreiber gravatar imagepaulreiber ( 2014-12-01 13:00:45 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-12-01 00:27:42 -0600

Seen: 383 times

Last updated: Dec 01 '14