openstack--JUNO10搭建手冊整理7:建立例項時報錯總結
阿新 • • 發佈:2018-12-18
報錯一:例項無法出出現spawning狀態
#在instance1例項啟動報錯後,重啟controller節點服務建立instance2例項 systemctl restart openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service systemctl restart neutron-server.service #仍然報錯,然後重新啟動computer上的nova和neutron服務 systemctl restart libvirtd.service systemctl restart openstack-nova-compute.service systemctl restart openvswitch.service systemctl restart neutron-openvswitch-agent.service #接著再次重啟controller節點服務建立instance3例項 systemctl restart openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service systemctl restart neutron-server.service systemctl restart httpd.service memcached.service systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service 最後成功。 得出結論:在啟動例項時,要先重啟computer上的nova和neutron服務,再重啟controller上的nova和neutron服務,才可一次成功孵化!
報錯二:無法獲取建立例項ip地址
通過虛擬控制檯訪問你的例項 nova get-vnc-console demo-instance1 novnc
給出一條url連結,複製到位址列,可以進入,
但就是無法用ifconfig命令獲取例項ip地址,也無法ping通閘道器(10.68.88.1)和虛擬外部網路(20.20.20.51)
此時,網路服務出現了問題,
解決方案:重啟network、computer、controller節點上的有關nova和neutron方面的服務
具體如下:
network: systemctl restart openvswitch.service systemctl restart neutron-openvswitch-agent.service neutron-l3-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service computer: systemctl restart openstack-nova-compute.service systemctl restart openvswitch.service systemctl restart neutron-openvswitch-agent.service controller: systemctl restart openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service systemctl restart neutron-server.service systemctl restart httpd.service memcached.service
source demo-open
nova boot --flavor m1.tiny --image cirros-0.3.3-x86_64 --nic net-id=42a1e473-cba8-4bf3-9c8c-4f5a91cb978d --security-group default --key-name demo-key demo-instance2
#可以正常孵化 並通過虛擬控制檯訪問例項
重新獲取ip地址,再ping閘道器和外絡網路。
在經過多次失敗並逐步摸索之 後,總結出來一點東西:純屬個人建議:
在建立虛擬機器例項時前,先做以下兩點
1.computer節點、network節點、block節點先同步controller節點上的時間
2.重啟computer節點、network節點、controller節點上有關nova和neutron的服務,然後再建立例項,這樣才能最大程度地保證你所建立的例項是正常的,網路是通的!