Skip to content

Commit 2427213

Browse files
authored
Merge pull request #85245 from sbeskin-redhat/CNV_48102_infer-instancetype-from_and_infer-preference-from_flags
CNV-48102: Documenting "--infer-instancetype-from" and "--infer-preference-from" flags
2 parents acf7568 + 8c41627 commit 2427213

File tree

7 files changed

+54
-17
lines changed

7 files changed

+54
-17
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4559,8 +4559,8 @@ Topics:
45594559
- Name: Creating VMs using the CLI
45604560
Dir: creating_vms_cli
45614561
Topics:
4562-
- Name: Creating VMs using a VirtualMachine manifest
4563-
File: virt-create-vm-manifest-virtctl
4562+
- Name: Creating virtual machines from the command line
4563+
File: virt-creating-vms-from-cli
45644564
- Name: Creating VMs by using container disks
45654565
File: virt-creating-vms-from-container-disks
45664566
- Name: Creating VMs by cloning PVCs

_topic_maps/_topic_map_rosa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,8 +1919,8 @@ Topics:
19191919
- Name: Creating VMs using the CLI
19201920
Dir: creating_vms_cli
19211921
Topics:
1922-
- Name: Creating VMs using a VirtualMachine manifest
1923-
File: virt-create-vm-manifest-virtctl
1922+
- Name: Creating virtual machines from the command line
1923+
File: virt-creating-vms-from-cli
19241924
- Name: Creating VMs by using container disks
19251925
File: virt-creating-vms-from-container-disks
19261926
- Name: Creating VMs by cloning PVCs

modules/virt-infer-instancetype-preference.adoc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,21 @@ You can use the `--infer-instancetype` and `--infer-preference` flags to infer w
1818
1919
.Procedure
2020

21-
* 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:
21+
* 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:
2222
2323
+
2424
[source,terminal]
2525
----
2626
$ virtctl create vm --volume-import type:pvc,src:my-ns/my-pvc --infer-instancetype --infer-preference
2727
----
2828

29+
* 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`.
30+
+
31+
[source,terminal]
32+
----
33+
$ virtctl create vm \
34+
--volume-import=type:pvc,src:my-ns/my-pvc-a,name:volume-a \
35+
--volume-import=type:pvc,src:my-ns/my-pvc-b,name:volume-b \
36+
--infer-instancetype-from volume-b \
37+
--infer-preference-from volume-b
38+
----

virt/creating_vm/virt-creating-vms-from-instance-types.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,16 @@ include::modules/virt-about-instance-types.adoc[leveloffset=+1]
2020

2121
include::modules/virt-common-instancetypes.adoc[leveloffset=+1]
2222

23+
[id="virt-specifying-instance-preference_{context}"]
24+
== Specifying an instance type or preference
25+
26+
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.
27+
28+
include::modules/virt-using-flags-specify.adoc[leveloffset=+2]
29+
30+
include::modules/virt-infer-instancetype-preference.adoc[leveloffset=+2]
31+
32+
include::modules/virt-inferfromvolume-labels.adoc[leveloffset=+2]
33+
34+
include::modules/virt-creating-vm-instancetype.adoc[leveloffset=+1]
35+

virt/creating_vms_advanced/creating_vms_advanced_web/virt-creating-vms-from-rh-images-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ You can create virtual machines (VMs) from operating system images provided by R
1818
1919
* 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]
2020
21-
* 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]
21+
* 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]
2222
2323
[IMPORTANT]
2424
====

virt/creating_vms_advanced/creating_vms_cli/virt-create-vm-manifest-virtctl.adoc

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="virt-creating-vms-from-cli"]
3+
= Creating virtual machines from the command line
4+
include::_attributes/common-attributes.adoc[]
5+
:context: virt-creating-vms-cli
6+
7+
toc::[]
8+
9+
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.
10+
11+
[NOTE]
12+
====
13+
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].
14+
====
15+
16+
[id="creating-manifests-virtctl_{context}"]
17+
== Creating manifests by using the virtctl tool
18+
19+
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].
20+
21+
include::modules/virt-creating-vm-cli.adoc[leveloffset=+1]
22+
23+
.Next steps
24+
25+
* xref:../../../virt/managing_vms/virt-accessing-vm-ssh.adoc#virt-accessing-vm-ssh[Configuring SSH access to virtual machines]

0 commit comments

Comments
 (0)