码迷,mamicode.com
首页 > 其他好文 > 详细

openstack

时间:2019-01-20 11:57:05      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:1.9   schedule   热添加   shu   mariadb   bit   bind   parent   mysql   

 虚拟化管理工具安装


[root@linux-node1 ~]# yum install -y qemu-kvm libvirt
[root@linux-node1 ~]# yum install -y virt-install

[root@linux-node1 ~]# systemctl enable libvirtd
[root@linux-node1 ~]# 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

内存热添加

[root@linux-node1 ~]# virsh qemu-monitor-command CentOS-7-x86_64 --hmp --cmd info balloon

[root@linux-node1 ~]# 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技术:

虚拟机:虚拟内存
虚拟机:物理内存
宿主机:虚拟内存
宿主机:物理内存

大页内存
[root@linux-node1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled

KSM内存合并
[ksmd]

I/O优化:

2.6 内核: Noop CFQ AS Deadline 默认:CFQ
3.10内核: Noop CFQ Deadline 默认:Deadline

[root@linux-node1 ~]# dmesg | grep -i scheduler
[ 1.945474] io scheduler noop registered
[ 1.945476] io scheduler deadline registered (default)
[ 1.945495] io scheduler cfq registered
[root@linux-node1 ~]# 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

标签:1.9   schedule   热添加   shu   mariadb   bit   bind   parent   mysql   

原文地址:https://www.cnblogs.com/tao-yuan/p/10293986.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!