Ask Your Question
0

openstack launch centos instance

asked 2014-07-31 13:42:39 -0500

Doria gravatar image

I want to boot a centos6.5-desktop instance on openstack. The thing is I cann't inject network configuration rules to this instance as other instances. For example, I want to assign 192.168.100.12 to this instance, but there is no new ifcfg-eth0 generated. I can see the interface is actually assigned to this instance since there is mac address in 70-persistent-net.rules. Then I manually configured the ifcfg-eth0 for the instance (although not the best way), and it can ping ip addresses now. However, it cannot always ping domain name. It's really strange, ping sometimes works, sometimes not. sometimes with no packet loss, sometimes has. BTW, I defined nameservers in the /etc/resolv.conf.

edit retag flag offensive close merge delete

Comments

FYI, other instances can be automatically configured.

Doria gravatar imageDoria ( 2014-07-31 13:43:33 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-07-31 14:48:05 -0500

dbaxps gravatar image

updated 2014-07-31 15:20:30 -0500

View https://github.com/vermut/veewee-cent...
Link CentOS 6.5 amd64 http://cloud.vermut.movenix.com/cento... (906M)
Tested OK on Openstack IceHouse CentOS 7 via glance upload

[boris@icehouse1 Downloads]$ ssh -i oskey25.pem cloud-user@192.168.1.157
    Last login: Thu Jul 31 19:45:37 2014
    [cloud-user@centos65rs01 ~]$ uname -a
    Linux centos65rs01.novalocal 2.6.32-431.20.5.el6.x86_64 #1 SMP Fri Jul 25 08:34:44 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    [cloud-user@centos65rs01 ~]$ ifconfig
    eth0      Link encap:Ethernet  HWaddr FA:16:3E:73:C5:47  
              inet addr:40.0.0.13  Bcast:40.0.0.255  Mask:255.255.255.0
              inet6 addr: fe80::f816:3eff:fe73:c547/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:216 errors:0 dropped:0 overruns:0 frame:0
              TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:26844 (26.2 KiB)  TX bytes:22993 (22.4 KiB)

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

image description

edit flag offensive delete link more

Comments

Hi dbaxps, thank you for the answer. When I boot the instance, it shows "no route to host", and I cannot enter the centos system from console. Is there any key for booting the instance? I added it to glance using "glance add name="centos" is_public=true container_format=bare disk_format=raw". Thanks.

Doria gravatar imageDoria ( 2014-07-31 15:31:37 -0500 )edit

Hi dbaxps, could you please tell me how to boot this image? I cannot see the GUI. Many thanks.

Doria gravatar imageDoria ( 2014-07-31 16:43:09 -0500 )edit

[root@icehouse1 ~(keystone_admin)]# glance image-list +--------------------------------------+--------------------+-------------+------------------+-----------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+--------------------+-------------+------------------+-----------+--------+ | fba4d571-d47a-4de1-b517-b69693d330d7 | CentOS65image | qcow2 | bare | 949026816 | active | | 39d31db7-1585-40e8-96c7-399e08a7ea19 | cirros | qcow2 | bare | 13147648 | active | | 71f7a654-23d2-4a55-a652-4780d48f03fa | Fedora20image86_64 | qcow2 | bare | 210829312 | active | | 4a06276f-552f-47eb-9a62-20ae1f2ee735 | Ubuntu 07/28/2014 | qcow2 | bare | 254935552 | active | +--------------------------------------+--------------------+-------------+------------------+---------------------

    [root@icehouse1 ~(keystone_admin)]# neutron net-list
    +--------------------------------------+---------+-----------------------------------------------------+
    | id                                   | name    | subnets                                             |
    +--------------------------------------+---------+-----------------------------------------------------+
    | cb156821-2bad-407f-97ea-ce316786ed89 | private | 0b2dd796-5523-473e-8be9-13a46c2aaa1c 10.0.0.0/24    |
    | f19f5e63-94ea-49a8-b07f-7fffeb0bfd1d | demonet | 395ee66b-2e94-432a-a416-b763756086fb 40.0.0.0/24    |
    | caa30bbb-9e88-4594-92b4-967939a2d6ec | public  | bc9d3398-4608-4705-aa91-d099dbb771e6 192.168.1.0/24 |
    +--------------------------------------+---------+-----------------------------------------------------+
    [root@icehouse1 ~(keystone_admin)]# nova boot --flavor 2  --image fba4d571-d47a-4de1-b517-b69693d330d7 --key-name oskey45 --nic net-id=f19f5e63-94ea-49a8-b07f-7fffeb0bfd1d  CentOS65RS02
    +--------------------------------------+------------------------------------------------------+
    | Property                             | Value                                                |
    +--------------------------------------+------------------------------------------------------+
    | OS-DCF:diskConfig                    | MANUAL                                               |
    | OS-EXT-AZ:availability_zone          | nova                                                 |
    | 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                            | 7K32qzPgWEiW                                         |
    | config_drive                         |                                                      |
    | created                              | 2014-08-01T04:10:46Z                                 |
    | flavor                               | m1.small (2)                                         |
    | hostId                               |                                                      |
    | id                                   | f643f81d-cb51-4c09-a350-60252711e0a3                 |
    | image                                | CentOS65image (fba4d571-d47a-4de1-b517-b69693d330d7) |
    | key_name                             | oskey45                                              |
    | metadata                             | {}                                                   |
    | name                                 | CentOS65RS02                                         |
    | os-extended-volumes:volumes_attached | []                                                   |
    | progress                             | 0                                                    |
    | security_groups                      | default                                              |
    | status                               | BUILD                                                |
    | tenant_id                            | e5c1a9414f4c42a19b4125f3711c9a77                     |
    | updated ...
(more)
dbaxps gravatar imagedbaxps ( 2014-07-31 23:13:23 -0500 )edit

Hi dbaxps, thank you so much for your patience! However, I do exactly the same thing as you, but cannot login the system. I assigned a fixed ip (192.168.20.106) to the instance, through the console of openstack, it shows "host-192.168.20.106 login:". However, I've never set the username or the password. What should I do? I'm thinking there should be a floating ip associated for the instance right?

Doria gravatar imageDoria ( 2014-08-01 11:48:33 -0500 )edit

Doria, you need to learn basic concepts of Openstack http://textuploader.com/1hey

dbaxps gravatar imagedbaxps ( 2014-08-01 12:22:44 -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-07-31 13:42:39 -0500

Seen: 209 times

Last updated: Jul 31 '14