1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

CNV-48102

This commit is contained in:
sbeskin
2025-01-15 11:20:15 +02:00
committed by openshift-cherrypick-robot
parent 9fd1f6aec8
commit d4636c1883
7 changed files with 54 additions and 17 deletions

View File

@@ -4555,8 +4555,8 @@ Topics:
- Name: Creating VMs using the CLI
Dir: creating_vms_cli
Topics:
- Name: Creating VMs using a VirtualMachine manifest
File: virt-create-vm-manifest-virtctl
- Name: Creating virtual machines from the command line
File: virt-creating-vms-from-cli
- Name: Creating VMs by using container disks
File: virt-creating-vms-from-container-disks
- Name: Creating VMs by cloning PVCs

View File

@@ -1919,8 +1919,8 @@ Topics:
- Name: Creating VMs using the CLI
Dir: creating_vms_cli
Topics:
- Name: Creating VMs using a VirtualMachine manifest
File: virt-create-vm-manifest-virtctl
- Name: Creating virtual machines from the command line
File: virt-creating-vms-from-cli
- Name: Creating VMs by using container disks
File: virt-creating-vms-from-container-disks
- Name: Creating VMs by cloning PVCs

View File

@@ -18,7 +18,7 @@ You can use the `--infer-instancetype` and `--infer-preference` flags to infer w
.Procedure
* To explicitly infer instance types from the volume used to boot the virtual machine, use the `--infer-instancetype` flag. To explicitly infer preferences, use the `--infer-preference` flag. The following command includes both flags:
* To explicitly infer instance types from the volume used to boot the VM, use the `--infer-instancetype` flag. To explicitly infer preferences, use the `--infer-preference` flag. The following command includes both flags:
+
[source,terminal]
@@ -26,3 +26,13 @@ You can use the `--infer-instancetype` and `--infer-preference` flags to infer w
$ virtctl create vm --volume-import type:pvc,src:my-ns/my-pvc --infer-instancetype --infer-preference
----
* To infer an instance type or preference from a volume other than the volume used to boot the VM, use the `--infer-instancetype-from` and `--infer-preference-from` flags to specify any of the virtual machine's volumes. In the example below, the virtual machine boots from `volume-a` but infers the instancetype and preference from `volume-b`.
+
[source,terminal]
----
$ virtctl create vm \
--volume-import=type:pvc,src:my-ns/my-pvc-a,name:volume-a \
--volume-import=type:pvc,src:my-ns/my-pvc-b,name:volume-b \
--infer-instancetype-from volume-b \
--infer-preference-from volume-b
----

View File

@@ -20,3 +20,16 @@ include::modules/virt-about-instance-types.adoc[leveloffset=+1]
include::modules/virt-common-instancetypes.adoc[leveloffset=+1]
[id="virt-specifying-instance-preference_{context}"]
== Specifying an instance type or preference
You can specify an instance type, a preference, or both to define a set of workload sizing and runtime characteristics for reuse across multiple VMs.
include::modules/virt-using-flags-specify.adoc[leveloffset=+2]
include::modules/virt-infer-instancetype-preference.adoc[leveloffset=+2]
include::modules/virt-inferfromvolume-labels.adoc[leveloffset=+2]
include::modules/virt-creating-vm-instancetype.adoc[leveloffset=+1]

View File

@@ -18,7 +18,7 @@ You can create virtual machines (VMs) from operating system images provided by R
* xref:../../../virt/creating_vm/virt-creating-vms-from-instance-types.adoc#virt-creating-vms-from-instance-types[Creating a VM from an instance type by using the web console]
* xref:../../../virt/creating_vms_advanced/creating_vms_cli/virt-create-vm-manifest-virtctl.adoc#virt-create-vm-manifest-virtctl[Creating a VM from a `VirtualMachine` manifest by using the command line]
* xref:../../../virt/creating_vms_advanced/creating_vms_cli/virt-creating-vms-from-cli.adoc#virt-creating-vms-from-cli[Creating a VM from a `VirtualMachine` manifest by using the command line]
[IMPORTANT]
====

View File

@@ -1,11 +0,0 @@
:_mod-docs-content-type: ASSEMBLY
[id="virt-create-vm-manifest-virtctl"]
= Creating manifests by using the virtctl tool
include::_attributes/common-attributes.adoc[]
:context: virt-create-vm-manifest-virtctl
You can use the `virtctl` CLI utility to simplify creating manifests for VMs, VM instance types, and VM preferences. For more information, see xref:../../../virt/getting_started/virt-using-the-cli-tools.adoc#vm-manifest-creation-commands_virt-using-the-cli-tools[VM manifest creation commands].
//If you have a `VirtualMachine` manifest, you can create a VM from the xref:../../../virt/virtual_machines/creating_vms_rh/virt-creating-vms-from-cli.adoc#virt-creating-vms-from-cli[command line].
include::modules/virt-creating-vm-instancetype.adoc[leveloffset=+1]

View File

@@ -0,0 +1,25 @@
:_mod-docs-content-type: ASSEMBLY
[id="virt-creating-vms-from-cli"]
= Creating virtual machines from the command line
include::_attributes/common-attributes.adoc[]
:context: virt-creating-vms-cli
toc::[]
You can create virtual machines (VMs) from the command line by editing or creating a `VirtualMachine` manifest. You can simplify VM configuration by using an xref:../../../virt/creating_vm/virt-creating-vms-from-instance-types.adoc#virt-creating-vms-from-instance-types[instance type] in your VM manifest.
[NOTE]
====
You can also xref:../../../virt/creating_vm/virt-creating-vms-from-instance-types.adoc#virt-creating-vms-from-instance-types[create VMs from instance types by using the web console].
====
[id="creating-manifests-virtctl_{context}"]
== Creating manifests by using the virtctl tool
You can use the `virtctl` CLI utility to simplify creating manifests for VMs, VM instance types, and VM preferences. For more information, see xref:../../../virt/getting_started/virt-using-the-cli-tools.adoc#vm-manifest-creation-commands_virt-using-the-cli-tools[VM manifest creation commands].
include::modules/virt-creating-vm-cli.adoc[leveloffset=+1]
.Next steps
* xref:../../../virt/managing_vms/virt-accessing-vm-ssh.adoc#virt-accessing-vm-ssh[Configuring SSH access to virtual machines]