openstack实践各种问题汇总

干子瑜
2023-12-01

GPU问题 http://www.cnblogs.com/sammyliu/p/5179414.html

显卡 网卡 PCI透传
https://wiki.openstack.org/wiki/Pci_passthrough
https://wiki.openstack.org/wiki/Meetings/Passthrough

http://blog.csdn.net/wsfdl/article/details/42617707 USB知识

http://www.87long.com/read.php?tid=125&page=1&toread=1#tpc 时钟
http://textuploader.com/aij31 SPICE问题
http://dbaxps.blogspot.com/2015/10/switching-to-dashboard-spice-console-in.html
http://www.aboutyun.com/thread-8793-1-1.html USB问题
https://review.openstack.org/#/c/124930/3/specs/juno/proposed/usb-redirection.rst
http://www.google.com/patents/CN104539685A?cl=zh

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764811 USB2 3 配置
http://ryabinam-promo.ru/kvm-ich6-windows-xp-driver.html XP声卡驱动,但是下载不了
http://www.bubuko.com/infodetail-573759.html 分析

NOVA代码分析
http://lynnkong.iteye.com/blog/1718275
http://blog.csdn.net/epugv/article/details/38706263

usb3 驱动
http://www.chenyudong.com/archives/add-pci-pass-through-device-to-guest-vm-with-libvirt-and-qemu.html
使用libvirt和qemu将pci pass through设备添加到虚拟机上
https://communities.intel.com/message/268154
http://www.intel.com/support/cn/chipsets/usb3/sb/cs-033082.htm

CLOUDINIT 相关
http://blog.marvelworld.tk/?p=575 分析
http://www.mamicode.com/info-detail-1054915.html ADMIN密码问题
http://cloudbase-init.readthedocs.org/en/latest/plugins.html#setting-password-main
http://blog.csdn.net/juvxiao/article/details/22664457

virsh使用
http://koumm.blog.51cto.com/703525/1290269

关于VCPU TOPOLOGY
https://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/virt-driver-vcpu-topology.html

删除所有虚拟机
virsh list –all|awk ‘/instance.*关闭/{print $2}’|xargs -t -l1 virsh undefine

nova flavor-delete m1.xlarge
m1.large
m1.tiny

KERB认证问题
http://caiguangguang.blog.51cto.com/1652935/1383723
http://blog.csdn.net/wulantian/article/details/42418231
http://blog.csdn.net/wulantian/article/details/42173095

JDANGO定时任务
http://speakingbaicai.blog.51cto.com/5667326/1051622

SPICE加密问题
http://specs.openstack.org/openstack/nova-specs/specs/juno/approved/websocket-proxy-to-host-security.html
https://elmarco.fedorapeople.org/manual.html#_configuration
nova show user07|awk ‘/\ id/{print $4}’ 查ID,可用ID来加密
remote-viewer spice://xxx:5900?password=XXX

http://www.amobbs.com/thread-5466438-1-1.html 加密算法

RESIZE和迁移
http://blog.csdn.net/lynn_kong/article/details/9186201
http://www.marksei.com/openstack-resize-instance-no-valid-host-found/
http://openstack-in-production.blogspot.com/2015/08/openstack-cpu-topology-for-high.html

图形展示问题
http://fancybox.net/

NOVA包打包
cd ~/rpmbuild/SPECS/
rpmbuild -bp op.spec
yum-builddep op.spec
cd BUILD
cp -r nova/ nova.ort/
修改代码
diff -aruN nova.org nova>xxx.patch
cp patch ../SOURCES/
vim op.spec 修改加patch,加LOG等
rpmbuild -ba op.spec

升级spec
rpmdev-bumpspec kernel.spec -u “Luo Fei < fei.luo@cs2c.com.cn >” -c “add user login wich password”

EXPECT的使用
http://scc.qibebt.cas.cn/docs/linux/script/TclTkall.pdf 语法说明
http://www.cnblogs.com/arlenhou/p/learn_expect.html
http://linux.chinaunix.net/techdoc/desktop/2007/02/14/950495.shtml

备份还原自动恢复
http://bbs.linuxtone.org/thread-19212-1-1.html
http://openstackoperationsguide.readthedocs.org/en/latest/Operations/Backup%20and%20Recovery.html

http://elastx.com/our-blog/backups-in-openstack-cloud#.VlbTypowjIU backup方案

http://www.cnblogs.com/sammyliu/p/4468757.html

nrpe root 权限:
http://blog.chinaunix.net/uid-1757778-id-3066418.html

网络不通
nova secgroup-create open open\ all

nova secgroup-add-rule open icmp -1 255 0.0.0.0/0
+————-+———–+———+———–+————–+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+————-+———–+———+———–+————–+
| icmp | -1 | 255 | 0.0.0.0/0 | |
+————-+———–+———+———–+————–+
[root@vserver1 ~]# nova secgroup-add-rule open tcp 1 65535 0.0.0.0/0
+————-+———–+———+———–+————–+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+————-+———–+———+———–+————–+
| tcp | 1 | 65535 | 0.0.0.0/0 | |
+————-+———–+———+———–+————–+
[root@vserver1 ~]# nova secgroup-add-rule open udp 1 65535 0.0.0.0/0
+————-+———–+———+———–+————–+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+————-+———–+———+———–+————–+
| udp | 1 | 65535 | 0.0.0.0/0 | |
+————-+———–+———+———–+————–+
[root@vserver1 ~]# nova add-secgroup yongjun open
[root@vserver1 ~]# nova add-secgroup teacher open
[root@vserver1 ~]# nova add-secgroup shengping open
iptables -nvL 看到多了规则
Chain nova-compute-local (1 references)
pkts bytes target prot opt in out source destination
20 4552 nova-compute-inst-1 all – * * 0.0.0.0/0 10.1.80.127
20 5940 nova-compute-inst-2 all – * * 0.0.0.0/0 10.1.80.128
241 46182 nova-compute-inst-4 all – * * 0.0.0.0/0 10.1.80.129
从WINDOWS虚拟机里关闭防火墙,或者设置规则,之后就可以ping 通了

网络问题
https://github.com/cloudisopen/OpenStack/blob/master/source/Architecture/Network%20Design.rst

创建时候指定网络和IP
http://docs.ocselected.org/openstack-manuals/kilo/admin-guide-cloud/content/advanced_vm_creation.html

关于WEB
RESTFUL 规范
http://www.ruanyifeng.com/blog/2014/05/restful_api.html
http://novoland.github.io/%E8%AE%BE%E8%AE%A1/2015/08/17/Restful%20API%20%E7%9A%84%E8%AE%BE%E8%AE%A1%E8%A7%84%E8%8C%83.html

时间差8小时:
make sure that your compute nodes have theirs clocks synchronized with ntpd
add the ‘os_type’ propriety to your Windows image, it will fix the problem for your futures instances :
glance image-update –property os_type=windows image-id

change the ‘os_type’ propriety of your already existing instances, directly in the Nova database, table instance, then hard reboot the instances (you may want to shutdown your Windows before =)

启用HTTPS问题
http://www.marinamele.com/2014/09/security-on-django-app-https-everywhere.html

文件下载
http://www.jianshu.com/p/2ce715671340
联想
http://www.newsmth.net/nForum/#!article/Career_Upgrade/398899

rsa
http://my.oschina.net/kuaikuai/blog/208075?fromerr=QzhKmDkW
openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem

839 openssl genrsa -out rsa_private_key.pem 1024
840 ls
841 cat rsa_private_key.pem
842 openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt -out private_key.pem
843 ls
844 cat private_key.pem
845 openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem

http://www.chenshake.com/openstack-created-virtual-machine-scheduling/
指定虚拟机启动

MYSQL连接数问题

管理平台所在机器上,修改/etc/my.cnf
增加:
max_connections=10000
open_files_limit=10000

结果如下:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0
max_connections=10000
open_files_limit=10000

Timed out waiting for a reply to message ID
nova-manage service list
看出来是nova network挂了
看日志,是IP被占用了

http://blog.sina.com.cn/s/blog_959491260101m2de.html 静态IP的方案

网桥问题:
http://blog.csdn.net/x_nazgul/article/details/20233237
IP注入问题:
OpenStack 的 metadata 服务机制 http://www.ibm.com/developerworks/cn/cloud/library/1509_liukg_openstackmeta/
metadata在OpenStack中的使用(1) http://lingxiankong.github.io/blog/2014/03/25/metadata/
Store metadata on a configuration drive http://docs.openstack.org/user-guide/cli_config_drive.html

OpenStack Networking without DHCP http://blog.oddbit.com/2015/06/26/openstack-networking-without-dhcp/

Openstack的网络 http://my.oschina.net/guol/blog/226973

解决Rabbitmq-server 启动失败

最近在使用devstack部署开发环境的时候,遇到了rabbitmq-server安装后运行启动脚本失败的情况:

                invoke-rc.d: initscript rabbitmq-server, action "start" failed.

原因在于rabbitmq会在启动前会解析主机名的地址是否可通。

需要在你的/etc/hosts添加上:

                127.0.0.1  hostname.domainname  hostname              

直接编辑问题:
virt-install –virt-type kvm –name test –ram 1024 \
–disk path=/data/centos-6.4.qcow2,size=10,format=qcow2 \
–network network=default \
–graphics vnc,listen=0.0.0.0 –noautoconsole –os-type=windows –os-variant=win7

删除多余主机
https://thornelabs.net/2014/08/03/delete-duplicate-openstack-hypervisors-and-services.html

nova service-delete ID

镜像变化:
http://blog.chinaunix.net/uid-20940095-id-3504622.html
driver里查镜像下载过程

快照问题:
https://github.com/bohai/openstack-note/blob/master/OSF_snapshot.md
http://blog.csdn.net/duan101101/article/details/19424479

高可用方案:
https://www.cnblogs.com/sammyliu/category/724243.html
http://www.cnblogs.com/sammyliu/p/4995868.html

VPN推荐,目前一直再用shadowsocks用了几年了,免受坑人搜索的侵害,推荐给大家,下载地址:shadowsocks下载

 类似资料: