openstack 相关笔记

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.

3,查看CPU是否开启了虚拟化支持:

grep -E 'svm|vmx' /proc/cpuinfo

如果有返回说明已经打开了,否则就没打开

4,# getconf LONG_BIT

32

(说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)

# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l

8

(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)

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.

11,# quantum subnet-create --name ext_subnet1 --allocation-pool start=  10.10.10.2 ,end= 10.10.10.100  --gateway  10.10.10.1 ext_net   10.10.10.0/24 --enable_dhcp=False

你可能感兴趣的:(openstack 相关笔记)