9.4. 在计算配置集中添加 KVM 详情

使用这个步骤将 KVM 硬件设置添加到计算配置集中。当您使用此计算配置文件在 KVM 上创建主机时,这些设置会被自动填充。

流程

  1. 在 Satellite Web UI 中,导航到 Infrastructure > Compute Profiles
  2. 在 Compute Profiles 窗口中,单击现有计算配置文件的名称,或者单击 Create Compute Profile,输入 Name,再单击 Submit
  3. 单击 KVM 计算资源的名称。
  4. CPU 字段中,输入分配给新主机的 CPU 数量。
  5. Memory 字段中输入要分配给新主机的内存量。
  6. Image 列表中,选择在执行基于镜像置备时要使用的镜像。
  7. Network Interfaces 列表中,为主机网络接口选择网络参数。您可以创建多个网络接口。但是,至少有一个接口必须指向胶囊管理网络。
  8. Storage 区域,为主机输入存储参数。您可以为主机创建多个卷。
  9. 单击 Submit,将设置保存到 compute 配置文件。

对于 CLI 用户

  1. 运行以下命令来创建计算配置集:

    # hammer compute-profile create --name "Libvirt CP"
  2. 要为 compute 配置集添加值,请输入以下命令:

    # hammer compute-profile values create --compute-profile "Libvirt CP" \
    --compute-resource "My_KVM_Server" \
    --interface "compute_type=network,compute_model=virtio,compute_network=examplenetwork" \
    --volume "pool_name=default,capacity=20G,format_type=qcow2" \
    --compute-attributes "cpus=1,memory=1073741824"