Ask Your Question
0

ip addr shows no network

asked 2014-10-01 13:41:31 -0500

FredSmite gravatar image

updated 2014-10-01 15:44:22 -0500

larsks gravatar image

Hi, Just installed Icehouse via RDO - on a single node . CentOS 6.5 :

Following the procedure here to launch a VM

http://docs.openstack.org/grizzly/bas...

I don;t get a IP

 nova secgroup-add-rule default tcp 22 22 0.0.0.0/24

  [root@ab763 .ssh(keystone_admin)]# nova boot --flavor 1 --image 7bd0a927-a91b-46d5-a197-da62f710bcc2  --key-name default_key my_instance


    >  nova show my_instance
    +--------------------------------------+----------------------------------------------------------+
    | Property                             | Value                                                    |
    +--------------------------------------+----------------------------------------------------------+
    | OS-DCF:diskConfig                    | MANUAL                                                   |
    | OS-EXT-AZ:availability_zone          | nova                                                     |
    | OS-EXT-SRV-ATTR:host                 | ab763                                                    |
    | OS-EXT-SRV-ATTR:hypervisor_hostname  | ab763                                                    |
    | OS-EXT-SRV-ATTR:instance_name        | instance-00000003                                        |
    | OS-EXT-STS:power_state               | 1                                                        |
    | OS-EXT-STS:task_state                | -                                                        |
    | OS-EXT-STS:vm_state                  | active                                                   |
    | OS-SRV-USG:launched_at               | 2014-10-01T14:15:45.000000                               |
    | OS-SRV-USG:terminated_at             | -                                                        |
    | accessIPv4                           |                                                          |
    | accessIPv6                           |                                                          |
    | config_drive                         |                                                          |
    | created                              | 2014-10-01T14:14:50Z                                     |
    | flavor                               | m1.tiny (1)                                              |
    | hostId                               | 5b3d8cbf34d4bde6a29d3a75132d98f34b2d1ea1e24002154d0933a1 |
    | id                                   | 3f1fa170-c583-40b8-a6ac-152a1da57fdf                     |
    | image                                | cirros (7bd0a927-a91b-46d5-a197-da62f710bcc2)            |
    | key_name                             | default_key                                              |
    | metadata                             | {}                                                       |
    | name                                 | my_instance                                              |
    | os-extended-volumes:volumes_attached | []                                                       |
    | progress                             | 0                                                        |
    | public network                       | 172.24.4.230                                             |
    | security_groups                      | default                                                  |
    | status                               | ACTIVE                                                   |
    | tenant_id                            | bf4ff33135cf46f5ac7da3e78ce5820a                         |
    | updated                              | 2014-10-01T14:15:45Z                                     |
    | user_id                              | 6c538dfb5e5340538e32dd60b843e684                         |
    +--------------------------------------+----------------------------------------------------------+
    > Blockquote


     neutron  subnet-list
    +--------------------------------------+----------------+-----------------+--------------------------------------------------+
    | id                                   | name           | cidr            | allocation_pools                                 |
    +--------------------------------------+----------------+-----------------+--------------------------------------------------+
    | f1af9300-653e-47c6-9c58-863268442d92 | private_subnet | 10.0.0.0/24     | {"start": "10.0.0.2", "end": "10.0.0.254"}       |
    | 16a6d4f5-5460-4971-9e6e-b175e35c0d84 | public_subnet  | 172.24.4.224/28 | {"start": "172.24.4.226", "end": "172.24.4.238"} |
    +--------------------------------------+----------------+-----------------+--------------------------------------------------+

      I 


     ssh root@172.24.4.230
    ssh: connect to host 172.24.4.230 port 22: No route to host

When I login via the vnc console - ( cirrus ; passwd ) on the dashboard ; ifconfig shows eth0 with no IP address

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-10-02 10:06:43 -0500

FredSmite gravatar image

updated 2014-10-02 10:07:42 -0500

Hi ,

I tried that and I get :

nova boot --flavor 1 --image 7bd0a927-a91b-46d5-a197-da62f710bcc2 --key-name /root/.ssh/default_key --nic net-id=f1af9300-653e-47c6-9c58-863268442d92 my_instance

Yields :

ERROR: Network f1af9300-653e-47c6-9c58-863268442d92 could not be found. (HTTP 400) (Request-ID: req-e65f94a2-1856-4a52-a06b-91124b508dd2)
edit flag offensive delete link more
1

answered 2014-10-01 15:43:55 -0500

larsks gravatar image

If you installed your system using packstack, you probably ended up with two networks, public and private. The public network is an external network -- it is used to assign floating ip addresses, but instances are not connected to it directly.

You would first boot your instance connected to the private network:

nova boot --flavor 1 --image 7bd0a927-a91b-46d5-a197-da62f710bcc2  \
  --key-name default_key \
  --nic net-id=<id_of_private_network> \
  my_instance

This would boot the instance with an address from the 10.0.0.0/24 subnet. You will not be able to connecto this address directly! You would need to assign a floating ip address to this instance. Create a floating ip:

$ nova floating-ip-create public

And associate it with the instance:

$ nova floating-ip-assocate my_instance <ip_address_from_create_command>

At this point, you will probably still be unable to connect to the instance until you give the br-ex bridge on your system an ip address on the floating ip network:

# ip addr add 172.24.4.225/28 dev br-ex

And now you should be able to connect to things (but make sure you have created the appropriate security group entries to permit your network traffic; I can't remember if packstack sets this up for you or not).

In a "real" deployment this step would be unnecessary and you would have a physical NIC bridged to br-ex, but this configuration will permit you to test things out.

edit flag offensive delete link more

Comments

net-id needs a network id, not a subnet id.

larsks gravatar imagelarsks ( 2014-10-02 11:26:35 -0500 )edit

I can't get past running nova with the --nic opinion ...

FredSmite gravatar imageFredSmite ( 2014-10-02 11:45:09 -0500 )edit

How do I determine network id for use with --nic ??

FredSmite gravatar imageFredSmite ( 2014-10-02 19:51:37 -0500 )edit

With neutron net-list

larsks gravatar imagelarsks ( 2014-10-02 21:10:48 -0500 )edit

adding --nic=neutron net-list | grep pri | cut -d\| -f2 | sed -e "s/ //"

worked
FredSmite gravatar imageFredSmite ( 2014-10-03 04:19:56 -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-10-01 13:41:31 -0500

Seen: 443 times

Last updated: Oct 01 '14