Create a VM Class in vSphere Supervisor
vSphere Supervisor
You can use the
vSphere
Automation
Kubernetes REST
APIs to
create custom VM classes to be used for VM deployment in vSphere Supervisor
. Required privileges:
A VM class specifies the CPU, memory, and resource reservations for a VM.
vSphere Supervisor
offers several
preconfigured VM classes which you can use as is, edit, or delete. You can also
create a custom VM class in your vCenter Server
instance and it will be available to all Supervisors
and the namespaces created
in these clusters. Note that even though a VM class is available to all namespaces,
a DevOps user can only use the VM classes associated with the namespaces that he/she
can access. - Create the specification of the VM class object by defining the following options.OptionDescriptionidThe identifier of the VM class must follow these DNS requirements:
- A unique name in the currentvCenter Serverinstance.
- An alphanumeric name with maximum 63 characters.
- No uppercase letters of spaces.
- A dash can be used anywhere except as a first or last character.
cpu_countThe number of virtual CPUs (vCPUs) configured for a VM that are deployed with this VM class.memory_MBThe memory in MB configured for a VM that are deployed with this VM class. The value must be between 4 MB and 24 TB and a multiple of 4.descriptionOptional. The description of the VM class.cpu_reservationOptional. The percentage of total available CPU resources reserved for the VM deployed with the VM class. The percentage you specify with this attribute is multiplied by the minimum CPU available among all cluster nodes to get the CPU resources guaranteed by vSphere for a VM. The resulting value is in MHz.memory_reservationOptional. The percentage of available memory that is reserved for a VM deployed with this VM class. The value can be from 0 through 100%. - Create the VM class object.Use thePOST https://HTTP request and pass the created VM class specification in the request body.<vcenter_ip_address_or_fqdn>/api/vcenter/namespace-management/virtual-machine-classes
After you create the custom VM class, you can edit its
parameters or delete it from your environment. See Editing or Removing a VM Class from Your Environment.
You can make your VM class available to DevOps engineers by
associating it with a namespace. See Associating a VM Class with a vSphere Namespace.