24.9. 构建完整磁盘镜像
设置环境变量和自定义镜像后,使用 openstack overcloud image build
命令创建镜像。
步骤
使用所有必要配置文件运行
openstack overcloud image build
命令。# openstack overcloud image build \ --image-name overcloud-hardened-full \ 1 --config-file /home/stack/overcloud-hardened-images-python3-custom.yaml \ 2 --config-file /usr/share/openstack-tripleo-common/image-yaml/overcloud-hardened-images-rhel8.yaml 3
- 1
- 对于 UEFI 完整磁盘镜像,请使用
overcloud-hardened-uefi-full
。 - 2
overcloud-hardened-images-python3-custom.yaml
文件是包含新磁盘大小的自定义配置文件。如果您不使用其他自定义磁盘大小,请使用原始/usr/share/openstack-tripleo-common/image-yaml/overcloud-hardened-images-python3.yaml
文件。对于标准的 UEFI 完整磁盘镜像,请使用overcloud-hardened-images-uefi-python3.yaml
。- 3
- 对于 UEFI 完整磁盘镜像,请使用
overcloud-hardened-images-uefi-rhel8.yaml
。
该命令会创建一个称为
overcloud-hardened-full.qcow2
的镜像,其中包含所有必需的安全功能。