部署openstack可参考:https://blog.51cto.com/14832653/2516210
配置虚拟机设置
导入环境变量
[root@controller ~]# vi admin-openrc
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=openstack
export OS_AUTH_URL=http://controller:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
[root@controller ~]# source admin-openrc
controller配置
[root@controller ~]# vi /etc/openstack-dashboard/local_settings
OPENSTACK_HYPERVISOR_FEATURES = {
‘can_set_mount_point‘: False,
‘can_set_password‘: True,
‘requires_keypair‘: False,
}
#重启服务
[root@controller ~]# systemctl restart httpd.service memcached.service
computer配置
[root@computer ~]# vi /etc/nova/nova.conf
[libvirt]
inject_password = true
inject_partition = -1
#重启服务
[root@computer ~]# systemctl stop libvirtd.service openstack-nova-compute.service
[root@computer ~]# systemctl start libvirtd.service openstack-nova-compute.service
下载镜像包
下载CentOS-7-x86_64-DVD-1810.iso镜像包
[root@controller ~]# openstack image create "Centos7.3" --file CentOS-7-x86_64-DVD-1810.iso --disk-format iso --container-format bare --public
[root@controller ~]# openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
创建新卷作为系统安装盘
把创建的卷挂载到实例上并开始安装Centos7系统,安装完成后不需重启
网络设置暂时不需设置
解除实例的卷挂载,删除实例,把创建的卷上传为镜像
设置root密码
Openstack通过ISO部署Centos7带GUI虚拟机
原文:https://blog.51cto.com/14832653/2541538