openstack
Posted tao-yuan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstack相关的知识,希望对你有一定的参考价值。
虚拟化管理工具安装
[[email protected] ~]# yum install -y qemu-kvm libvirt
[[email protected] ~]# yum install -y virt-install
[[email protected] ~]# systemctl enable libvirtd
[[email protected] ~]# systemctl start libvirtd
1.qemu-img create -f raw /opt/CentOS-7-x86_64.raw 10G
2.virt-install --virt-type kvm --name CentOS-7-x86_64 --ram 1024
--cdrom=/tmp/CentOS-7.2-x86_64-DVD-1511.iso --disk path=/opt/CentOS-7-x86_64.raw
--network network=default --graphics vnc,listen=0.0.0.0 --noautoconsole
3.TightVNC 连接到192.168.56.11:5900
virsh start CentOS-7-x86_64
如果多次执行安装:
1.删除 rm -f /opt/CentOS-7-x86_64.raw
2.name需要修改 virt-install --virt-type kvm --name CentOS-dxxxxx7-x86_64 --ram 1024
--cdrom=/tmp/CentOS-7.2-x86_64-DVD-1511.iso --disk path=/opt/CentOS-7-x86_64.raw
--network network=default --graphics vnc,listen=0.0.0.0 --noautoconsole
3.No support HVM
CPU热添加
<vcpu placement=‘static‘>1</vcpu>
<vcpu placement=‘auto‘ current="1">4</vcpu>
virsh setvcpus CentOS-7-x86_64 2 --live
内存热添加
[[email protected] ~]# virsh qemu-monitor-command CentOS-7-x86_64 --hmp --cmd info balloon
[[email protected] ~]# virsh qemu-monitor-command CentOS-7-x86_64 --hmp --cmd balloon 512
1.创建桥接网卡
#!/bin/bash
brctl addbr br0
brctl addif br0 eth0
ip addr del dev eth0 192.168.56.11/24
route add default gw 192.168.56.2
2.virsh edit CentOS-7-x86_64
<interface type=‘bridge‘>
<source bridge=‘br0‘/>
3. virsh shutdown CentOS-7-x86_64
virsh start CentOS-7-x86_64
4. 修改虚拟机网卡配置
CPU:
上下文切换:
宿主机
ring 0
ring 3
虚拟机
ring 0
ring 3
缓存:
taskset -cp 1 25718
内存:
空间优化
寻址
EPT技术:
虚拟机:虚拟内存
虚拟机:物理内存
宿主机:虚拟内存
宿主机:物理内存
大页内存
[[email protected] ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
KSM内存合并
[ksmd]
I/O优化:
2.6 内核: Noop CFQ AS Deadline 默认:CFQ
3.10内核: Noop CFQ Deadline 默认:Deadline
[[email protected] ~]# dmesg | grep -i scheduler
[ 1.945474] io scheduler noop registered
[ 1.945476] io scheduler deadline registered (default)
[ 1.945495] io scheduler cfq registered
[[email protected] ~]# cat /sys/block/sda/queue/scheduler
noop [deadline] cfq
openstack 准备工作
在两个节点都安装:
虚拟化检测
1.安装仓库:
yum install centos-release-openstack-newton
2.安装 OpenStack 客户端:
# yum install python-openstackclient
# yum install openstack-selinux
在linux-node1上安装:
3.安装数据库:
# yum install mariadb mariadb-server python2-Pymysql
vim /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.56.11
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
4.消息队列:
# yum install rabbitmq-server
5.其它服务提前安装:
# yum install openstack-keystone httpd mod_wsgi
# yum install openstack-glance
# yum install openstack-nova-api openstack-nova-conductor
openstack-nova-console openstack-nova-novncproxy
openstack-nova-scheduler
# yum install openstack-neutron openstack-neutron-ml2
openstack-neutron-linuxbridge ebtables
以上是关于openstack的主要内容,如果未能解决你的问题,请参考以下文章