1,apt-get install kvm libvirt-bin virtinst,裝完後,你用ifconfig,就會發現多了一個virbr0 的bridge。
數據庫
2,Note that OVS bridges br-int and br-tun are DOWN - this is ok and they should not be put UP.ubuntu
3,查看CPU是否開啓了虛擬化支持: 網絡
grep -E 'svm|vmx' /proc/cpuinfo
若是有返回說明已經打開了,不然就沒打開 app
4,# getconf LONG_BIT ssh
32 ui
(說明當前CPU運行在32bit模式下, 但不表明CPU不支持64bit)
this
# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
spa
8 code
(結果大於0, 說明支持64bit計算. lm指long mode, 支持lm則是64bit)orm
5, 只有外部網絡(external)才能分配浮動IP(In Quantum, a floating IP pool is represented as an external network and a floating IP is allocated from a subnet associated with the external network. )
6. pu ic key,等都是在虛擬機建立時經過metadata服務得到的而注入到虛擬機之中的;ip地址則是建立或每次重啓時得到的。若是拿不到IP地址,或建立虛擬機後沒法ssh,則全與metadata服務有關
7.將raw格式的鏡像轉換成qcow2的鏡像:
qemu-img convert -f raw -O qcow2 ./ubuntu.img ./ubuntu.qcow2
8.不少時候發現nova-compute掛掉,或者不正常了,經過nova-manage查看狀態是XXX了。
每每是nova-compute的主機時間和controller的主機時間不一致。 nova-compute是定時地往數據庫中services這個表update時間的,這個時間是nova-compute的主機時間。
controller校驗nova-compute的存活性是以controller的時間減去nova-compute的update時間,若是大於多少秒(具體數值代碼裏面有,好像是15秒?)就判斷nova-compute異常。
這個時候你用nova-manage查看nova-compute狀態是XXX,若是建立虛擬機,查看nova-scheduler.log 就是提示找不到有效的host 其餘服務節點類同,這是nova心跳機制問題。因此講nova環境中各節點時間同步很重要。必定要確保時間同步!!
有的弟兄在dashboard上看nova-compute狀態,可能一下子變紅,一下子變綠。那就嚴格同步時間,或者找到代碼,把上面的那個15秒改大一點。
9, When you request a volume be attached to /dev/vdX what actually happens on all host Hypervisors except Xen is that the device is assigned to the next available letter in the guest - effectively the auto-assignment logic is always in effect.
What this means is practice is if your guest has a /dev/vda device already, and you request /dev/vdc, the device will actually be assigned to /dev/vdb in spite of your request.
10,Database
requests for the OpenStack Compute service are proxied through the nova-conductor
service.