Ask Your Question
0

Unable to access the nova instace

asked 2014-11-17 05:33:16 -0500

Pradip gravatar image

updated 2014-11-17 05:48:13 -0500

dbaxps gravatar image

Hello,

stack@localhost:~/devstack$ nova list
+--------------------------------------+-------+--------+------------+-------------+------------------------------+
| ID                                   | Name  | Status | Task State | Power State | Networks                     |
+--------------------------------------+-------+--------+------------+-------------+------------------------------+
| ce3d0e66-0858-4156-98ed-25f3bc7ace29 | myvm1 | ACTIVE | -          | Running     | private=10.0.0.2, 172.24.4.1 |
+--------------------------------------+-------+--------+------------+-------------+------------------------------+

I got it after following the steps:

  nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
  nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
  nova list
  nova show myvm1
  nova floating-ip-create public
  nova add-floating-ip ce3d0e66-0858-4156-98ed-25f3bc7ace29 172.24.4.1

Now I can able to ping it:

PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.465 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.440 ms
^C
--- 10.0.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.440/0.452/0.465/0.024 ms
stack@localhost:~/devstack$ ping 172.24.4.1
PING 172.24.4.1 (172.24.4.1) 56(84) bytes of data.
64 bytes from 172.24.4.1: icmp_seq=1 ttl=64 time=0.401 ms
64 bytes from 172.24.4.1: icmp_seq=2 ttl=64 time=0.421 ms
^C

However when I am trying to login through ssh, it is failing:

stack@localhost:~/devstack$ ssh stack@10.0.0.2
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
stack@localhost:~/devstack$ ssh root@10.0.0.2
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
stack@localhost:~/devstack$ ssh admin@10.0.0.2
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Did I missed anything silly?

Essentially I have a cinder volume attached to the nova instance:

stack@localhost:~/devstack$ cinder list
+--------------------------------------+-----------+-----------+------+-------------+----------+--------------------------------------+
|                  ID                  |   Status  |    Name   | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+-----------+-----------+------+-------------+----------+--------------------------------------+
| b006133e-eb17-49ce-a30b-3d32bb40d909 |   in-use  |  vol_nfs  |  1   |     nfs     |  false   | ce3d0e66-0858-4156-98ed-25f3bc7ace29 |
+--------------------------------------+-----------+-----------+------+-------------+----------+--------------------------------------+

I want to access the /dev/vdb of the myvm1.

Thanks, Pradip

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-11-17 05:55:33 -0500

dbaxps gravatar image

updated 2014-11-17 06:23:43 -0500

Say you launched Cirros VM then, you have to create ssh keypair and launch VM as follows ( case of using glance image) :-

 $ nova keypair-add oskey1 > oskey1.priv
 $ chmod 600 oskey1.priv

  $ glance image-list
  +--------------------------------------+--------+-------------+------------------+---------+--------+
  | ID                                   | Name   | Disk Format | Container Format | Size    | Status |
  +--------------------------------------+--------+-------------+------------------+---------+--------+
  | fa7a83d1-3ddb-4c0e-9c07-839b6b00f8ca | cirros | qcow2       | bare             | 9761280 | active |
  +--------------------------------------+--------+-------------+------------------+---------+--------+

  $ nova boot --flavor 2 --key_name oskey1 --image \
    fa7a83d1-3ddb-4c0e-9c07-839b6b00f8ca cirr-guest1

  $ nova list
  +--------------------------------------+-------------+--------+------------+-------------+--------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks     |
  +--------------------------------------+-------------+--------+------------+-------------+--------------+
  | acfbd460-d8d7-4eba-962b-de6f2f50db12 | cirr-guest2 | ACTIVE | None       | Running     | int=30.0.0.2 |

To login via floating IP

$ssh -i oskey1.priv  cirros@172.24.4.1

If it would be Ubuntu VM :

$ssh -i oskey1.priv ubuntu@172.24.4.1 

When you logged in you will access cinder volume been used for `nova boot` or via dashboard.  
Your VMs File System  will utilize this volume.  
Command to boot via cinder volume will look like :-

 $ nova boot --flavor 2 --key_name oskey1  --block_device_mapping vda=CINDER_VOLUME_ID:::0  INSTANCE_NAME
edit flag offensive delete link more

Comments

Thanks. I am using Fedora-x86_64-20-20140618-sda. What steps I do need to follow?

Thanks.

Pradip gravatar imagePradip ( 2014-11-17 09:16:48 -0500 )edit

stack@localhost:~/devstack$ glance image-list +--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+ | ID | Name | Disk Format | Container Format | Size | Statu

Pradip gravatar imagePradip ( 2014-11-17 09:20:33 -0500 )edit

stack@localhost:~/devstack$ glance image-list | f66d11c7-cebd-447c-95af-a4573248945a | Fedora-x86_64-20-20140618-sda | qcow2 | bare | 209649664 | active |

Pradip gravatar imagePradip ( 2014-11-17 09:20:54 -0500 )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-11-17 05:33:16 -0500

Seen: 1,859 times

Last updated: Nov 17 '14