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

Virtualization docs fixes during ROSA review

This commit is contained in:
Michael Burke
2023-12-06 14:42:18 -05:00
committed by openshift-cherrypick-robot
parent abcf559ee1
commit 2faa8763aa
27 changed files with 119 additions and 82 deletions

View File

@@ -46,7 +46,7 @@ volumes:
+
[source,terminal]
----
$ virtctl start <vm>
$ virtctl start <vm> -n <namespace>
----
* If the VM is running, reboot the VM or run the following command:

View File

@@ -152,8 +152,8 @@ $ oc create -f <manifest_file>.yaml
+
[source,terminal]
----
$ virtctl start vm example-vm
----
$ virtctl start vm example-vm -n example-namespace
----
.Verification
. Get the VM configuration:
@@ -187,6 +187,7 @@ endif::[]
source:
secret:
secretName: authorized-keys
# ...
----
ifeval::["{context}" == "static-key"]

View File

@@ -83,17 +83,17 @@ $ oc apply -f <vm_name>.yaml <1>
+
[source,yaml]
----
apiVersion: v1
kind: Service
metadata:
name: vm-istio
spec:
selector:
app: vm-istio <1>
ports:
- port: 8080
name: http
protocol: TCP
apiVersion: v1
kind: Service
metadata:
name: vm-istio
spec:
selector:
app: vm-istio <1>
ports:
- port: 8080
name: http
protocol: TCP
----
<1> The service selector that determines the set of pods targeted by a service. This attribute corresponds to the `spec.metadata.labels` field in the VM configuration file. In the above example, the `Service` object named `vm-istio` targets TCP port 8080 on any pod with the label `app=vm-istio`.

View File

@@ -20,7 +20,7 @@ TPM device. A vTPM device also stores secrets for that VM.
+
[source,terminal]
----
$ oc edit vm <vm_name>
$ oc edit vm <vm_name> -n <namespace>
----
. Edit the VM specification to add the vTPM device. For example:

View File

@@ -7,7 +7,7 @@
[id="virt-configuring-storage-class-bootsource-update_{context}"]
= Configuring a storage class for custom boot source updates
Specify a new default storage class in the `HyperConverged` custom resource (CR).
You can override the default storage class by editing the `HyperConverged` custom resource (CR).
[IMPORTANT]
====
@@ -39,9 +39,20 @@ spec:
template:
spec:
storageClassName: <new_storage_class> <1>
#...
schedule: "0 */12 * * *" <2>
managedDataSource: <data_source> <3>
# ...
----
<1> Define the storage class.
<2> Required: Schedule for the job specified in cron format.
<3> Required: The data source to use.
+
--
[NOTE]
----
For the custom image to be detected as an available boot source, the value of the `spec.dataVolumeTemplates.spec.sourceRef.name` parameter in the VM template must match this value.
----
--
. Remove the `storageclass.kubernetes.io/is-default-class` annotation from the current default storage class.
.. Retrieve the name of the current default storage class by running the following command:
@@ -54,10 +65,9 @@ $ oc get storageclass
.Example output
[source,text]
----
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
csi-manila-ceph manila.csi.openstack.org Delete Immediate false 11d
hostpath-csi-basic (default) kubevirt.io.hostpath-provisioner Delete WaitForFirstConsumer false 11d <1>
...
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
csi-manila-ceph manila.csi.openstack.org Delete Immediate false 11d
hostpath-csi-basic (default) kubevirt.io.hostpath-provisioner Delete WaitForFirstConsumer false 11d <1>
----
+
<1> In this example, the current default storage class is named `hostpath-csi-basic`.
@@ -76,4 +86,4 @@ $ oc patch storageclass <current_default_storage_class> -p '{"metadata": {"annot
----
$ oc patch storageclass <new_storage_class> -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' <1>
----
<1> Replace `<new_storage_class>` with the `storageClassName` value that you added to the `HyperConverged` CR.
<1> Replace `<new_storage_class>` with the `storageClassName` value that you added to the `HyperConverged` CR.

View File

@@ -19,7 +19,7 @@ You can connect to a virtual machine (VM) attached to a secondary network by usi
+
[source,terminal]
----
$ oc describe vm <vm_name>
$ oc describe vm <vm_name> -n <namespace>
----
+
.Example output

View File

@@ -34,9 +34,9 @@ metadata:
spec:
config: '{
"cniVersion": "0.3.1",
"name": bridge-network, <3>
"type": cnv-bridge, <4>
"bridge": bridge-interface, <5>
"name": "bridge-network", <3>
"type": "cnv-bridge", <4>
"bridge": "bridge-interface", <5>
"macspoofchk": true, <6>
"vlan": 100, <7>
"preserveDefaultVlan": false <8>

View File

@@ -55,9 +55,15 @@ spec:
selector:
special: key <1>
type: NodePort <2>
ports: <3>
protocol: TCP
port: 80
targetPort: 9376
nodePort: 30000
----
<1> Specify the label that you added to the `spec.template.metadata.labels` stanza of the `VirtualMachine` manifest.
<2> Specify `ClusterIP`, `NodePort`, or `LoadBalancer`.
<3> Specifies a collection of network ports and protocols that you want to expose from the virtual machine.
. Save the `Service` manifest file.
. Create the service by running the following command:

View File

@@ -32,7 +32,7 @@ spec:
spec:
sourceRef:
kind: DataSource
name: rhel9
name: rhel9 <2>
namespace: openshift-virtualization-os-images
storage:
resources:
@@ -82,12 +82,13 @@ spec:
userData: |-
#cloud-config
user: cloud-user
password: '<password>' <2>
password: '<password>' <3>
chpasswd: { expire: False }
name: cloudinitdisk
----
<1> Specify the name of the virtual machine.
<2> Specify the password for cloud-user.
<2> Specify the name in the `spec.dataImportCronTemplate.spec.managedDataSource` field in the `Hyperconvered` CR.
<3> Specify the password for cloud-user.
====
. Create a virtual machine by using the manifest file:
@@ -101,5 +102,5 @@ $ oc create -f <vm_manifest_file>.yaml
+
[source,terminal]
----
$ virtctl start <vm_name>
$ virtctl start <vm_name> -n <namespace>
----

View File

@@ -62,7 +62,7 @@ ifdef::clone[]
. Select the PVC project and the PVC name.
endif::[]
. Set the disk size.
. Click *Customize VirtualMachine*.
. Click *Next*.
. Click *Create VirtualMachine*.
ifeval::["{context}" == "virt-creating-vms-from-web-images"]

View File

@@ -22,11 +22,11 @@ If you create a data volume and omit YAML attributes and these attributes are no
.Procedure
. Edit the storage profile. In this example, the provisioner is not recognized by CDI:
. Edit the storage profile. In this example, the provisioner is not recognized by CDI.
+
[source,terminal,subs="attributes+"]
----
$ oc edit -n {CNVNamespace} storageprofile <storage_class>
$ oc edit storageprofile <storage_class>
----
+
.Example storage profile

View File

@@ -10,12 +10,16 @@ You can disable TLS (transport layer security) for one or more container registr
.Prerequisites
* Log in to the cluster as a user with the `cluster-admin` role.
.Procedure
* Edit the `HyperConverged` custom resource and add a list of insecure registries to the `spec.storageImport.insecureRegistries` field.
. Open the `HyperConverged` CR in your default editor by running the following command:
+
[source,terminal,subs="attributes+"]
----
$ oc edit hyperconverged kubevirt-hyperconverged -n {CNVNamespace}
----
. Add a list of insecure registries to the `spec.storageImport.insecureRegistries` field.
+
.Example `HyperConverged` custom resource
[source,yaml,subs="attributes+"]
----
apiVersion: hco.kubevirt.io/v1beta1
@@ -29,4 +33,4 @@ spec:
- "private-registry-example-1:5000"
- "private-registry-example-2:5000"
----
<1> Replace the examples in this list with valid registry hostnames.
<1> Replace the examples in this list with valid registry hostnames.

View File

@@ -15,11 +15,10 @@ Edit the boot order list in a YAML configuration file by using the CLI.
+
[source,terminal]
----
$ oc edit vm example
$ oc edit vm <vm_name> -n <namespace>
----
. Edit the YAML file and modify the values for the boot order associated with a disk or network interface controller (NIC). For example:
+
[source,yaml]
----
@@ -44,6 +43,3 @@ interfaces:
<2> The boot order value specified for the network interface controller.
. Save the YAML file.
. Click *reload the content* to apply the updated boot order values from the YAML file to the boot order list in the web console.

View File

@@ -28,5 +28,5 @@ $ oc edit vm <vm_name>
+
[source,terminal]
----
$ oc apply vm <vm_name>
$ oc apply vm <vm_name> -n <namespace>
----

View File

@@ -18,7 +18,7 @@ The key is added to the VM by the QEMU guest agent, which is installed with {op-
. Navigate to *Virtualization* -> *VirtualMachines* in the web console.
. Select a VM to open the *VirtualMachine details* page.
. On the *Configure* tab, click *Scripts*.
. On the *Configuration* tab, click *Scripts*.
. If you have not already added a public SSH key to your project, click the edit icon beside *Authorized SSH key* and select one of the following options:
* *Use existing*: Select a secret from the secrets list.

View File

@@ -22,9 +22,13 @@ metadata:
name: preallocated-datavolume
spec:
source: <1>
pvc:
preallocation: true <2>
registry:
url: <image_url> <2>
storage:
resources:
requests:
storage: 1Gi
# ...
----
<1> All CDI source types support preallocation. However, preallocation is ignored for cloning operations.
<2> The default value is `false`.
<2> Specify the URL of the data source in your registry.

View File

@@ -19,7 +19,7 @@ Hot plug a bridge network interface to a virtual machine (VM) while the VM is ru
+
[source,terminal]
----
$ virtctl start <vm_name>
$ virtctl start <vm_name> -n <namespace>
----
. Use the following command to hot plug a new network interface to the running VM. The `virtctl addinterface` command adds the new network interface to the VM and virtual machine instance (VMI) specification but does not attach it to the running VM.

View File

@@ -37,7 +37,7 @@ The `VirtualMachineInstanceMigration` object triggers a live migration of the VM
+
[source,terminal]
----
$ oc describe vmi <vm_name>
$ oc describe vmi <vm_name> -n <namespace>
----
+
.Example output

View File

@@ -0,0 +1,27 @@
// Module included in the following assemblies:
//
// * virt/virtual_machines/virt-controlling-vm-states.adoc
:_mod-docs-content-type: PROCEDURE
[id="virt-pausing-vm-web_{context}"]
= Pausing a virtual machine
You can pause a virtual machine from the web console.
.Procedure
. Click *Virtualization* -> *VirtualMachines* from the side menu.
. Find the row that contains the virtual machine that you want to pause.
. Navigate to the appropriate menu for your use case:
* To stay on this page, where you can perform actions on multiple virtual machines:
.. Click the Options menu {kebab} located at the far right end of the row and click *Pause VirtualMachine*.
* To view comprehensive information about the selected virtual machine before you pause it:
.. Access the *VirtualMachine details* page by clicking the name of the virtual machine.
.. Click *Actions* -> *Pause*.

View File

@@ -117,7 +117,7 @@ networks:
----
$ oc create -f vmi-pxe-boot.yaml
----
+
.Example output
[source,terminal]
----
@@ -148,6 +148,8 @@ $ virtctl vnc vmi-pxe-boot
$ virtctl console vmi-pxe-boot
----
.Verification
. Verify the interfaces and MAC address on the virtual machine and that the interface connected to the bridge has the specified MAC address.
In this case, we used `eth1` for the PXE boot, without an IP address. The other interface, `eth0`, got an IP address from {product-title}.
+
@@ -155,7 +157,7 @@ In this case, we used `eth1` for the PXE boot, without an IP address. The other
----
$ ip addr
----
+
.Example output
[source,terminal]
----

View File

@@ -23,7 +23,7 @@ To avoid errors, do not restart a virtual machine while it has a status of *Impo
* To stay on this page, where you can perform actions on multiple virtual machines:
.. Click the Options menu {kebab} located at the far right end of the row.
.. Click the Options menu {kebab} located at the far right end of the row and click *Restart*.
* To view comprehensive information about the selected virtual machine before
you restart it:
@@ -32,5 +32,3 @@ you restart it:
machine.
.. Click *Actions* -> *Restart*.
. In the confirmation window, click *Restart* to restart the virtual machine.

View File

@@ -49,7 +49,7 @@ $ oc patch storageprofile local --type=merge -p '{"spec": \
{"claimPropertySets": [{"accessModes": ["ReadWriteOnce"], \
"volumeMode": "Filesystem"}]}}'
----
If you cannot resolve the issue, log in to the
link:https://access.redhat.com[Customer Portal] and open a support case,
attaching the artifacts gathered during the diagnosis procedure.

View File

@@ -18,17 +18,13 @@ You can start a virtual machine from the web console.
* To stay on this page, where you can perform actions on multiple virtual machines:
.. Click the Options menu {kebab} located at the far right end of the row.
.. Click the Options menu {kebab} located at the far right end of the row and click *Start VirtualMachine*.
* To view comprehensive information about the selected virtual machine before you start it:
.. Access the *VirtualMachine details* page by clicking the name of the virtual machine.
.. Click *Actions*.
. Select *Restart*.
. In the confirmation window, click *Start* to start the virtual machine.
.. Click *Actions* -> *Start*.
[NOTE]
====

View File

@@ -18,12 +18,10 @@ You can stop a virtual machine from the web console.
* To stay on this page, where you can perform actions on multiple virtual machines:
.. Click the Options menu {kebab} located at the far right end of the row.
.. Click the Options menu {kebab} located at the far right end of the row and click *Stop VirtualMachine*.
* To view comprehensive information about the selected virtual machine before you stop it:
.. Access the *VirtualMachine details* page by clicking the name of the virtual machine.
.. Click *Actions* → *Stop*.
. In the confirmation window, click *Stop* to stop the virtual machine.
.. Click *Actions* → *Stop*.

View File

@@ -11,11 +11,6 @@ You can unpause a paused virtual machine from the web console.
.Prerequisites
* At least one of your virtual machines must have a status of *Paused*.
+
[NOTE]
====
You can pause virtual machines by using the `virtctl` client.
====
.Procedure
@@ -27,7 +22,7 @@ You can pause virtual machines by using the `virtctl` client.
* To stay on this page, where you can perform actions on multiple virtual machines:
.. In the *Status* column, click *Paused*.
.. Click the Options menu {kebab} located at the far right end of the row and click *Unpause VirtualMachine*.
* To view comprehensive information about the selected virtual machine before
you unpause it:
@@ -35,6 +30,4 @@ you unpause it:
.. Access the *VirtualMachine details* page by clicking the name of the virtual
machine.
.. Click the pencil icon that is located on the right side of *Status*.
. In the confirmation window, click *Unpause* to unpause the virtual machine.
.. Click *Actions* → *Unpause*.

View File

@@ -45,8 +45,7 @@ include::modules/virt-creating-linux-bridge-nncp.adoc[leveloffset=+2]
include::modules/virt-creating-linux-bridge-nad-web.adoc[leveloffset=+2]
[id="next-steps_configuring-linux-bridge-network"]
=== Next steps
.Next steps
* xref:../../virt/vm_networking/virt-connecting-vm-to-linux-bridge.adoc#virt-attaching-vm-secondary-network-cli_virt-connecting-vm-to-linux-bridge[Attaching a virtual machine (VM) to a Linux bridge network]
[id="configuring-network-live-migration"]
@@ -70,8 +69,8 @@ include::modules/nw-sriov-configuring-device.adoc[leveloffset=+2]
include::modules/nw-sriov-network-attachment.adoc[leveloffset=+2]
[id="next-steps_configuring-sriov-network"]
=== Next steps
.Next steps
* xref:../../virt/vm_networking/virt-connecting-vm-to-sriov.adoc#virt-attaching-vm-to-sriov-network_virt-connecting-vm-to-sriov[Attaching a virtual machine (VM) to an SR-IOV network]
endif::openshift-rosa,openshift-dedicated[]

View File

@@ -12,8 +12,10 @@ You can use xref:../../virt/getting_started/virt-using-the-cli-tools.adoc#virt-u
include::modules/virt-starting-vm-web.adoc[leveloffset=+1]
include::modules/virt-restarting-vm-web.adoc[leveloffset=+1]
include::modules/virt-stopping-vm-web.adoc[leveloffset=+1]
include::modules/virt-restarting-vm-web.adoc[leveloffset=+1]
include::modules/virt-pausing-vm-web.adoc[leveloffset=+1]
include::modules/virt-unpausing-vm-web.adoc[leveloffset=+1]