本文主要是介绍26.控制节点安装nova服务|配置计算节点,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
配置控制节点nova服务:
-
- nova软件包安装:
# yum install openstack-nova.noarch openstack-nova-api.noarch openstack-nova-common.noarchopenstac
k-nova-conductor.noarch openstack-nova-novncproxy.noarch openstack-nova-scheduler.noarch
-
- 创建nova用户:
# openstack user create nova --password redhat
-
- 添加nova用户的admin权限:
# openstack role add --user nova --project services admin
-
- 创建nova服务:
# openstack service create --name nova compute
# openstack service create --name novav3 computev3
-
- 创建endpoint:
# openstack endpoint create --region RegionOne --publicurl 'http://192.168.179.140:8774/v2/%(tenant_id)s' --internalurl 'http://192.168.179.140:8774/v2/%(tenant_id)s' --adminurl 'http://192.168.179.140:8774/v2/%(tenant_id)s' 09b97fcef9204706ab4011e6b0e852e2
# openstack endpoint create --region RegionOne --publicurl 'http://127.0.0.1:8774/v3' --internalurl 'http://127.0.0.1:8774/v3' --adminurl 'http://127.0.0.1:8774/v3' 791c2ae5a7a246a1a30932f284a1f7b5
-
- 配置nova配置文件:
-
- 创建nova数据库:
create database nova;
grant all privileges on nova.* to nova@'%' identified by 'redhat';
grant all privileges on nova.* to nova@'localhost' identified by 'redhat';
grant all privileges on nova.* to nova@'192.168.179.140' identified by 'redhat';
-
- 初始化同步数据库:
sh -c 'nova-manage db sync' nova
-
- 启动nova服务:
# systemctl start openstack-nova-api.service openstack-nova-conductor.service openstack-nova-novncproxy.service openstack-nova-consoleauth.service openstack-
nova-scheduler.service
配置计算节点nova服务:
-
- 安装nova-compute软件:
# yum install openstack-nova-compute.noarch -y
-
- 修改配置文件:
-
- 启动服务
systemctl start libvirtd
systemctl start openstack-nova-compute.service
-
- 检查nova compute状态:
# nova-manage host list
对虚拟机管理:
-
- 如何删除一个compute:
删除数据库
登录查看:
dashboard中查看:
从数据库中删除:
先# systemctl stop openstack-nova-compute.service
删除compute_nodes和services 表中的数据
然后compute 就删除了,如图
但是nova start 这个compute后,compute会重新到数据库里面注册
数据库中又会出现:
-
- 创建虚拟机,采用dashboard的方式或者command:
# openstack image list
# neutron net-list
# openstack flavor list
# nova help boot
# nova boot --nic net-id=199831c6-a8db-483d-9b3a-80cf17aca194 --flavor 1 --image 688f07c0-8a31-4e1c-924d-c897128118f5 small
这篇关于26.控制节点安装nova服务|配置计算节点的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!