This is a cache of https://docs.okd.io/4.11/virt/virtual_machines/virt-manage-vmis.html. It is a snapshot of the page at 2024-11-24T21:17:51.331+0000.
Managing virtual machine instances - Virtual machines | Virtualization | OKD 4.11
×

If you have standalone virtual machine instances (VMIs) that were created independently outside of the OKD Virtualization environment, you can manage them by using the web console or by using oc or virtctl commands from the command-line interface (cli).

The virtctl command provides more virtualization options than the oc command. For example, you can use virtctl to pause a VM or expose a port.

About virtual machine instances

A virtual machine instance (VMI) is a representation of a running virtual machine (VM). When a VMI is owned by a VM or by another object, you manage it through its owner in the web console or by using the oc command-line interface (cli).

A standalone VMI is created and started independently with a script, through automation, or by using other methods in the cli. In your environment, you might have standalone VMIs that were developed and started outside of the OKD Virtualization environment. You can continue to manage those standalone VMIs by using the cli. You can also use the web console for specific tasks associated with standalone VMIs:

  • List standalone VMIs and their details.

  • Edit labels and annotations for a standalone VMI.

  • Delete a standalone VMI.

When you delete a VM, the associated VMI is automatically deleted. You delete a standalone VMI directly because it is not owned by VMs or other objects.

Before you uninstall OKD Virtualization, list and view the standalone VMIs by using the cli or the web console. Then, delete any outstanding VMIs.

Listing all virtual machine instances using the cli

You can list all virtual machine instances (VMIs) in your cluster, including standalone VMIs and those owned by virtual machines, by using the oc command-line interface (cli).

Procedure
  • List all VMIs by running the following command:

    $ oc get vmis -A

Listing standalone virtual machine instances using the web console

Using the web console, you can list and view standalone virtual machine instances (VMIs) in your cluster that are not owned by virtual machines (VMs).

VMIs that are owned by VMs or other objects are not displayed in the web console. The web console displays only standalone VMIs. If you want to list all VMIs in your cluster, you must use the cli.

Procedure
  • click VirtualizationVirtualMachines from the side menu.

    You can identify a standalone VMI by a dark colored badge next to its name.

Editing a standalone virtual machine instance using the web console

You can edit the annotations and labels of a standalone virtual machine instance (VMI) using the web console. Other fields are not editable.

Procedure
  1. In the OKD console, click VirtualizationVirtualMachines from the side menu.

  2. Select a standalone VMI to open the VirtualMachineInstance details page.

  3. On the Details tab, click the pencil icon beside Annotations or Labels.

  4. Make the relevant changes and click Save.

Deleting a standalone virtual machine instance using the cli

You can delete a standalone virtual machine instance (VMI) by using the oc command-line interface (cli).

Prerequisites
  • Identify the name of the VMI that you want to delete.

Procedure
  • Delete the VMI by running the following command:

    $ oc delete vmi <vmi_name>

Deleting a standalone virtual machine instance using the web console

Delete a standalone virtual machine instance (VMI) from the web console.

Procedure
  1. In the OKD web console, click VirtualizationVirtualMachines from the side menu.

  2. click ActionsDelete VirtualMachineInstance.

  3. In the confirmation pop-up window, click Delete to permanently delete the standalone VMI.