1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/virt-using-flags-specify.adoc
2024-09-26 20:27:56 +00:00

31 lines
1.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * virt/virtual_machines/virt-specifying-instance-preference.adoc
:_mod-docs-content-type: PROCEDURE
[id="virt-using-flags-specify_{context}"]
= Using flags to specify instance types and preferences
Specify instance types and preferences by using flags.
.Prerequisites
* You must have an instance type, preference, or both on the cluster.
.Procedure
. To specify an instance type when creating a VM, use the `--instancetype` flag. To specify a preference, use the `--preference` flag. The following example includes both flags:
+
[source,terminal]
----
$ virtctl create vm --instancetype <my_instancetype> --preference <my_preference>
----
. Optional: To specify a namespaced instance type or preference, include the `kind` in the value passed to the `--instancetype` or `--preference` flag command. The namespaced instance type or preference must be in the same namespace you are creating the VM in. The following example includes flags for a namespaced instance type and a namespaced preference:
+
[source,terminal]
----
$ virtctl create vm --instancetype virtualmachineinstancetype/<my_instancetype> --preference virtualmachinepreference/<my_preference>
----