Deploy glance image without passwd

SOme cases we have glance images which we dont know password. To deploys such VM’s:

[root@host neutron(keystone_admin)]# nova keypair-add –pub_key ~/.ssh/id_rsa.pub mykey

[root@host neutron(keystone_admin)]# nova boot –image afaec72c-b07f-426e-9aeb-8d457fad0089 –flavor 3 –nic net-id=623f3faa-66e2-4023-9dee-777eb81c1cc3 vm1-ycsb –key_name mykey
+————————————–+—————————————————–+
| Property                             | Value                                               |
+————————————–+—————————————————–+
| OS-DCF:diskConfig                    | MANUAL                                              |
| OS-EXT-AZ:availability_zone          |                                                     |
| OS-EXT-SRV-ATTR:host                 | –                                                   |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | –                                                   |
| OS-EXT-SRV-ATTR:instance_name        | instance-0000000b                                   |
| OS-EXT-STS:power_state               | 0                                                   |
| OS-EXT-STS:task_state                | scheduling                                          |
| OS-EXT-STS:vm_state                  | building                                            |
| OS-SRV-USG:launched_at               | –                                                   |
| OS-SRV-USG:terminated_at             | –                                                   |
| accessIPv4                           |                                                     |
| accessIPv6                           |                                                     |
| adminPass                            | LkeUcw8VAg6d                                        |
| config_drive                         |                                                     |
| created                              | 2015-09-08T07:39:18Z                                |
| flavor                               | m1.medium (3)                                       |
| hostId                               |                                                     |
| id                                   | 82a681fd-3970-4e9d-b62c-5eb56e6f2da1                |
| image                                | common_image (afaec72c-b07f-426e-9aeb-8d457fad0089) |
| key_name                             | mykey                                               |
| metadata                             | {}                                                  |
| name                                 | vm1-ycsb                                     |
| os-extended-volumes:volumes_attached | []                                                  |
| progress                             | 0                                                   |
| security_groups                      | default                                             |
| status                               | BUILD                                               |
| tenant_id                            | c2da90a5b1e64588a016afb5ce60b4b1                    |
| updated                              | 2015-09-08T07:39:18Z                                |
| user_id                              | 24d52e0326fc4701be85950a6813ef57                    |
+————————————–+—————————————————–+
[root@host neutron(keystone_admin)]# nova list

root@perf60 neutron(keystone_admin)]# nova list
+————————————–+—————–+——–+————+————-+——————-+
| ID                                   | Name            | Status | Task State | Power State | Networks          |
+————————————–+—————–+——–+————+————-+——————-+
| bff9e17e-4c58-4944-ac0f-55ff0747a78e | vm1_yscb        | ACTIVE | –          | Running     | private=10.10.0.3 |
+————

You can access VM without password

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s