标签(空测试用例格分隔):OpenStack Train 系列
一: Horizon 的使用
1.1 创建实例类型
镜像的下载,上传与配置虚机
centos 官方cloud-images 下载地址
https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-2009.qcow2
上传镜像
openstack image create "CentOS-7.9-x64" --file /root/iso/CentOS-7-x86_64-GenericCloud-2009.qcow2 --disk-format qcow2 --container-format bare --public --min-disk 10 --min-ram 1024
openstack image set --os-distro CentOS-7.9-x64 --os-version CentOS-7.9-x64 --architecture x86_64 CentOS-7.9-x64
1.2 创建密钥对
导入服务器公钥
cd /root/.ssh/
cat id_rsa.pub
1.3 创建网络
1.4 创建实例
配置安全组 开放 ICMP 与 ssh 规则
使用ssh 密钥登陆
ssh centos@172.16.10.166
1.5 创建VXLAN 网络
在项目里面创建
配置路由
接口采用自动获取IP地址
如果接口一直是down 的状态说明l3 服务没有启动
systemctl status neutron-l3-agent.service
systemctl start neutron-l3-agent.service
将这l3的三层服务路由起来
去项目里面创建实例
从实体机上面是ping 不到这个网段的192.30.0.0/24 网段
但是虚拟机可以ping 外部
这个 时候需要创建浮动IP
这样就可以通过 浮动IP 连接这台机器
同一个vlxan 下面的子网 所创建的虚拟机是可以相互ping 通的
之后创建一个 在 192.30.1.x 网段的机器 在 192.30.0.x 网段的机器是可以相互ping 通的
不同vxlan的网段需要通过静态路由
1.6 调整实例的资源大小
在项目里面进行调整
默认调整实例的大小规格要进行确认才可以
可以修改参数 【在所有的计算节点上面修改】
vim /etc/nova/nova.conf
allow_resize_to_same_host = true
allow_migrate_to_same_host = true
resize_confirm_window = 1
重启动nova
systemctl restart openstack-nova-compute.service
做 计算节点的nova用户的 无密钥登陆
默认nova 用户是不给登陆的要先该nova用户的shell 为/bin/bash
先给nova 账号 设置一个密码
echo nova |passwd nova --stdin
然后在做nova的 无密钥登陆
做完即可自动调整虚拟机大小,不需要确认。