Openstack,nova主机要修改/etc/hosts
[[email protected] ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.6.126 openstack
192.168.6.164 nova
修改openstack主机上的answer.ini文件中的98行和102行
[[email protected] ~]# vim answer.ini
CONFIG_COMPUTE_HOSTS=192.168.6.126,192.168.6.164
# List of servers on which to install the network service such as
# Compute networking (nova network) or OpenStack Networking (neutron).
CONFIG_NETWORK_HOSTS=192.168.6.126,192.168.6.164
[[email protected] ~]# packstack --answer-file=answer.ini
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20180725-074943-N6JSe6/openstack-setup.log
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
[email protected]'s password:
Setting up ssh keys
[[email protected] ~]# ifconfig | head -3
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.6.164 netmask 255.255.255.0 broadcast 192.168.6.255
inet6 fe80::5054:ff:fef7:ded0 prefixlen 64 scopeid 0x20<link>
[[email protected] ~]# vim /etc/httpd/conf.d/15-horizon_vhost.conf
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias /dashboard "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi"
[[email protected] ~]# apachectl graceful
[[email protected] ~]# ls
anaconda-ks.cfg ifcfg-eth0 rh6.img
answer.ini keystonerc_admin RPM-GPG-KEY-CentOS-7
[[email protected] ~]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=2250e0cbc9b34b31
export OS_AUTH_URL=http://192.168.6.126:5000/v2.0
export PS1='[\[email protected]\h \W(keystone_admin)]\$ '
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne
修改admin的登录密码
[[email protected] ~]# vim keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=redhat
export OS_AUTH_URL=http://192.168.6.126:5000/v2.0
export PS1='[\[email protected]\h \W(keystone_admin)]\$ '
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne
云主机热迁移
[[email protected] ~]# virsh list
Id 名称 状态
----------------------------------------------------
2 instance-00000015 running
3 instance-0000001b running
[[email protected] ~]#
[[email protected] ~]# virsh list
Id 名称 状态
----------------------------------------------------
[[email protected] ~]#
在编辑云主机中选择云主机热迁移
[[email protected] ~]# virsh list
Id 名称 状态
----------------------------------------------------
1 instance-0000001b running
[[email protected] ~]# virsh list
Id 名称 状态
----------------------------------------------------
2 instance-00000015 running
此时的主机已经由openstack变成了nova,完成了热迁移
排错:
[[email protected] ~]# grep -Pv "^(#|$)" /etc/nova/nova.conf | grep openstack
vncserver_proxyclient_address=openstack
[[email protected] system]# cd /usr/lib/systemd/system
[[email protected] system]# systemctl restart openstack-nova-console