收藏 分销(赏)

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

上传人:pc****0 文档编号:7203362 上传时间:2024-12-27 格式:DOCX 页数:5 大小:18.83KB 下载积分:10 金币
下载 相关 举报
openstack安装、配置过程中常见问题及解决办法.docx_第1页
第1页 / 共5页
openstack安装、配置过程中常见问题及解决办法.docx_第2页
第2页 / 共5页


点击查看更多>>
资源描述
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 5 Added VLAN with VID == 5 to IF -:eth0 # vconfig add eth0 7 Added VLAN with VID == 7 to IF -:eth0 **设置VLAN的REORDER_HDR参数,默认就行了: # vconfig set_flag eth0.5 1 1 Set flag on device -:eth0.5:- Should be visible in /proc/net/vlan/eth0.5 # vconfig set_flag eth0.7 1 1 Set 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.5 eth0.5 VID: 5 REORDER_HDR: 1 dev->priv_flags: 1 total frames received 623 total bytes received 32353 Broadcast/Multicast Rcvd 606 total frames transmitted 71 total bytes transmitted 9420 Device: eth0 INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 EGRESS priority mappings: **在/etc/network/interface中修改eth0网络配置信息: auto eth0.5 iface eth0.5 inet static address 10.20.20.52 netmask 255.255.255.0 vlan_raw_device eth0 auto eth0.7 iface eth0.7 inet static address 10.10.10.52 netmask 255.255.255.0 vlan_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-br br-ex br-int br-tun **将桥接端口br-ex添加到eth1上 # ovs-vsctl add-port br-ex eth1 **在/etc/network/interface中修改eth1网络配置信息: auto eth1 iface eth1 inet manual up ifconfig $IFACE 0.0.0.0 up up ip link set $IFACE promiss on down ip link set $IFACE promiss off down ifconfig $IFACE down auto br-ex iface br-ex inet static address 192.168.5.52 netmask 255.255.255.0 gateway 192.168.5.253 dns-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 restart ovsdb-server is running with pid 17119 ovs-vswitchd is running with pid 17128 ovs-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 服务没有启动,随之切换到网络节点,输入#service quantum-plugin-openvswitch-agent restart重启服务,发现无法启动。 == 解决方法:通过分析,确定为网络节点的quantum构件中quantum-plugin-openvswitch-agent软件问题。 **输入命令:apt-get autoremove --purge quantum-plugin-openvswitch-agent,删除软件 **更新配置文件/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini tenant_network_type = gre tunnel_id_ranges = 1:1000 integration_bridge = br-int tunnel_bridge = br-tun local_ip = 10.20.20.52 enable_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、nova secgroup-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-create external_net,创建外网IP,然后在Float ip池中分配一个IP关联虚拟机后,仍然发现无法ping通虚拟机外网IP:192.168.5.103,也无法SSH登陆虚拟机。 == 解决方法:目前还没有找出问题原因。
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 百科休闲 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服