如果在虚拟机上使用不受支持的值运行“设置 CPU 资源”操作,则任务将失败,并会在“近期任务”消息中显示错误。

问题

“近期任务”列表指示“设置 CPU 资源”或“设置内存资源”操作的状态为失败。评估选定任务的“消息”列表时,您会看到类似以下示例的消息。

RuntimeFault 异常,消息:[指定的参数不正确。spec.cpuAllocation.reservation] (RuntimeFault exception, message:[A specified parameter was not correct. spec.cpuAllocation.reservation])
RuntimeFault 异常,消息:[指定的参数不正确。spec.cpuAllocation.limits] (RuntimeFault exception, message:[A specified parameter was not correct. spec.cpuAllocation.limits])

原因

您已提交相关操作以增加或减少 CPU、内存预留或包含不受支持值的限制值。例如,如果您提供了一个除 -1 之外的负整数,其将值设置为无限制,则 vCenter Server 无法进行更改且操作失败。

解决方案

  • 使用受支持的值运行操作。
    受支持的预留值包括 0 或大于 0 的值。受支持的限制值包括 -1、0 或大于 0 的值。