openstack

 虛擬化管理工具安裝node

newton 版源地址python

http://vault.centos.org mysql

http://vault.centos.org/7.4.1708/cloud/x86_64/openstack-newton/linux


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

[root@linux-node1 ~]# systemctl enable libvirtd
[root@linux-node1 ~]# systemctl start libvirtd數據庫


1.qemu-img create -f raw /opt/CentOS-7-x86_64.raw 10Gvim

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 --noautoconsolecentos

3.TightVNC 鏈接到192.168.56.11:5900api

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

相關文章
相關標籤/搜索