Chapter 3. Getting started


3.1. Getting started with OpenShift Virtualization

You can explore the features and functionalities of OpenShift Virtualization by installing and configuring a basic environment.

Note

Cluster configuration procedures require cluster-admin privileges.

3.1.1. Planning and installing OpenShift Virtualization

Plan and install OpenShift Virtualization on an OpenShift Container Platform cluster:

Planning and installation resources

3.1.2. Creating and managing virtual machines

Create a virtual machine (VM):

Important

{FeatureName} is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

  • Create a VM from a custom image.

    You can create a VM by importing a custom image from a container registry or a web page, by uploading an image from your local machine, or by cloning a persistent volume claim (PVC).

Connect a VM to a secondary network:

Connect to a VM:

Manage a VM:

3.1.3. Next steps

3.2. Using the virtctl and libguestfs CLI tools

You can manage OpenShift Virtualization resources by using the virtctl command line tool.

You can access and modify virtual machine (VM) disk images by using the libguestfs command line tool. You deploy libguestfs by using the virtctl libguestfs command.

3.2.1. Installing virtctl

To install virtctl on Red Hat Enterprise Linux (RHEL) 9, Linux, Windows, and MacOS operating systems, you download and install the virtctl binary file.

To install virtctl on RHEL 8, you enable the OpenShift Virtualization repository and then install the kubevirt-virtctl package.

3.2.1.1. Installing the virtctl binary on RHEL 9, Linux, Windows, or macOS

You can download the virtctl binary for your operating system from the OpenShift Container Platform web console and then install it.

Procedure

  1. Navigate to the Virtualization Overview page in the web console.
  2. Click the Download virtctl link to download the virtctl binary for your operating system.
  3. Install virtctl:

    • For RHEL 9 and other Linux operating systems:

      1. Decompress the archive file:

        $ tar -xvf <virtctl-version-distribution.arch>.tar.gz
      2. Run the following command to make the virtctl binary executable:

        $ chmod +x <path/virtctl-file-name>
      3. Move the virtctl binary to a directory in your PATH environment variable.

        You can check your path by running the following command:

        $ echo $PATH
      4. Set the KUBECONFIG environment variable:

        $ export KUBECONFIG=/home/<user>/clusters/current/auth/kubeconfig
    • For Windows:

      1. Decompress the archive file.
      2. Navigate the extracted folder hierarchy and double-click the virtctl executable file to install the client.
      3. Move the virtctl binary to a directory in your PATH environment variable.

        You can check your path by running the following command:

        C:\> path
    • For macOS:

      1. Decompress the archive file.
      2. Move the virtctl binary to a directory in your PATH environment variable.

        You can check your path by running the following command:

        echo $PATH

3.2.1.2. Installing the virtctl RPM on RHEL 8

You can install the virtctl RPM package on Red Hat Enterprise Linux (RHEL) 8 by enabling the OpenShift Virtualization repository and installing the kubevirt-virtctl package.

Prerequisites

  • Each host in your cluster must be registered with Red Hat Subscription Manager (RHSM) and have an active OpenShift Container Platform subscription.

Procedure

  1. Enable the OpenShift Virtualization repository by using the subscription-manager CLI tool to run the following command:

    # subscription-manager repos --enable cnv-4.14-for-rhel-8-x86_64-rpms
  2. Install the kubevirt-virtctl package by running the following command:

    # yum install kubevirt-virtctl

3.2.2. virtctl commands

The virtctl client is a command-line utility for managing OpenShift Virtualization resources.

Note

The virtual machine (VM) commands also apply to virtual machine instances (VMIs) unless otherwise specified.

3.2.2.1. virtctl information commands

You use virtctl information commands to view information about the virtctl client.

Table 3.1. Information commands
CommandDescription

virtctl version

View the virtctl client and server versions.

virtctl help

View a list of virtctl commands.

virtctl <command> -h|--help

View a list of options for a specific command.

virtctl options

View a list of global command options for any virtctl command.

3.2.2.2. VM information commands

You can use virtctl to view information about virtual machines (VMs) and virtual machine instances (VMIs).

Table 3.2. VM information commands
CommandDescription

virtctl fslist <vm_name>

View the file systems available on a guest machine.

virtctl guestosinfo <vm_name>

View information about the operating systems on a guest machine.

virtctl userlist <vm_name>

View the logged-in users on a guest machine.

3.2.2.3. VM management commands

You use virtctl virtual machine (VM) management commands to manage and migrate virtual machines (VMs) and virtual machine instances (VMIs).

Table 3.3. VM management commands
CommandDescription

virtctl create -name <vm_name>

Create a VirtualMachine manifest.

virtctl start <vm_name>

Start a VM.

virtctl start --paused <vm_name>

Start a VM in a paused state. This option enables you to interrupt the boot process from the VNC console.

virtctl stop <vm_name>

Stop a VM.

virtctl stop <vm_name> --grace-period 0 --force

Force stop a VM. This option might cause data inconsistency or data loss.

virtctl pause vm <vm_name>

Pause a VM. The machine state is kept in memory.

virtctl unpause vm <vm_name>

Unpause a VM.

virtctl migrate <vm_name>

Migrate a VM.

virtctl migrate-cancel <vm_name>

Cancel a VM migration.

virtctl restart <vm_name>

Restart a VM.

virtctl create instancetype --cpu <cpu_value> --memory <memory_value> --name <instancetype_name>

Create an InstanceType manifest for a ClusterInstanceType, or a namespaced InstanceType, to streamline the creation of your InstanceType specifications.

virtctl create preference --name <preference_name>

Create a Preference manifest for a ClusterPreference, or a namespaced Preference, to streamline the creation of your Preference specifications.

3.2.2.4. VM connection commands

You use virtctl connection commands to expose ports and connect to virtual machines (VMs) and virtual machine instances (VMIs).

Table 3.4. VM connection commands
CommandDescription

virtctl console <vm_name>

Connect to the serial console of a VM.

virtctl expose vm <vm_name> --name <service_name> --type <ClusterIP|NodePort|LoadBalancer> --port <port>

Create a service that forwards a designated port of a VM and expose the service on the specified port of the node.

Example: virtctl expose vm rhel9_vm --name rhel9-ssh --type NodePort --port 22

virtctl scp -i <ssh_key> <file_name> <user_name>@<vm_name>

Copy a file from your machine to a VM. This command uses the private key of an SSH key pair. The VM must be configured with the public key.

virtctl scp -i <ssh_key> <user_name@<vm_name>:<file_name> .

Copy a file from a VM to your machine. This command uses the private key of an SSH key pair. The VM must be configured with the public key.

virtctl ssh -i <ssh_key> <user_name>@<vm_name>

Open an SSH connection with a VM. This command uses the private key of an SSH key pair. The VM must be configured with the public key.

virtctl vnc <vm_name>

Connect to the VNC console of a VM.

You must have virt-viewer installed.

virtctl vnc --proxy-only=true <vm_name>

Display the port number and connect manually to a VM by using any viewer through the VNC connection.

virtctl vnc --port=<port-number> <vm_name>

Specify a port number to run the proxy on the specified port, if that port is available.

If a port number is not specified, the proxy runs on a random port.

3.2.2.5. VM export commands

Use virtctl vmexport commands to create, download, or delete a volume exported from a VM, VM snapshot, or persistent volume claim (PVC). Certain manifests also contain a header secret, which grants access to the endpoint to import a disk image in a format that OpenShift Virtualization can use.

Table 3.5. VM export commands
CommandDescription

virtctl vmexport create <vmexport_name> --vm|snapshot|pvc=<object_name>

Create a VirtualMachineExport custom resource (CR) to export a volume from a VM, VM snapshot, or PVC.

  • --vm: Exports the PVCs of a VM.
  • --snapshot: Exports the PVCs contained in a VirtualMachineSnapshot CR.
  • --pvc: Exports a PVC.
  • Optional: --ttl=1h specifies the time to live. The default duration is 2 hours.

virtctl vmexport delete <vmexport_name>

Delete a VirtualMachineExport CR manually.

virtctl vmexport download <vmexport_name> --output=<output_file> --volume=<volume_name>

Download the volume defined in a VirtualMachineExport CR.

  • --output specifies the file format. Example: disk.img.gz.
  • --volume specifies the volume to download. This flag is optional if only one volume is available.

Optional:

  • --keep-vme retains the VirtualMachineExport CR after download. The default behavior is to delete the VirtualMachineExport CR after download.
  • --insecure enables an insecure HTTP connection.

virtctl vmexport download <vmexport_name> --<vm|snapshot|pvc>=<object_name> --output=<output_file> --volume=<volume_name>

Create a VirtualMachineExport CR and then download the volume defined in the CR.

virtctl vmexport download export --manifest

Retrieve the manifest for an existing export. The manifest does not include the header secret.

virtctl vmexport download export --manifest --vm=example

Create a VM export for a VM example, and retrieve the manifest. The manifest does not include the header secret.

virtctl vmexport download export --manifest --snap=example

Create a VM export for a VM snapshot example, and retrieve the manifest. The manifest does not include the header secret.

virtctl vmexport download export --manifest --include-secret

Retrieve the manifest for an existing export. The manifest includes the header secret.

virtctl vmexport download export --manifest --manifest-output-format=json

Retrieve the manifest for an existing export in json format. The manifest does not include the header secret.

virtctl vmexport download export --manifest --include-secret --output=manifest.yaml

Retrieve the manifest for an existing export. The manifest includes the header secret and writes it to the file specified.

3.2.2.6. VM memory dump commands

You can use the virtctl memory-dump command to output a VM memory dump on a PVC. You can specify an existing PVC or use the --create-claim flag to create a new PVC.

Prerequisites

  • The PVC volume mode must be FileSystem.
  • The PVC must be large enough to contain the memory dump.

    The formula for calculating the PVC size is (VMMemorySize + 100Mi) * FileSystemOverhead, where 100Mi is the memory dump overhead.

  • You must enable the hot plug feature gate in the HyperConverged custom resource by running the following command:

    $ oc patch hyperconverged kubevirt-hyperconverged -n openshift-cnv \
      --type json -p '[{"op": "add", "path": "/spec/featureGates", \
      "value": "HotplugVolumes"}]'

Downloading the memory dump

You must use the virtctl vmexport download command to download the memory dump:

$ virtctl vmexport download <vmexport_name> --vm|pvc=<object_name> \
  --volume=<volume_name> --output=<output_file>
Table 3.6. VM memory dump commands
CommandDescription

virtctl memory-dump get <vm_name> --claim-name=<pvc_name>

Save the memory dump of a VM on a PVC. The memory dump status is displayed in the status section of the VirtualMachine resource.

Optional:

  • --create-claim creates a new PVC with the appropriate size. This flag has the following options:

    • --storage-class=<storage_class>: Specify a storage class for the PVC.
    • --access-mode=<access_mode>: Specify ReadWriteOnce or ReadWriteMany.

virtctl memory-dump get <vm_name>

Rerun the virtctl memory-dump command with the same PVC.

This command overwrites the previous memory dump.

virtctl memory-dump remove <vm_name>

Remove a memory dump.

You must remove a memory dump manually if you want to change the target PVC.

This command removes the association between the VM and the PVC, so that the memory dump is not displayed in the status section of the VirtualMachine resource. The PVC is not affected.

3.2.2.7. Hot plug and hot unplug commands

You use virtctl to add or remove resources from running virtual machines (VMs) and virtual machine instances (VMIs).

Table 3.7. Hot plug and hot unplug commands
CommandDescription

virtctl addvolume <vm_name> --volume-name=<datavolume_or_PVC> [--persist] [--serial=<label>]

Hot plug a data volume or persistent volume claim (PVC).

Optional:

  • --persist mounts the virtual disk permanently on a VM. This flag does not apply to VMIs.
  • --serial=<label> adds a label to the VM. If you do not specify a label, the default label is the data volume or PVC name.

virtctl removevolume <vm_name> --volume-name=<virtual_disk>

Hot unplug a virtual disk.

virtctl addinterface <vm_name> --network-attachment-definition-name <net_attach_def_name> --name <interface_name>

Hot plug a Linux bridge network interface.

virtctl removeinterface <vm_name> --name <interface_name>

Hot unplug a Linux bridge network interface.

3.2.2.8. Image upload commands

You use the virtctl image-upload commands to upload a VM image to a data volume.

Table 3.8. Image upload commands
CommandDescription

virtctl image-upload dv <datavolume_name> --image-path=</path/to/image> --no-create

Upload a VM image to a data volume that already exists.

virtctl image-upload dv <datavolume_name> --size=<datavolume_size> --image-path=</path/to/image>

Upload a VM image to a new data volume of a specified requested size.

3.2.3. Deploying libguestfs by using virtctl

You can use the virtctl guestfs command to deploy an interactive container with libguestfs-tools and a persistent volume claim (PVC) attached to it.

Procedure

  • To deploy a container with libguestfs-tools, mount the PVC, and attach a shell to it, run the following command:

    $ virtctl guestfs -n <namespace> <pvc_name> 1
    1
    The PVC name is a required argument. If you do not include it, an error message appears.

3.2.3.1. Libguestfs and virtctl guestfs commands

Libguestfs tools help you access and modify virtual machine (VM) disk images. You can use libguestfs tools to view and edit files in a guest, clone and build virtual machines, and format and resize disks.

You can also use the virtctl guestfs command and its sub-commands to modify, inspect, and debug VM disks on a PVC. To see a complete list of possible sub-commands, enter virt- on the command line and press the Tab key. For example:

CommandDescription

virt-edit -a /dev/vda /etc/motd

Edit a file interactively in your terminal.

virt-customize -a /dev/vda --ssh-inject root:string:<public key example>

Inject an ssh key into the guest and create a login.

virt-df -a /dev/vda -h

See how much disk space is used by a VM.

virt-customize -a /dev/vda --run-command 'rpm -qa > /rpm-list'

See the full list of all RPMs installed on a guest by creating an output file containing the full list.

virt-cat -a /dev/vda /rpm-list

Display the output file list of all RPMs created using the virt-customize -a /dev/vda --run-command 'rpm -qa > /rpm-list' command in your terminal.

virt-sysprep -a /dev/vda

Seal a virtual machine disk image to be used as a template.

By default, virtctl guestfs creates a session with everything needed to manage a VM disk. However, the command also supports several flag options if you want to customize the behavior:

Flag OptionDescription

--h or --help

Provides help for guestfs.

-n <namespace> option with a <pvc_name> argument

To use a PVC from a specific namespace.

If you do not use the -n <namespace> option, your current project is used. To change projects, use oc project <namespace>.

If you do not include a <pvc_name> argument, an error message appears.

--image string

Lists the libguestfs-tools container image.

You can configure the container to use a custom image by using the --image option.

--kvm

Indicates that kvm is used by the libguestfs-tools container.

By default, virtctl guestfs sets up kvm for the interactive container, which greatly speeds up the libguest-tools execution because it uses QEMU.

If a cluster does not have any kvm supporting nodes, you must disable kvm by setting the option --kvm=false.

If not set, the libguestfs-tools pod remains pending because it cannot be scheduled on any node.

--pull-policy string

Shows the pull policy for the libguestfs image.

You can also overwrite the image’s pull policy by setting the pull-policy option.

The command also checks if a PVC is in use by another pod, in which case an error message appears. However, once the libguestfs-tools process starts, the setup cannot avoid a new pod using the same PVC. You must verify that there are no active virtctl guestfs pods before starting the VM that accesses the same PVC.

Note

The virtctl guestfs command accepts only a single PVC attached to the interactive pod.

3.3. Web console overview

The Virtualization section of the OpenShift Container Platform web console contains the following pages for managing and monitoring your OpenShift Virtualization environment.

Table 3.9. Virtualization pages
PageDescription

Overview page

Manage and monitor the OpenShift Virtualization environment.

Catalog page

Create virtual machines from a catalog of templates.

VirtualMachines page

Create and manage virtual machines.

Templates page

Create and manage templates.

InstanceTypes page

Create and manage virtual machine instance types.

Preferences page

Create and manage virtual machine preferences.

Bootable volumes page

Create and manage DataSources for bootable volumes.

MigrationPolicies page

Create and manage migration policies for workloads.

Table 3.10. Key
IconDescription

icon pencil

Edit icon

icon link

Link icon

3.3.1. Overview page

The Overview page displays resources, metrics, migration progress, and cluster-level settings.

Example 3.1. Overview page

ElementDescription

Download virtctl icon link

Download the virtctl command line tool to manage resources.

Overview tab

Resources, usage, alerts, and status.

Top consumers tab

Top consumers of CPU, memory, and storage resources.

Migrations tab

Status of live migrations.

Settings tab

The Settings tab contains the Cluster tab and the User tab.

Settings Cluster tab

OpenShift Virtualization version, update status, live migration, templates project, preview features, and load balancer service settings.

Settings User tab

Authorized SSH keys, user permissions, and welcome information settings.

3.3.1.1. Overview tab

The Overview tab displays resources, usage, alerts, and status.

Example 3.2. Overview tab

ElementDescription

Getting started resources card

  • Quick Starts tile: Learn how to create, import, and run virtual machines with step-by-step instructions and tasks.
  • Feature highlights tile: Read the latest information about key virtualization features.
  • Related operators tile: Install Operators such as the Kubernetes NMState Operator or the OpenShift Data Foundation Operator.

Memory tile

Memory usage, with a chart showing the last 7 days' trend.

Storage tile

Storage usage, with a chart showing the last 7 days' trend.

VirtualMachines tile

Number of virtual machines, with a chart showing the last 7 days' trend.

vCPU usage tile

vCPU usage, with a chart showing the last 7 days' trend.

VirtualMachine statuses tile

Number of virtual machines, grouped by status.

Alerts tile

OpenShift Virtualization alerts, grouped by severity.

VirtualMachines per resource chart

Number of virtual machines created from templates and instance types.

3.3.1.2. Top consumers tab

The Top consumers tab displays the top consumers of CPU, memory, and storage.

Example 3.3. Top consumers tab

ElementDescription

View virtualization dashboard icon link

Link to Observe Dashboards, which displays the top consumers for OpenShift Virtualization.

Time period list

Select a time period to filter the results.

Top consumers list

Select the number of top consumers to filter the results.

CPU chart

Virtual machines with the highest CPU usage.

Memory chart

Virtual machines with the highest memory usage.

Memory swap traffic chart

Virtual machines with the highest memory swap traffic.

vCPU wait chart

Virtual machines with the highest vCPU wait periods.

Storage throughput chart

Virtual machines with the highest storage throughput usage.

Storage IOPS chart

Virtual machines with the highest storage input/output operations per second usage.

3.3.1.3. Migrations tab

The Migrations tab displays the status of virtual machine migrations.

Example 3.4. Migrations tab

ElementDescription

Time period list

Select a time period to filter virtual machine migrations.

VirtualMachineInstanceMigrations information table

List of virtual machine migrations.

3.3.1.4. Settings tab

The Settings tab displays cluster-wide settings.

Example 3.5. Tabs on the Settings tab

TabDescription

Cluster tab

OpenShift Virtualization version and update status, live migration, templates project, preview features, and load balancer service settings.

User tab

Authorized SSH key management, user permissions, and welcome information settings.

3.3.1.4.1. Cluster tab

The Cluster tab displays the OpenShift Virtualization version and update status. You configure preview features, live migration, and other settings on the Cluster tab.

Example 3.6. Cluster tab

ElementDescription

Installed version

OpenShift Virtualization version.

Update status

OpenShift Virtualization update status.

Channel

OpenShift Virtualization update channel.

Preview features section

Expand this section to manage preview features.

Preview features are disabled by default and must not be enabled in production environments.

Live Migration section

Expand this section to configure live migration settings.

Live Migration Max. migrations per cluster field

Select the maximum number of live migrations per cluster.

Live Migration Max. migrations per node field

Select the maximum number of live migrations per node.

Live Migration Live migration network list

Select a dedicated secondary network for live migration.

Automatic subscription of new RHEL VirtualMachines section

Expand this section to enable automatic subscription for Red Hat Enterprise Linux (RHEL) virtual machines.

To enable this feature, you need cluster administrator permissions, an organization ID, and an activation key.

LoadBalancer section

Expand this section to enable the creation of load balancer services for SSH access to virtual machines.

The cluster must have a load balancer configured.

Template project section

Expand this section to select a project for Red Hat templates. The default project is openshift.

To store Red Hat templates in multiple projects, clone the template and then select a project for the cloned template.

3.3.1.4.2. User tab

You view user permissions and manage authorized SSH keys and welcome information on the User tab.

Example 3.7. User tab

ElementDescription

Manage SSH keys section

Expand this section to add authorized SSH keys to a project.

The keys are added automatically to all virtual machines that you subsequently create in the selected project.

Permissions section

Expand this section to view cluster-wide user permissions.

Welcome information section

Expand this section to show or hide the Welcome information dialog.

3.3.2. Catalog page

You create a virtual machine from a template or instance type on the Catalog page.

Example 3.8. Catalog page

ElementDescription

Template catalog tab

Displays a catalog of templates for creating a virtual machine.

InstanceTypes tab

Displays bootable volumes and instance types for creating a virtual machine.

3.3.2.1. Template catalog tab

You select a template on the Template catalog tab to create a virtual machine.

Example 3.9. Template catalog tab

ElementDescription

Template project list

Select the project in which Red Hat templates are located.

By default, Red Hat templates are stored in the openshift project. You can edit the template project on the Overview page Settings tab Cluster tab.

All items|Default templates

Click All items to display all available templates.

Boot source available checkbox

Select the checkbox to display templates with an available boot source.

Operating system checkboxes

Select checkboxes to display templates with selected operating systems.

Workload checkboxes

Select checkboxes to display templates with selected workloads.

Search field

Search templates by keyword.

Template tiles

Click a template tile to view template details and to create a virtual machine.

3.3.2.2. InstanceTypes tab

You create a virtual machine from an instance type on the InstanceTypes tab.

Important

Creating a virtual machine from an instance type is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

ElementDescription

Volumes project field

Project in which bootable volumes are stored. The default is openshift-virtualization-os-images.

Add volume button

Click to upload a new volume or to use an existing persistent volume claim.

Filter field

Filter boot sources by operating system or resource.

Search field

Search boot sources by name.

Manage columns icon

Select up to 9 columns to display in the table.

Volume table

Select a bootable volume for your virtual machine.

Red Hat provided tab

Select an instance type provided by Red Hat.

User provided tab

Select an instance type that you created on the InstanceType page.

VirtualMachine details pane

Displays the virtual machine settings.

Name field

Optional: Enter the virtual machine name.

SSH key name

Click the edit icon to add a public SSH key.

Start this VirtualMachine after creation checkbox

Clear this checkbox to prevent the virtual machine from starting automatically.

Create VirtualMachine button

Creates a virtual machine.

YAML & CLI button

Displays the YAML configuration file and the virtctl create command to create the virtual machine from the command line.

3.3.3. VirtualMachines page

You create and manage virtual machines on the VirtualMachines page.

Example 3.10. VirtualMachines page

ElementDescription

Create button

Create a virtual machine from a template, volume, or YAML configuration file.

Filter field

Filter virtual machines by status, template, operating system, or node.

Search field

Search for virtual machines by name or by label.

Manage columns icon

Select up to 9 columns to display in the table. The Namespace column is only displayed when All Projects is selected from the Projects list.

Virtual machines table

List of virtual machines.

Click the actions menu kebab beside a virtual machine to select Stop, Restart, Pause, Clone, Migrate, Copy SSH command, Edit labels, Edit annotations, or Delete. If you select Stop, Force stop replaces Stop in the action menu. Use Force stop to initiate an immediate shutdown if the operating system becomes unresponsive.

Click a virtual machine to navigate to the VirtualMachine details page.

3.3.3.1. VirtualMachine details page

You configure a virtual machine on the VirtualMachine details page.

Example 3.11. VirtualMachine details page

ElementDescription

Actions menu

Click the Actions menu to select Stop, Restart, Pause, Clone, Migrate, Copy SSH command, Edit labels, Edit annotations, or Delete. If you select Stop, Force stop replaces Stop in the action menu. Use Force stop to initiate an immediate shutdown if the operating system becomes unresponsive.

Overview tab

Resource usage, alerts, disks, and devices.

Details tab

Virtual machine details and configurations.

Metrics tab

Memory, CPU, storage, network, and migration metrics.

YAML tab

Virtual machine YAML configuration file.

Configuration tab

Contains the Disks, Network interfaces, Scheduling, Environment, and Scripts tabs.

Configuration Disks tab

Disks.

Configuration Network interfaces tab

Network interfaces.

Configuration Scheduling tab

Scheduling a virtual machine to run on specific nodes.

Configuration Environment tab

Config map, secret, and service account management.

Configuration Scripts tab

Cloud-init settings, authorized SSH key and dynamic key injection for Linux virtual machines, Sysprep settings for Windows virtual machines.

Events tab

Virtual machine event stream.

Console tab

Console session management.

Snapshots tab

Snapshot management.

Diagnostics tab

Status conditions and volume snapshot status.

3.3.3.1.1. Overview tab

The Overview tab displays resource usage, alerts, and configuration information.

Example 3.12. Overview tab

ElementDescription

Details tile

General virtual machine information.

Utilization tile

CPU, Memory, Storage, and Network transfer charts. By default, Network transfer displays the sum of all networks. To view the breakdown for a specific network, click Breakdown by network.

Hardware devices tile

GPU and host devices.

Alerts tile

OpenShift Virtualization alerts, grouped by severity.

Snapshots tile

Take snapshot icon link and snapshots table.

Network interfaces tile

Network interfaces table.

Disks tile

Disks table.

3.3.3.1.2. Details tab

You view information about the virtual machine and edit labels, annotations, and other metadata and on the Details tab.

Example 3.13. Details tab

ElementDescription

YAML switch

Set to ON to view your live changes in the YAML configuration file.

Name

Virtual machine name.

Namespace

Virtual machine namespace or project.

Labels

Click the edit icon to edit the labels.

Annotations

Click the edit icon to edit the annotations.

Description

Click the edit icon to enter a description.

Operating system

Operating system name.

CPU|Memory

Click the edit icon to edit the CPU|Memory request. Restart the virtual machine to apply the change.

The number of CPUs is calculated by using the following formula: sockets * threads * cores.

Machine type

Machine type.

Boot mode

Click the edit icon to edit the boot mode. Restart the virtual machine to apply the change.

Start in pause mode

Click the edit icon to enable this setting. Restart the virtual machine to apply the change.

Template

Name of the template used to create the virtual machine.

Created at

Virtual machine creation date.

Owner

Virtual machine owner.

Status

Virtual machine status.

Pod

virt-launcher pod name.

VirtualMachineInstance

Virtual machine instance name.

Boot order

Click the edit icon to select a boot source. Restart the virtual machine to apply the change.

IP address

IP address of the virtual machine.

Hostname

Hostname of the virtual machine. Restart the virtual machine to apply the change.

Time zone

Time zone of the virtual machine.

Node

Node on which the virtual machine is running.

Workload profile

Click the edit icon to edit the workload profile.

SSH access

These settings apply to Linux.

SSH using virtctl

Click the copy icon to copy the virtctl ssh command to the clipboard. This feature is disabled if the virtual machine does not have an authorized SSH key.

SSH service type

Select SSH over LoadBalancer.

After you create a service, the SSH command is displayed. Click the copy icon to copy the command to the clipboard.

GPU devices

Click the edit icon to add a GPU device. Restart the virtual machine to apply the change.

Host devices

Click the edit icon to add a host device. Restart the virtual machine to apply the change.

Headless mode

Click the edit icon to set headless mode to ON and to disable VNC console. Restart the virtual machine to apply the change.

Services

Displays a list of services if QEMU guest agent is installed.

Active users

Displays a list of active users if QEMU guest agent is installed.

3.3.3.1.3. Metrics tab

The Metrics tab displays memory, CPU, storage, network, and migration usage charts.

Example 3.14. Metrics tab

ElementDescription

Time range list

Select a time range to filter the results.

Virtualization dashboard icon link

Link to the Workloads tab of the current project.

Utilization

Memory and CPU charts.

Storage

Storage total read/write and Storage IOPS total read/write charts.

Network

Network in, Network out, Network bandwidth, and Network interface charts. Select All networks or a specific network from the Network interface list.

Migration

Migration and KV data transfer rate charts.

3.3.3.1.4. YAML tab

You configure the virtual machine by editing the YAML file on the YAML tab.

Example 3.15. YAML tab

ElementDescription

Save button

Save changes to the YAML file.

Reload button

Discard your changes and reload the YAML file.

Cancel button

Exit the YAML tab.

Download button

Download the YAML file to your local machine.

3.3.3.1.5. Configuration tab

You configure scheduling, network interfaces, disks, and other options on the Configuration tab.

Example 3.16. Tabs on the Configuration tab

ElementDescription

YAML switch

Set to ON to view your live changes in the YAML configuration file.

Disks tab

Disks.

Network interfaces tab

Network interfaces.

Scheduling tab

Scheduling and resource requirements.

Environment tab

Config maps, secrets, and service accounts.

Scripts tab

Cloud-init settings, authorized SSH key for Linux virtual machines, Sysprep answer file for Windows virtual machines.

3.3.3.1.5.1. Disks tab

You manage disks on the Disks tab.

Example 3.17. Disks tab

SettingDescription

Add disk button

Add a disk to the virtual machine.

Filter field

Filter by disk type.

Search field

Search for a disk by name.

Mount Windows drivers disk checkbox

Select to mount a virtio-win container disk as a CD-ROM to install VirtIO drivers.

Disks table

List of virtual machine disks.

Click the actions menu kebab beside a disk to select Edit or Detach.

File systems table

List of virtual machine file systems.

3.3.3.1.5.2. Network interfaces tab

You manage network interfaces on the Network interfaces tab.

Example 3.18. Network interfaces tab

SettingDescription

Add network interface button

Add a network interface to the virtual machine.

Filter field

Filter by interface type.

Search field

Search for a network interface by name or by label.

Network interface table

List of network interfaces.

Click the actions menu kebab beside a network interface to select Edit or Delete.

3.3.3.1.5.3. Scheduling tab

You configure virtual machines to run on specific nodes on the Scheduling tab.

Restart the virtual machine to apply changes.

Example 3.19. Scheduling tab

SettingDescription

Node selector

Click the edit icon to add a label to specify qualifying nodes.

Tolerations

Click the edit icon to add a toleration to specify qualifying nodes.

Affinity rules

Click the edit icon to add an affinity rule.

Descheduler switch

Enable or disable the descheduler. The descheduler evicts a running pod so that the pod can be rescheduled onto a more suitable node.

This field is disabled if the virtual machine cannot be live migrated.

Dedicated resources

Click the edit icon to select Schedule this workload with dedicated resources (guaranteed policy).

Eviction strategy

Click the edit icon to select LiveMigrate as the virtual machine eviction strategy.

3.3.3.1.5.4. Environment tab

You manage config maps, secrets, and service accounts on the Environment tab.

Example 3.20. Environment tab

ElementDescription

Add Config Map, Secret or Service Account icon link

Click the link and select a config map, secret, or service account from the resource list.

3.3.3.1.5.5. Scripts tab

You manage cloud-init settings, add SSH keys, or configure Sysprep for Windows virtual machines on the Scripts tab.

Restart the virtual machine to apply changes.

Example 3.21. Scripts tab

ElementDescription

Cloud-init

Click the edit icon to edit the cloud-init settings.

Authorized SSH key

Click the edit icon to add a public SSH key to a Linux virtual machine.

The key is added as a cloud-init data source at first boot.

Dynamic SSH key injection switch

Set Dynamic SSH key injection to on to enable dynamic public SSH key injection. Then, you can add or revoke the key at runtime.

Dynamic SSH key injection is only supported by Red Hat Enterprise Linux (RHEL) 9. If you manually disable this setting, the virtual machine inherits the SSH key settings of the image from which it was created.

Sysprep

Click the edit icon to upload an Autounattend.xml or Unattend.xml answer file to automate Windows virtual machine setup.

3.3.3.1.6. Events tab

The Events tab displays a list of virtual machine events.

3.3.3.1.7. Console tab

You can open a console session to the virtual machine on the Console tab.

Example 3.22. Console tab

ElementDescription

Guest login credentials section

Expand Guest login credentials to view the credentials created with cloud-init. Click the copy icon to copy the credentials to the clipboard.

Console list

Select VNC console or Serial console.

The Desktop viewer option is displayed for Windows virtual machines. You must install an RDP client on a machine on the same network.

Send key list

Select a key-stroke combination to send to the console.

Disconnect button

Disconnect the console connection.

You must manually disconnect the console connection if you open a new console session. Otherwise, the first console session continues to run in the background.

Paste button

Paste a string from your clipboard to the VNC console.

3.3.3.1.8. Snapshots tab

You create snapshots and restore virtual machines from snapshots on the Snapshots tab.

Example 3.23. Snapshots tab

ElementDescription

Take snapshot button

Create a snapshot.

Filter field

Filter snapshots by status.

Search field

Search for snapshots by name or by label.

Snapshot table

List of snapshots

Click the snapshot name to edit the labels or annotations.

Click the actions menu kebab beside a snapshot to select Restore or Delete.

3.3.3.1.9. Diagnostics tab

You view the status conditions and volume snapshot status on the Diagnostics tab.

Example 3.24. Diagnostics tab

ElementDescription

Status conditions table

Display a list of conditions that are reported for the virtual machine.

Filter field

Filter status conditions by category and condition.

Search field

Search status conditions by reason.

Manage columns icon

Select up to 9 columns to display in the table.

Volume snapshot status table

List of volumes, their snapshot enablement status, and reason.

3.3.4. Templates page

You create, edit, and clone virtual machine templates on the VirtualMachine Templates page.

Note

You cannot edit a Red Hat template. However, you can clone a Red Hat template and edit it to create a custom template.

Example 3.25. VirtualMachine Templates page

ElementDescription

Create Template button

Create a template by editing a YAML configuration file.

Filter field

Filter templates by type, boot source, template provider, or operating system.

Search field

Search for templates by name or by label.

Manage columns icon

Select up to 9 columns to display in the table. The Namespace column is only displayed when All Projects is selected from the Projects list.

Virtual machine templates table

List of virtual machine templates.

Click the actions menu kebab beside a template to select Edit, Clone, Edit boot source, Edit boot source reference, Edit labels, Edit annotations, or Delete. You cannot edit a Red Hat provided template. You can clone the Red Hat template and then edit the custom template.

3.3.4.1. Template details page

You view template settings and edit custom templates on the Template details page.

Example 3.26. Template details page

ElementDescription

YAML switch

Set to ON to view your live changes in the YAML configuration file.

Actions menu

Click the Actions menu to select Edit, Clone, Edit boot source, Edit boot source reference, Edit labels, Edit annotations, or Delete.

Details tab

Template settings and configurations.

YAML tab

YAML configuration file.

Scheduling tab

Scheduling configurations.

Network interfaces tab

Network interface management.

Disks tab

Disk management.

Scripts tab

Cloud-init, SSH key, and Sysprep management.

Parameters tab

Name and cloud user password management.

3.3.4.1.1. Details tab

You configure a custom template on the Details tab.

Example 3.27. Details tab

ElementDescription

Name

Template name.

Namespace

Template namespace.

Labels

Click the edit icon to edit the labels.

Annotations

Click the edit icon to edit the annotations.

Display name

Click the edit icon to edit the display name.

Description

Click the edit icon to enter a description.

Operating system

Operating system name.

CPU|Memory

Click the edit icon to edit the CPU|Memory request.

The number of CPUs is calculated by using the following formula: sockets * threads * cores.

Machine type

Template machine type.

Boot mode

Click the edit icon to edit the boot mode.

Base template

Name of the base template used to create this template.

Created at

Template creation date.

Owner

Template owner.

Boot order

Template boot order.

Boot source

Boot source availability.

Provider

Template provider.

Support

Template support level.

GPU devices

Click the edit icon to add a GPU device.

Host devices

Click the edit icon to add a host device.

Headless mode

Click the edit icon to set headless mode to ON and to disable VNC console.

3.3.4.1.2. YAML tab

You configure a custom template by editing the YAML file on the YAML tab.

Example 3.28. YAML tab

ElementDescription

Save button

Save changes to the YAML file.

Reload button

Discard your changes and reload the YAML file.

Cancel button

Exit the YAML tab.

Download button

Download the YAML file to your local machine.

3.3.4.1.3. Scheduling tab

You configure scheduling on the Scheduling tab.

Example 3.29. Scheduling tab

SettingDescription

Node selector

Click the edit icon to add a label to specify qualifying nodes.

Tolerations

Click the edit icon to add a toleration to specify qualifying nodes.

Affinity rules

Click the edit icon to add an affinity rule.

Descheduler switch

Enable or disable the descheduler. The descheduler evicts a running pod so that the pod can be rescheduled onto a more suitable node.

Dedicated resources

Click the edit icon to select Schedule this workload with dedicated resources (guaranteed policy).

Eviction strategy

Click the edit icon to select LiveMigrate as the virtual machine eviction strategy.

3.3.4.1.4. Network interfaces tab

You manage network interfaces on the Network interfaces tab.

Example 3.30. Network interfaces tab

SettingDescription

Add network interface button

Add a network interface to the template.

Filter field

Filter by interface type.

Search field

Search for a network interface by name or by label.

Network interface table

List of network interfaces.

Click the actions menu kebab beside a network interface to select Edit or Delete.

3.3.4.1.5. Disks tab

You manage disks on the Disks tab.

Example 3.31. Disks tab

SettingDescription

Add disk button

Add a disk to the template.

Filter field

Filter by disk type.

Search field

Search for a disk by name.

Disks table

List of template disks.

Click the actions menu kebab beside a disk to select Edit or Detach.

3.3.4.1.6. Scripts tab

You manage the cloud-init settings, SSH keys, and Sysprep answer files on the Scripts tab.

Example 3.32. Scripts tab

ElementDescription

Cloud-init

Click the edit icon to edit the cloud-init settings.

Authorized SSH key

Click the edit icon to create a new secret or to attach an existing secret to a Linux virtual machine.

Sysprep

Click the edit icon to upload an Autounattend.xml or Unattend.xml answer file to automate Windows virtual machine setup.

3.3.4.1.7. Parameters tab

You edit selected template settings on the Parameters tab.

Example 3.33. Parameters tab

ElementDescription

NAME

Set the name parameters for a virtual machine created from this template.

CLOUD_USER_PASSWORD

Set the cloud user password parameters for a virtual machine created from this template.

3.3.5. InstanceTypes page

You view and manage virtual machine instance types on the InstanceTypes page.

Example 3.34. VirtualMachineClusterInstancetypes page

ElementDescription

Create button

Create an instance type by editing a YAML configuration file.

Search field

Search for an instance type by name or by label.

Manage columns icon

Select up to 9 columns to display in the table. The Namespace column is only displayed when All Projects is selected from the Projects list.

Instance types table

List of instance.

Click the actions menu kebab beside an instance type to select Clone or Delete.

Click an instance type to view the VirtualMachineClusterInstancetypes details page.

3.3.5.1. VirtualMachineClusterInstancetypes details page

You configure an instance type on the VirtualMachineClusterInstancetypes details page.

Example 3.35. VirtualMachineClusterInstancetypes details page

ElementDescription

Details tab

Configure an instance type by editing a form.

YAML tab

Configure an instance type by editing a YAML configuration file.

Actions menu

Select Edit labels, Edit annotations, Edit VirtualMachineClusterInstancetype, or Delete VirtualMachineClusterInstancetype.

3.3.5.1.1. Details tab

You configure an instance type by editing a form on the Details tab.

Example 3.36. Details tab

ElementDescription

Name

VirtualMachineClusterInstancetype name.

Labels

Click the edit icon to edit the labels.

Annotations

Click the edit icon to edit the annotations.

Created at

Instance type creation date.

Owner

Instance type owner.

3.3.5.1.2. YAML tab

You configure an instance type by editing the YAML file on the YAML tab.

Example 3.37. YAML tab

ElementDescription

Save button

Save changes to the YAML file.

Reload button

Discard your changes and reload the YAML file.

Cancel button

Exit the YAML tab.

Download button

Download the YAML file to your local machine.

3.3.6. Preferences page

You view and manage virtual machine preferences on the Preferences page.

Example 3.38. VirtualMachineClusterPreferences page

ElementDescription

Create button

Create a preference by editing a YAML configuration file.

Search field

Search for a preference by name or by label.

Manage columns icon

Select up to 9 columns to display in the table. The Namespace column is only displayed when All Projects is selected from the Projects list.

Preferences table

List of preferences.

Click the actions menu kebab beside a preference to select Clone or Delete.

Click a preference to view the VirtualMachineClusterPreference details page.

3.3.6.1. VirtualMachineClusterPreference details page

You configure a preference on the VirtualMachineClusterPreference details page.

Example 3.39. VirtualMachineClusterPreference details page

ElementDescription

Details tab

Configure a preference by editing a form.

YAML tab

Configure a preference by editing a YAML configuration file.

Actions menu

Select Edit labels, Edit annotations, Edit VirtualMachineClusterPreference, or Delete VirtualMachineClusterPreference.

3.3.6.1.1. Details tab

You configure a preference by editing a form on the Details tab.

Example 3.40. Details tab

ElementDescription

Name

VirtualMachineClusterPreference name.

Labels

Click the edit icon to edit the labels.

Annotations

Click the edit icon to edit the annotations.

Created at

Preference creation date.

Owner

Preference owner.

3.3.6.1.2. YAML tab

You configure a preference type by editing the YAML file on the YAML tab.

Example 3.41. YAML tab

ElementDescription

Save button

Save changes to the YAML file.

Reload button

Discard your changes and reload the YAML file.

Cancel button

Exit the YAML tab.

Download button

Download the YAML file to your local machine.

3.3.7. Bootable volumes page

You view and manage available bootable volumes on the Bootable volumes page.

Example 3.42. Bootable volumes page

ElementDescription

Add volume button

Add a bootable volume by completing a form or by editing a YAML configuration file.

Filter field

Filter bootable volumes by operating system and resource type.

Search field

Search for bootable volumes by name or by label.

Manage columns icon

Select up to 9 columns to display in the table. The Namespace column is only displayed when All Projects is selected from the Projects list.

Bootable volumes table

List of bootable volumes.

Click the actions menu kebab beside a bootable volume to select Edit, Remove from list, or Delete.

Click a bootable volume to view the PersistentVolumeClaim details page.

3.3.7.1. PersistentVolumeClaim details page

You configure the persistent volume claim (PVC) of a bootable volume on the PersistentVolumeClaim details page.

Example 3.43. PersistentVolumeClaim details page

ElementDescription

Details tab

Configure the PVC by editing a form.

YAML tab

Configure the PVC by editing a YAML configuration file.

Events tab

The Events tab displays a list of PVC events.

VolumeSnapshots tab

The VolumeSnapshots tab displays a list of volume snapshots.

Actions menu

Select Expand PVC, Create snapshot, Clone PVC, Edit labels, Edit annotations, Edit PersistentVolumeClaim or Delete PersistentVolumeClaim.

3.3.7.1.1. Details tab

You configure the persistent volume claim (PVC) of the bootable volume by editing a form on the Details tab.

Example 3.44. Details tab

ElementDescription

Name

PVC name.

Namespace

PVC namespace.

Labels

Click the edit icon to edit the labels.

Annotations

Click the edit icon to edit the annotations.

Created at

PVC creation date.

Owner

PVC owner.

Status

Status of the PVC, for example, Bound.

Requested capacity

Requested capacity of the PVC.

Capacity

Capacity of the PVC.

Used

Used space of the PVC.

Access modes

PVC access modes.

Volume mode

PVC volume mode.

StorageClasses

PVC storage class.

PersistentVolumes

Persistent volume associated with the PVC.

Conditions table

Displays the status of the PVC.

3.3.7.1.2. YAML tab

You configure the persistent volume claim of the bootable volume by editing the YAML file on the YAML tab.

Example 3.45. YAML tab

ElementDescription

Save button

Save changes to the YAML file.

Reload button

Discard your changes and reload the YAML file.

Cancel button

Exit the YAML tab.

Download button

Download the YAML file to your local machine.

3.3.8. MigrationPolicies page

You manage migration policies for workloads on the MigrationPolicies page.

Example 3.46. MigrationPolicies page

ElementDescription

Create MigrationPolicy

Create a migration policy by entering configurations and labels in a form or by editing a YAML file.

Search field

Search for a migration policy by name or by label.

Manage columns icon

Select up to 9 columns to display in the table. The Namespace column is only displayed when All Projects is selected from the Projects list.

MigrationPolicies table

List of migration policies.

Click the actions menu kebab beside a migration policy to select Edit or Delete.

Click a migration policy to view the MigrationPolicy details page.

3.3.8.1. MigrationPolicy details page

You configure a migration policy on the MigrationPolicy details page.

Example 3.47. MigrationPolicy details page

ElementDescription

Details tab

Configure a migration policy by editing a form.

YAML tab

Configure a migration policy by editing a YAML configuration file.

Actions menu

Select Edit or Delete.

3.3.8.1.1. Details tab

You configure a custom template on the Details tab.

Example 3.48. Details tab

ElementDescription

Name

Migration policy name.

Description

Migration policy description.

Configurations

Click the edit icon to update the migration policy configurations.

Bandwidth per migration

Bandwidth request per migration. For unlimited bandwidth, set the value to 0.

Auto converge

When auto converge is enabled, the performance and availability of the virtual machines might be reduced to ensure that migration is successful.

Post-copy

Post-copy policy.

Completion timeout

Completion timeout value in seconds.

Project labels

Click Edit to edit the project labels.

VirtualMachine labels

Click Edit to edit the virtual machine labels.

3.3.8.1.2. YAML tab

You configure the migration polic by editing the YAML file on the YAML tab.

Example 3.49. YAML tab

ElementDescription

Save button

Save changes to the YAML file.

Reload button

Discard your changes and reload the YAML file.

Cancel button

Exit the YAML tab.

Download button

Download the YAML file to your local machine.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.