mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
61 lines
1.7 KiB
Plaintext
61 lines
1.7 KiB
Plaintext
// Module included in the following assemblies:
|
||
//
|
||
// * virt/virtual_machines/virt-create-vms.adoc
|
||
|
||
[id="virt-creating-vm_{context}"]
|
||
= Using the CLI to create a virtual machine
|
||
|
||
.Procedure
|
||
|
||
The `spec` object of the VirtualMachine configuration file references
|
||
the virtual machine settings, such as the number of cores and the amount
|
||
of memory, the disk type, and the volumes to use.
|
||
|
||
. Attach the virtual machine disk to the virtual machine by referencing
|
||
the relevant PVC `claimName` as a volume.
|
||
|
||
. To create a virtual machine with the {product-title} client, run this command:
|
||
+
|
||
[source,terminal]
|
||
----
|
||
$ oc create -f <vm.yaml>
|
||
----
|
||
|
||
. Since virtual machines are created in a *Stopped* state, run a virtual machine
|
||
instance by starting it.
|
||
|
||
[NOTE]
|
||
====
|
||
A https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/[ReplicaSet]’s purpose is often used to guarantee the availability of a specified number of identical pods.
|
||
ReplicaSet is not currently supported in {VirtProductName}.
|
||
====
|
||
|
||
|
||
|
||
[caption=]
|
||
.Domain settings
|
||
|===
|
||
|Setting | Description
|
||
|
||
|Cores
|
||
|The number of cores inside the virtual machine. Must be a value greater than or equal to 1.
|
||
|
||
|Memory
|
||
|The amount of RAM that is allocated to the virtual machine by the node. Specify a value in *M* for Megabyte or *Gi* for Gigabyte.
|
||
|
||
|Disks
|
||
|The name of the volume that is referenced. Must match the name of a volume.
|
||
|===
|
||
|
||
[caption=]
|
||
.Volume settings
|
||
|===
|
||
|Setting | Description
|
||
|
||
|Name
|
||
|The name of the volume, which must be a DNS label and unique within the virtual machine.
|
||
|
||
|PersistentVolumeClaim
|
||
|The PVC to attach to the virtual machine. The `claimName` of the PVC must be in the same project as the virtual machine.
|
||
|===
|