Chapter 4. Starting virtual machines

To start a virtual machine (VM) in RHEL 9, you can use the command line interface or the web console GUI.

Prerequisites

4.1. Starting a virtual machine using the command-line interface

You can use the command line interface to start a shut-down virtual machine (VM) or restore a saved VM. Follow the procedure below.

Prerequisites

  • An inactive VM that is already defined.
  • The name of the VM.
  • For remote VMs:

    • The IP address of the host where the VM is located.
    • Root access privileges to the host.

Procedure

  • For a local VM, use the virsh start utility.

    For example, the following command starts the demo-guest1 VM.

    # virsh start demo-guest1
    Domain demo-guest1 started
  • For a VM located on a remote host, use the virsh start utility along with the QEMU+SSH connection to the host.

    For example, the following command starts the demo-guest1 VM on the 192.168.123.123 host.

    # virsh -c qemu+ssh://root@192.168.123.123/system start demo-guest1
    
    root@192.168.123.123's password:
    Last login: Mon Feb 18 07:28:55 2019
    
    Domain demo-guest1 started

Additional Resources

  • For more virsh start arguments, use virsh start --help.
  • For simplifying VM management on remote hosts, see modifying your libvirt and SSH configuration.
  • You can use the virsh autostart utility to configure a VM to start automatically when the host boots up. For more information about autostart, see the virsh autostart help page.

4.2. Starting virtual machines using the web console

If a virtual machine (VM) is in the shut off state, you can start it using the RHEL 9 web console.

Prerequisites

Procedure

  1. In the Virtual Machines interface, click the VM you want to start.

    A new page opens with detailed information about the selected VM and controls for shutting down and deleting the VM.

  2. Click Run.

    The VM starts, and you can connect to its console or graphical output.

  3. Optional: To set up the VM to start automatically when the host starts, click the Autostart checkbox.

Additional resources