11.4. 将 VMware 镜像添加到 Satellite 服务器
VMware vSphere 使用模板作为镜像来创建新虚拟机。如果使用基于镜像的调配来创建新主机,则需要在 Satellite 服务器中添加 VMware 模板详情。这包括访问详情和模板名称。
要使用 CLI 而不是 Satellite Web UI,请参阅 CLI 过程。
流程
- 在 Satellite Web UI 中,进入到 Infrastructure > Compute Resources。
- 选择 VMware 计算资源。
- 点 Create Image。
- 在 Name 字段中输入镜像的名称。
- 从 Operating System 列表中,选择镜像的基本操作系统。
- 从 Architecture 列表中,选择操作系统架构。
-
在 Username 字段中,输入用于镜像访问的 SSH 用户名。默认情况下,这设置为
root
。 -
如果您的镜像支持用户数据输入,如
cloud-init
数据,点 User data 复选框。 - 可选:在 Password 字段中输入 SSH 密码来访问镜像。
- 从 Image 列表中,从 VMware 选择一个镜像。
- 点 Submit 以保存镜像详情。
CLI 过程
使用
hammer compute-resource image create
命令创建镜像。使用--uuid
字段在 vSphere 环境中存储相对模板路径:# hammer compute-resource image create \ --architecture "My_Architecture" \ --compute-resource "My_VMware" --name "My_Image" \ --operatingsystem "My_Operating_System" \ --username root \ --uuid "My_UUID"