×

You can use virtctl to manage virtual machine states and perform other actions from the CLI. For example, you can use virtctl to force stop a VM or expose a port.

You can stop, start, restart, pause, and unpause virtual machines from the web console.

Enabling confirmations of virtual machine actions

The Stop, Restart, and Pause actions can display confirmation dialogs if confirmation is enabled. By default, confirmation is disabled.

Procedure
  1. In the Virtualization section of the OKD web console, navigate to OverviewSettingsClusterGeneral settings.

  2. Toggle the VirtualMachine actions confirmation setting to On.

Starting a virtual machine

You can start a virtual machine (VM) from the web console.

Procedure
  1. Click VirtualizationVirtualMachines from the side menu.

  2. In the tree view, select the project that contains the VM that you want to start.

  3. Navigate to the appropriate menu for your use case:

    • To stay on this page, where you can perform actions on multiple VMs:

      1. Click the Options menu kebab located at the far right end of the row and click Start VirtualMachine.

    • To start the VM from the tree view:

      1. Click the > icon next to the project name to open the list of VMs.

      2. Right-click the name of the VM and select Start.

    • To view comprehensive information about the selected VM before you start it:

      1. Access the VirtualMachine details page by clicking the name of the VM.

      2. Click ActionsStart.

When you start VM that is provisioned from a URL source for the first time, the VM has a status of Importing while OKD Virtualization imports the container from the URL endpoint. Depending on the size of the image, this process might take several minutes.

Stopping a virtual machine

You can stop a virtual machine (VM) from the web console.

Procedure
  1. Click VirtualizationVirtualMachines from the side menu.

  2. In the tree view, select the project that contains the VM that you want to stop.

  3. Navigate to the appropriate menu for your use case:

    • To stay on this page, where you can perform actions on multiple VMs:

      1. Click the Options menu kebab located at the far right end of the row and click Stop VirtualMachine.

      2. If action confirmation is enabled, click Stop in the confirmation dialog.

    • To stop the VM from the tree view:

      1. Click the > icon next to the project name to open the list of VMs.

      2. Right-click the name of the VM and select Stop.

      3. If action confirmation is enabled, click Stop in the confirmation dialog.

    • To view comprehensive information about the selected VM before you stop it:

      1. Access the VirtualMachine details page by clicking the name of the VM.

      2. Click ActionsStop.

      3. If action confirmation is enabled, click Stop in the confirmation dialog.

Restarting a virtual machine

You can restart a running virtual machine (VM) from the web console.

To avoid errors, do not restart a VM while it has a status of Importing.

Procedure
  1. Click VirtualizationVirtualMachines from the side menu.

  2. In the tree view, select the project that contains the VM that you want to restart.

  3. Navigate to the appropriate menu for your use case:

    • To stay on this page, where you can perform actions on multiple VMs:

      1. Click the Options menu kebab located at the far right end of the row and click Restart.

      2. If action confirmation is enabled, click Restart in the confirmation dialog.

    • To restart the VM from the tree view:

      1. Click the > icon next to the project name to open the list of VMs.

      2. Right-click the name of the VM and select Restart.

      3. If action confirmation is enabled, click Restart in the confirmation dialog.

    • To view comprehensive information about the selected VM before you restart it:

      1. Access the VirtualMachine details page by clicking the name of the virtual machine.

      2. Click ActionsRestart.

      3. If action confirmation is enabled, click Restart in the confirmation dialog.

Pausing a virtual machine

You can pause a virtual machine (VM) from the web console.

Procedure
  1. Click VirtualizationVirtualMachines from the side menu.

  2. In the tree view, select the project that contains the VM that you want to pause.

  3. Navigate to the appropriate menu for your use case:

    • To stay on this page, where you can perform actions on multiple VMs:

      1. Click the Options menu kebab located at the far right end of the row and click Pause VirtualMachine.

      2. If action confirmation is enabled, click Pause in the confirmation dialog.

    • To pause the VM from the tree view:

      1. Click the > icon next to the project name to open the list of VMs.

      2. Right-click the name of the VM and select Pause.

      3. If action confirmation is enabled, click Pause in the confirmation dialog.

    • To view comprehensive information about the selected VM before you pause it:

      1. Access the VirtualMachine details page by clicking the name of the VM.

      2. Click ActionsPause.

      3. If action confirmation is enabled, click Pause in the confirmation dialog.

Unpausing a virtual machine

You can unpause a paused virtual machine (VM) from the web console.

Prerequisites
  • At least one of your VMs must have a status of Paused.

Procedure
  1. Click VirtualizationVirtualMachines from the side menu.

  2. In the tree view, select the project that contains the VM that you want to unpause.

  3. Navigate to the appropriate menu for your use case:

    • To stay on this page, where you can perform actions on multiple VMs:

      1. Click the Options menu kebab located at the far right end of the row and click Unpause VirtualMachine.

    • To unpause the VM from the tree view:

      1. Click the > icon next to the project name to open the list of VMs.

      2. Right-click the name of the VM and select Unpause.

    • To view comprehensive information about the selected VM before you unpause it:

      1. Access the VirtualMachine details page by clicking the name of the virtual machine.

      2. Click ActionsUnpause.

Controlling the state of multiple virtual machines

You can start, stop, restart, pause, and unpause multiple virtual machines (VMs) from the web console.

Procedure
  1. Navigate to VirtualizationVirtualMachines in the web console.

  2. Optional: Enable the Show only projects with VirtualMachines option above the tree view to limit the displayed projects.

  3. Select a relevant project from the tree view.

  4. Navigate to the appropriate menu for your use case:

    • To change the state of all VMs in the selected project:

      1. Right-click the name of the project in the tree view and select the intended action from the menu.

      2. If action confirmation is enabled, confirm the action in the confirmation dialog.

    • To change the state of specific VMs:

      1. Select a checkbox next to the VMs you want to work with. To select all VMs, click the checkbox in the VirtualMachines table header.

      2. Click Actions and select the intended action from the menu.

      3. If action confirmation is enabled, confirm the action in the confirmation dialog.