There are many comments on installing and configuring openstack Nova on Ubuntu. At least six netizens may encounter Ping failure. To be honest, there are many reasons for ping failure (the most common one is
Euca-authorize authorization problem). If no useful information is provided, it is difficult to judge the problem by leaving a "Ping failure". We suggest you try to clarify your situation when leaving a message in the future, provide as much information as possible. The network settings of openstack Nova are complex. The controller can have multiple NICs, And the compute can also have multiple NICs. The network settings of the controller and compute can also be different, each configuration can also be divided into flatmanager, flatdhcpmanager, and vlanmanager. Each project allows different network settings, and each
The user can create multiple projects and networks -~
Here is only the simplest case. Only one network adapter and one user creates a project and network, and directly uses the existing lan ip address without interfering with the existing network. That is to say, the installed openstack Nova Controller/compute is integrated into the existing LAN, and the instance created on the Nova uses the IP address of the existing LAN through the bridge (instead of creating another private network ). For example, the vpsee lab now has 172.16.38.0/23
How can I use this network and configure openstack Nova?
Check the configuration file of Nova first:
$ sudo vi /etc/nova/nova.conf--logdir=/var/log/nova--state_path=/var/lib/nova--lock_path=/var/lock/nova--verbose--s3_host=172.16.39.111--rabbit_host=172.16.39.111--cc_host=172.16.39.111--ec2_url=http://172.16.39.111:8773/services/Cloud--FAKE_subdomain=ec2--sql_connection=mysql://root:vpsee@172.16.39.111/nova--glance_host=172.16.39.111--image_service=nova.image.glance.GlanceImageService--my_ip=172.16.39.111--network_manager=nova.network.manager.FlatManager--fixed_range=172.16.38.0/23--num_networks=1--flat_injected=true
Check whether the bridge Nic is correctly configured:
$ sudo vi /etc/network/interfacesauto loiface lo inet loopbackauto br100iface br100 inet staticaddress 172.16.39.111netmask 255.255.254.0gateway 172.16.38.1bridge_ports eth0bridge_stp offbridge_maxwait 0bridge_fd 0
If the above configuration needs to be modified, restart the modules of Nova and the Ubuntu network. If you are in trouble, restart the system directly:
$ sudo reboot
If the NOVA-manage network list finds that there are previously left networks that need to be deleted, delete all previous residual networks and recreate a new network named 172.16.38.0/23:
$ sudo nova-manage network delete 192.168.3.0/24 1 255$ sudo nova-manage network create 172.16.38.0/23 1 512$ sudo nova-manage network listnetwork netmask start address DNS172.16.38.0/23 255.255.254.0 172.16.38.2 8.8.4.4
Because some IP addresses are in use in our LAN, the newly created VM cannot occupy these IP addresses, so we need to divide some IP addresses for openstack Nova to use, after entering the database, modify the reserved value of the fixed_ips table to 0. For example, we want to leave the five IP addresses 172.16.39.222-226 to openstack Nova instances:
$ mysql -u root -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 135Server version: 5.1.54-1ubuntu4 (Ubuntu)Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.This software comes with ABSOLUTELY NO WARRANTY. This is free software,and you are welcome to modify and redistribute it under the GPL v2 licenseType 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> use nova;Database changedmysql> update fixed_ips set reserved = '1';Query OK, 6 rows affected (0.00 sec)Rows matched: 1448 Changed: 6 Warnings: 0mysql> update fixed_ips set reserved = '0' where address='172.16.39.222';mysql> update fixed_ips set reserved = '0' where address='172.16.39.223';mysql> update fixed_ips set reserved = '0' where address='172.16.39.224';mysql> update fixed_ips set reserved = '0' where address='172.16.39.225';mysql> update fixed_ips set reserved = '0' where address='172.16.39.226';
Restart each module of openstack Nova, and create a new Ubuntu instance to test whether the correct IP address is obtained and the gateway can be pinged (172.16.38.1 ).
Comment (18 comments) category: cloud
| Virtualization | thin
Comments)
- Finalsatan-August 29th, 2011
Vpsee, hello, I recently encountered a problem where the ping fails and the running example is running. I used two machines to configure Nova. One machine installed all the Nova services, as the controller node, the second server only installs Nova-compute as the compute node. Currently, only instances on the controller can be pinged or accessed through SSH. instances on the compute node cannot be pinged or accessed through SSH. Both machines are dual NICs. I guess there is still a problem with my network configuration.
I saw your post this morning and would like to ask you if the network configuration method of flatmanager is applicable to multiple machines. If one controller is based on the method described above, can I add another compute Node? How should I configure the compute node?
Thank you! An openstack discussion group is created for discussion. 129535701
- Deef-August 29th, 2011
Change DNS .. Hurry up and change he.net or dnspod. The dog dad 35.36.37.38.42.43.56 is under the wall. Domain name is okay !!!!! Hold !!!!!!!!!!!!!!!!
- Vpsee-August 30th, 2011 pm
@ Finalsatan
Well, you can add a compute node or a bridge. The above example is controller + compute.
- Vpsee-August 30th, 2011 pm
@ Deef
Well, let's take a look at it later. If it doesn't work, use other Ns ;~
- Deef-August 30th, 2011 pm
@ Vpsee DNS settings directly use other DNS servers, for example, dns.he.net is very stable. I am using it now. DNS with GD permission is blocked.
- YP-September 8th, 2011 pm
Hi, hello.
Can you write a tutorial on building an openstack environment with a computer Nic ??
- Gonewind-September 13th, 2011
According to your configuration, I can see that the VM has obtained the address, but the VM cannot be pinged on the host. What is the possible cause?
- Taipa-September 21st, 2011 pm
@ Vpsee
How can I allocate a public IP address? My vlanmanage network mode. in this mode, all instances use SNAT to access the Internet. if I manually add a DNAT entry to iptables, I can access it. However, it will be very troublesome for me to do so. Is there any solution?
- Fern-September 23rd, 2011 pm
$ Sudo Nova-manage network create 172.16.38.0/23 1 512
$ Sudo Nova-manage Network List
Network netmask start address DNS
172.16.38.0/23 255.255.254.0 172.16.38.2 8.8.4.4
Why is the DNS displayed after my network is created is none instead of 8.8.4.4?
- Fern-September 23rd, 2011 pm
Sorry, 8.8.4.4 is displayed. As with the local area network settings, 8.8.4.4 appears.
$ Sudo VI/etc/Network/interfaces
Auto Lo
Iface lo Inet loopback
Auto br100
Iface br100 Inet static
Address 172.16.39.111
Netmask 255.255.254.0
Gateway 172.16.38.1
Bridge_ports eth0
Bridge_stp off
Bridge_maxwait 0
Bridge_fd 0
I want to confirm, why is there no auto eth0? Can eth0 be statically configured here?
- Longhudou-October 17th, 2011
The following results are displayed when you view the instance running status. Why?
Reservation r-8m9p2q0p cloud default
Instance i-00000003 ami-00000001 networking admin (cloud, UBUNTU) 0 m1.tiny 2011-10-17t08: 10: 07z nova
Reservation r-ylmip43u cloud default
Instance i-00000004 ami-00000001 networking admin (cloud, UBUNTU) 0 m1.tiny 2011-10-17t08: 36: 46z nova
- Vpsee-October 17th, 2011 pm
@ Longhudou
Stopping the instance in the networking status indicates that the network is not successful and you can get more information by viewing the relevant log nova-networking.log. Reservation indicates that the current resource is not allocated to the instance and is reserved.
- Longhudou-October 19th, 2011
Although the instance is running, the ping fails, and the authorization is also done. I don't know where to find the reason?
Does the reservation status indicate insufficient resources? If not, what are possible? From where can we see what resources are insufficient?
- Longhudou-October 24th, 2011 AM
@ Vpsee
I am prompted to enter the password when logging on to the VM via SSH, but it is always wrong. When will this password be set? What if I forget it?
- Vpsee-October 24th, 2011 pm
@ Longhudou
Which virtual machine are you using? Is a self-installed virtual machine or a downloaded virtual machine image like a ubuntu1010-UEC-localuser-image.tar.gz? The default username and password for the ubuntu1010-UEC-localuser-image.tar.gz are Ubuntu
- Longhudou-October 25th, 2011 AM
I use SSH 10.0.0.3 and then enter the password to log on, but the front is using an SSH ubuntu@10.0.0.3 or @ There is nothing else.
Ask, how many machines are needed to build a multi-node openstack environment ?), Does hardware configuration need to be highly recommended on the official website? Control Node 16 GB memory or computing node 32 GB memory (scientific purposes, not commercial )?
- Vpsee-October 27th, 2011 AM
@ Longhudou
If you build multiple nodes on your own, three are enough. One is a control node, one is an image service node, and one is a computing node. For commercial use, the higher the cost, the better the configuration.
- Longhudou-October 27th, 2011
@ Vpsee
I can see that the openstack wiki does not support the Live migration of xenserver and does not support the resize of KVM. Do you know whether this is outdated or not?