-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
208 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * virt/virtual_machines/creating_vms_rh/virt-creating-vms-from-instance-types.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="virt-about-instance-types_{context}"] | ||
= About instance types | ||
|
||
An instance type is a reusable object where you can define resources and characteristics to apply to new VMs. You can define custom instance types or use the variety that are included when you install {VirtProductName}. You can create instance types by using YAML files or the `virtctl` CLI tool. | ||
|
||
{VirtProductName} provides two CRDs for configuring instance types: | ||
|
||
* A namespaced object: `VirtualMachineInstancetype` | ||
* A cluster-wide object: `VirtualMachineClusterInstancetype` | ||
These objects use the same `VirtualMachineInstancetypeSpec`. | ||
|
||
[id="required-attributes_{context}"] | ||
== Required attributes | ||
|
||
When you configure an instance type, you must define the `cpu` and `memory` attributes. Other attributes are optional. | ||
|
||
[NOTE] | ||
==== | ||
When you create a VM from an instance type, you cannot override any parameters defined in the instance type. | ||
Because CPU and memory resources must be defined in an instance type, requests for these resources are always rejected. | ||
==== | ||
|
||
.Example YAML file with required fields | ||
[source,yaml] | ||
---- | ||
apiVersion: instancetype.kubevirt.io/v1beta1 | ||
kind: VirtualMachineInstancetype | ||
metadata: | ||
name: example-instancetype | ||
spec: | ||
cpu: | ||
guest: 1 <1> | ||
memory: | ||
guest: 128Mi <2> | ||
---- | ||
<1> Required. The number of vCPUs to allocate to the guest. | ||
<2> Required. The amount of memory to allocate to the guest. | ||
|
||
.Example `virtctl` command with required fields | ||
[source,terminal] | ||
---- | ||
$ virtctl create instancetype --cpu 2 --memory 256Mi | ||
---- | ||
|
||
[id="optional-attributes_{context}"] | ||
== Optional attributes | ||
|
||
In addition to the required `cpu` and `memory` attributes, you can include the following optional attributes in the `VirtualMachineInstancetypeSpec`: | ||
|
||
[%collapsible] | ||
-- | ||
`annotations`:: List annotations to apply to the VM. | ||
`gpus`:: List vGPUs for passthrough. | ||
`hostDevices`:: List host devices for passthrough. | ||
`ioThreadsPolicy`:: Define an IO threads policy for managing dedicated disk access. | ||
`launchSecurity`:: Configure Secure Encrypted Virtualization (SEV). | ||
`nodeSelector`:: Specify node selectors to control the nodes where this VM is scheduled. | ||
`schedulerName`:: Define a custom scheduler to use for this VM instead of the default scheduler. | ||
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * virt/virtual_machines/creating_vms_rh/virt-creating-vms-from-instance-types.adoc | ||
|
||
:_mod-docs-content-type: REFERENCE | ||
[id="virt-common-instancetypes_{context}"] | ||
= Pre-defined instance types | ||
|
||
{VirtProductName} includes a set of pre-defined instance types called `common-instancetypes`. Some are specialized for specific workloads and others are workload-agnostic. | ||
|
||
These instance type resources are named according to their series, version, and size. The size value follows the `.` delimiter and ranges from `nano` to `8xlarge`. | ||
|
||
.`common-instancetypes` series comparison | ||
|
||
[cols="2a,1a,2a,1a,2a"][%collapsible] | ||
|=== | ||
^.^|Use case ^.^|Series ^.^|Characteristics ^.^|vCPU to memory ratio ^.^|Example resource | ||
|
||
^.^|Universal | ||
^.^|U | ||
a| | ||
* Burstable CPU performance | ||
^.^|1:4 | ||
.^a|`u1.medium`:: | ||
* 1 vCPUs | ||
* 4 Gi memory | ||
|
||
^.^|Overcommitted | ||
^.^|O | ||
a| | ||
* Overcommitted memory | ||
* Burstable CPU performance | ||
^.^|1:4 | ||
.^a|`o1.small`:: | ||
* 1 vCPU | ||
* 2Gi memory | ||
|
||
^.^|Compute-exclusive | ||
^.^|CX | ||
a| | ||
* Hugepages | ||
* Dedicated CPU | ||
* Isolated emulator threads | ||
* vNUMA | ||
^.^|1:2 | ||
.^a|`cx1.2xlarge`:: | ||
* 8 vCPUs | ||
* 16Gi memory | ||
|
||
^.^|NVIDIA GPU | ||
^.^|GN | ||
a| | ||
* For VMs that use GPUs provided by the NVIDIA GPU Operator | ||
* Has predefined GPUs | ||
* Burstable CPU performance | ||
^.^|1:4 | ||
.^a|`gn1.8xlarge`:: | ||
* 32 vCPUs | ||
* 128Gi memory | ||
|
||
^.^|Memory-intensive | ||
^.^|M | ||
a| | ||
* Hugepages | ||
* Burstable CPU performance | ||
^.^|1:8 | ||
.^a|`m1.large`:: | ||
* 2 vCPUs | ||
* 16Gi memory | ||
|
||
^.^|Network-intensive | ||
^.^|N | ||
a| | ||
* Hugepages | ||
* Dedicated CPU | ||
* Isolated emulator threads | ||
* Requires nodes capable of running DPDK workloads | ||
^.^|1:2 | ||
.^a|`n1.medium`:: | ||
* 4 vCPUs | ||
* 4Gi memory | ||
|=== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters