当前位置:文档之家› openstack安装、配置过程中常见问题及解决办法

openstack安装、配置过程中常见问题及解决办法

openstack安装、配置过程中常见问题及解决办法:by-lilin== 问题一:由于网络节点只有2个物理网卡,当给网络节点配置虚拟子网(10.10.10.52,10.20.20.52)时,无法ping通计算节点网络(10.10.10.53/54/55,10.20.20.53/54/55)==解决方法:在网络节点其中一个物理网卡eth0安装虚拟网卡,构建虚拟vlan,实现同一个网卡分配2个不同网段的IP地址(10.10.10.52和10.20.20.52)。

安装步骤如下所示:**安装vlan(vconfig)和加载8021g模块:# aptitude install vlav# modprobe 8021g# lsmod |grep -i 8021q**使用linux cvonfig命令配置vlan(在eth0网卡上虚拟两个vlav端口,端口号为5、7): # vconfig add eth0 5Added VLAN with VID == 5 to IF -:eth0# vconfig add eth0 7Added VLAN with VID == 7 to IF -:eth0**设置VLAN的REORDER_HDR参数,默认就行了:# vconfig set_flag eth0.5 1 1Set flag on device -:eth0.5:- Should be visible in /proc/net/vlan/eth0.5# vconfig set_flag eth0.7 1 1Set flag on device -:eth0.7:- Should be visible in /proc/net/vlan/eth0.7**可以使用cat /proc/net/vlan/eth0.5查看eth0.5参数:# cat /proc/net/vlan/eth0.5eth0.5 VID: 5 REORDER_HDR: 1 dev->priv_flags: 1total frames received 623total bytes received 32353Broadcast/Multicast Rcvd 606total frames transmitted 71total bytes transmitted 9420Device: eth0INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0EGRESS priority mappings:**在/etc/network/interface中修改eth0网络配置信息:auto eth0.5iface eth0.5 inet staticaddress 10.20.20.52netmask 255.255.255.0vlan_raw_device eth0auto eth0.7iface eth0.7 inet staticaddress 10.10.10.52netmask 255.255.255.0vlan_raw_device eth0**重启网络:/etc/init.d/networking restart== 问题二:网络节点如何使用桥接模式访问外网?(外网IP:192.168.5.*,gateway:192.168.5.253) ==解决方法:在网络节点的eth1网卡上搭建桥接网络端口br-ex,并进行相关网络参数配置: **安装openvswitch-switch、openvswitch-datapath-dkms软件包# apt-get install openvswitch-switch openvswitch-datapath-dkms**创建桥接网络br-ex:# ovs-vsctl add-br br-ex**查看桥接端口br-ex是否启用# ovs-vsctl list-brbr-exbr-intbr-tun**将桥接端口br-ex添加到eth1上# ovs-vsctl add-port br-ex eth1**在/etc/network/interface中修改eth1网络配置信息:auto eth1iface eth1 inet manualup ifconfig $IFACE 0.0.0.0 upup ip link set $IFACE promiss ondown ip link set $IFACE promiss offdown ifconfig $IFACE downauto br-exiface br-ex inet staticaddress 192.168.5.52netmask 255.255.255.0gateway 192.168.5.253dns-nameservers 8.8.8.8**重启网络:/etc/init.d/networking restart== 问题三:在openstack里启动openvswitch-switch服务service openvswitch-switch start的时候,出现ovs-brcompatd is not running的错误 ==解决方法:**安装openvswitch-controller、openvswitch-switch、openvswitch-brcompat软件包# apt-get install openvswitch-controller openvswitch-switch、openvswitch-brcompat **在/etc/default/openvswitch-switch中修改如下配置文件:BRCOMPAT=yes**重启网络:/etc/nit.d/openvswitch-switch restart*如果有提示:Bad luck, the kernel headers for the target kernel version could not be found and you did not specify other valid kernel headers to use...*这是头文件的问题, the kernel generic headers is missing the version.h file. *解决方法如下:ln -s /usr/src/linux-headers-`uname-r`/include/generated/uapi/linux/version.h /lib/modules/`uname-r`/build/include/linux/**重启网络,如果有提示:bridge module is loaded,not loading brcompat*需要先卸载bridge模块# lsmod | grep bridge 查看bridge模块# rmmod bridge 移除网桥模块*强制加载brcompat内核模块# /etc/init.d/openvswitch-switch force-reload-kmod**重启网络查看ovs-brcompatd、ovs-vswitchd、ovsdb-server三个服务是否启动# /etc/nit.d/openvswitch-switch restartovsdb-server is running with pid 17119ovs-vswitchd is running with pid 17128ovs-brcompatd is running with pid 17131== 问题四:登陆openstack的horizon界面,无法看到image镜像,无法创建volumes。

==解决方法:重新安装glance,更新/etc/glance/glance-api-paste.ini和/etc/glance/glance-registry-paste.ini配置文件,重启service glance-api和glance-registry服务,更新数据库。

通过拷贝本地镜像、下载网络镜像两种方式,可以使用glance image-create命令成功创建.img镜像,在horizon页面中也可以看到。

== 问题五:在控制节点输入#quantum agent-list命令,发现网络节点的 Open vSwitch agent 服务没有启动,随之切换到网络节点,输入#servicequantum-plugin-openvswitch-agent restart重启服务,发现无法启动。

==解决方法:通过分析,确定为网络节点的quantum构件中quantum-plugin-openvswitch-agent软件问题。

**输入命令:apt-get autoremove --purge quantum-plugin-openvswitch-agent,删除软件**更新配置文件/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.initenant_network_type = gretunnel_id_ranges = 1:1000integration_bridge = br-inttunnel_bridge = br-tunlocal_ip = 10.20.20.52enable_tunneling = True**输入命令:#service quantum-plugin-openvswitch-agent restart重启服务**在控制节点上输入命令:#quantum agent-list,查看Open vSwitch agent 服务是否已经启动(有笑脸)== 问题六:网络节点的配置文件/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini 中,如果设置enable_tunneling = True,#service quantum-plugin-openvswitch-agent restart重启服务后,发现网络节点死机,重启后不能进入内核。

==解决方法:在配置文件 /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini 中,如果设置enable_tunneling = False,可以进入系统。

== 问题七:成功创建实例,但在horizon上显示实例状态为error。

==解决方法:**检查控制节点、计算节点的nova构件是否已经成功安装(nova-manage service list),如果看到有节点没有成功安装,需要重新安装nova组件,并进行相关配置**在创建虚拟机之前,先创建密钥(ssh-keygrn)**再上传密钥到数据库(ova keypair-add --pub_key .ssh/id_rsa.pub key1)**打开防火墙(nova secgroup-add-rule default tcp 22 22 0.0.0.0/0、novasecgroup-add-rule default icmp -1 -1 0.0.0.0/0)**查看虚拟机:nova show name-of-vm== 问题八:实例成功创建,虚拟机可以启动,内网DHCP也可以给虚拟机自动分配IP地址,但发现无法ping通虚拟机内网IP:50.50.1.4;输入quantum floatingip-createexternal_net,创建外网IP,然后在Float ip池中分配一个IP关联虚拟机后,仍然发现无法ping通虚拟机外网IP:192.168.5.103,也无法SSH登陆虚拟机。

相关主题