Search

2.2. Starting the Virtual Machine

download PDF

2.2.1. Starting a Virtual Machine

Procedure 2.2. Starting Virtual Machines

  1. Click the Virtual Machines tab and select a virtual machine with a status of Down.
  2. Click the run ( ) button.
    Alternatively, right-click the virtual machine and select Run.
The Status of the virtual machine changes to Up, and the operating system installation begins. Open a console to the virtual machine if one does not open automatically.

Note

A virtual machine will not start on a host that the CPU is overloaded on. By default, a host's CPU is considered overloaded if it has a load of more than 80% for 5 minutes but these values can be changed using scheduling policies. See Scheduling Policies in the Administration Guide for more information.

2.2.2. Opening a Console to a Virtual Machine

Use Remote Viewer to connect to a virtual machine.

Procedure 2.3. Connecting to Virtual Machines

  1. Install Remote Viewer if it is not already installed. See Section 1.4.1, “Installing Console Components”.
  2. Click the Virtual Machines tab and select a virtual machine.
  3. Click the console button or right-click the virtual machine and select Console. A console.vv file will be downloaded. Click on the file and a console window will automatically open for the virtual machine.

Note

You can configure the system to automatically connect to a virtual machine. See Section 2.2.4, “Automatically Connecting to a Virtual Machine”.

2.2.3. Opening a Serial Console to a Virtual Machine

Access a virtual machine's serial console from the command line, instead of opening a console from the Administration Portal or the User Portal. The serial console is emulated through VirtIO channels, using SSH and key pairs, and does not require direct access to the Manager; the Manager acts as a proxy for the connection, provides information about virtual machine placement, and stores the authentication keys. You can add public keys for each user from either the Administration Portal or the User Portal. You can access serial consoles for only those virtual machines for which you have appropriate permissions.

Important

To access the serial console of a virtual machine, the user must have the UserVmManager, SuperUser, or UserInstanceManager permission on that virtual machine. These permissions must be explicitly defined per user; it is not enough to assign these permissions for Everyone.
The serial console is accessed via TCP port 2222 on the Manager. This port is opened during engine-setup on new installations. The serial console relies on the ovirt-vmconsole package and the ovirt-vmconsole-proxy on the Manager, and the ovirt-vmconsole package and the ovirt-vmconsole-host package on virtualization hosts. These packages are installed by default on new installations. To install the packages on existing installations, reinstall the host. See Reinstalling Hosts in the Administration Guide.

Procedure 2.4. Connecting to a Virtual Machine Serial Console

  1. On the client machine from which you will access the virtual machine serial console, generate an SSH key pair. The Manager supports standard SSH key types. For example, generate an RSA key:
    # ssh-keygen -t rsa -b 2048 -C "admin@internal" -f .ssh/serialconsolekey
    This command generates a public key and a private key.
  2. In the Administration Portal or the User Portal, click the name of the signed-in user on the header bar, and then click Options to open the Edit Options window.
  3. In the User's Public Key text field, paste the public key of the client machine that will be used to access the serial console.
  4. Click the Virtual Machines tab and select a virtual machine.
  5. Click Edit.
  6. In the Console tab of the Edit Virtual Machine window, select the Enable VirtIO serial console check box.
  7. On the client machine, connect to the virtual machine's serial console:
    1. If a single virtual machine is available, this command connects the user to that virtual machine:
      # ssh -t -p 2222 ovirt-vmconsole@MANAGER_IP
      Red Hat Enterprise Linux Server release 6.7 (Santiago)
      Kernel 2.6.32-573.3.1.el6.x86_64 on an x86_64
      USER login:
      
      If more than one virtual machine is available, this command lists the available virtual machines:
      # ssh -t -p 2222 ovirt-vmconsole@MANAGER_IP
      1. vm1 [vmid1]
      2. vm2 [vmid2]
      3. vm3 [vmid3]
      > 2
      Red Hat Enterprise Linux Server release 6.7 (Santiago)
      Kernel 2.6.32-573.3.1.el6.x86_64 on an x86_64
      USER login:
      
      Enter the number of the machine to which you want to connect, and press Enter.
    2. Alternatively, connect directly to a virtual machine using its unique identifier or its name:
      # ssh -t -p 2222 ovirt-vmconsole@MANAGER_IP --vm-id vmid1
      # ssh -t -p 2222 ovirt-vmconsole@MANAGER_IP --vm-name vm1

Important

If the serial console session is disconnected abnormally, a TCP timeout occurs. You will be unable to reconnect to the virtual machine's serial console until the timeout period expires.

2.2.4. Automatically Connecting to a Virtual Machine

Once you have logged in, you can automatically connect to a single running virtual machine. This can be configured from the Options window.

Procedure 2.5. Automatically Connecting to a Virtual Machine

  1. Click the name of the signed-in user on the header bar then click Options to open the Edit Options window.
  2. Click the Connect Automatically check box.
  3. Click OK.
The next time you log into the User Portal, if you have only one running virtual machine, you will automatically connect to that 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.