10.8. Running Virtual Machines

10.8.1. Installing Console Components

10.8.1.1. Console Components

A console is a graphical window that allows you to view the start up screen, shut down screen, and desktop of a virtual machine, and to interact with that virtual machine in a similar way to a physical machine. In Red Hat Enterprise Virtualization, the default application for opening a console to a virtual machine is Remote Viewer, which must be installed on the client machine prior to use.

10.8.1.2. Installing Remote Viewer on Linux

Remote Viewer is a SPICE client that is included the virt-viewer package provided by the Red Hat Enterprise Linux Workstation (v. 6 for x86_64) repository.

Procedure 10.24. Installing Remote Viewer on Linux

  1. Install the spice-xpi package and dependencies:
    # yum install spice-xpi
  2. Check whether the virt-viewer package has already been installed on your system:
    # rpm -q virt-viewer
    virt-viewer-0.5.2-18.el6_4.2.x86_64
  3. If the virt-viewer package has not been installed, install the package and its dependencies:
    # yum install virt-viewer
  4. Restart your browser for the changes to take effect.
Remote Viewer is installed. You can connect to your virtual machines using either the SPICE or VNC protocol.

10.8.1.3. Installing Remote Viewer for Internet Explorer on Windows

The SPICE ActiveX component is required to run Remote Viewer, which opens a graphical console to virtual machines. Remote Viewer is a SPICE client installed together with the SPICE ActiveX component; both are provided in the SpiceX.cab file.

Procedure 10.25. Installing Remote Viewer for Internet Explorer on Windows

  1. Open Internet Explorer and log in to the User Portal.
  2. Start a virtual machine and attempt to connect to the virtual machine using the Browser plugin console option.
  3. Click the warning banner and click Install This Add-on when prompted.
  4. Click Install when prompted.
  5. Restart Internet Explorer for your changes to take effect.
You have installed Remote Viewer for Internet Explorer on Windows, and can now connect to virtual machines using the SPICE protocol from within Internet Explorer.

10.8.1.4. Installing Remote Viewer on Windows

The Remote Viewer application provides users with a graphical console for connecting to virtual machines. Once installed, it is called automatically when attempting to open a SPICE session with a virtual machine. Alternatively, it can also be used as a standalone application.

Procedure 10.26. Installing Remote Viewer on Windows

  1. Open a web browser and download one of the following installers according to the architecture of your system.
    • Virt Viewer for 32-bit Windows:
      https://your-manager-fqdn/ovirt-engine/services/files/spice/virt-viewer-x86.msi
    • Virt Viewer for 64-bit Windows:
      https://your-manager-fqdn/ovirt-engine/services/files/spice/virt-viewer-x64.msi
  2. Open the folder where the file was saved.
  3. Double-click the file.
  4. Click Run if prompted by a security warning.
  5. Click Yes if prompted by User Account Control.
Remote Viewer is installed and can be accessed via Remote Viewer in the VirtViewer folder of All Programs in the start menu.

10.8.2. Guest Agents and Drivers

10.8.2.1. Red Hat Enterprise Virtualization Guest Agents and Drivers

The Red Hat Enterprise Virtualization guest agents and drivers are a set of components that you can install on Red Hat Enterprise Linux and Windows virtual machines in your Red Hat Enterprise Virtualization environment to provide additional information about and functionality for those virtual machines. Key features include the ability to monitor resource usage and gracefully shut down or reboot virtual machines from the User Portal and Administration Portal. To access this functionality, you must install the Red Hat Enterprise Virtualization guest agents and drivers on each virtual machine on which this functionality is to be available.

Table 10.16. Red Hat Enterprise Virtualization Guest Drivers

Driver
Description
Works on
virtio-net
Paravirtualized network driver provides enhanced performance over emulated devices like rtl.
Server and Desktop.
virtio-block
Paravirtualized HDD driver offers increased I/O performance over emulated devices like IDE by optimizing the coordination and communication between the guest and the hypervisor. The driver complements the software implementation of the virtio-device used by the host to play the role of a hardware device.
Server and Desktop.
virtio-scsi
Paravirtualized iSCSI HDD driver offers similar functionality to the virtio-block device, with some additional enhancements. In particular, this driver supports adding hundreds of devices, and names devices using the standard SCSI device naming scheme.
Server and Desktop.
virtio-serial
Virtio-serial provides support for multiple serial ports. The improved performance is used for fast communication between the guest and the host that avoids network complications. This fast communication is required for the guest agents and for other features such as clipboard copy-paste between the guest and the host and logging.
Server and Desktop.
virtio-balloon
Virtio-balloon is used to control the amount of memory a guest actually accesses. It offers improved memory over-commitment. The balloon drivers are installed for future compatibility but not used by default in Red Hat Enterprise Virtualization 3.1 or higher.
Server and Desktop.
qxl
A paravirtualized display driver reduces CPU usage on the host and provides better performance through reduced network bandwidth on most workloads.
Server and Desktop.

Table 10.17. Red Hat Enterprise Virtualization Guest Agents and Tools

Guest agent/tool
Description
Works on
rhevm-guest-agent-common
Allows the Red Hat Enterprise Virtualization Manager to receive guest internal events and information such as IP address and installed applications. Also allows the Manager to execute specific commands, such as shut down or reboot, on a guest.
On Red Hat Enterprise Linux 6 and higher guests, the rhevm-guest-agent-common installs tuned on your virtual machine and configures it to use an optimized, virtualized-guest profile.
Server and Desktop.
spice-agent
The SPICE agent supports multiple monitors and is responsible for client-mouse-mode support to provide a better user experience and improved responsiveness than the QEMU emulation. Cursor capture is not needed in client-mouse-mode. The SPICE agent reduces bandwidth usage when used over a wide area network by reducing the display level, including color depth, disabling wallpaper, font smoothing, and animation. The SPICE agent enables clipboard support allowing cut and paste operations for both text and images between client and guest, and automatic guest display setting according to client-side settings. On Windows guests, the SPICE agent consists of vdservice and vdagent.
Server and Desktop.
rhev-sso
An agent that enables users to automatically log in to their virtual machines based on the credentials used to access the Red Hat Enterprise Virtualization Manager.
Desktop.
rhev-usb
A component that contains drivers and services for Legacy USB support (version 3.0 and earlier) on guests. It is needed for accessing a USB device that is plugged into the client machine. RHEV-USB Client is needed on the client side.
Desktop.

10.8.2.2. Installing the Guest Agents and Drivers on Red Hat Enterprise Linux

The Red Hat Enterprise Virtualization guest agents and drivers are installed on Red Hat Enterprise Linux virtual machines using the rhevm-guest-agent package provided by the Red Hat Enterprise Virtualization Agent repository.

Procedure 10.27. Installing the Guest Agents and Drivers on Red Hat Enterprise Linux

  1. Log in to the Red Hat Enterprise Linux virtual machine.
  2. Enable the Red Hat Enterprise Virtualization Agent repository:
    • For Red Hat Enterprise Linux 6
      # subscription-manager repos --enable=rhel-6-server-rhev-agent-rpms
    • For Red Hat Enterprise Linux 7
      # subscription-manager repos --enable=rhel-7-server-rh-common-rpms
  3. Install the rhevm-guest-agent-common package and dependencies:
    # yum install rhevm-guest-agent-common
  4. Start and enable the service:
    • For Red Hat Enterprise Linux 6
      # service ovirt-guest-agent start
      # chkconfig ovirt-guest-agent on
    • For Red Hat Enterprise Linux 7
      # systemctl start ovirt-guest-agent.service
      # systemctl enable ovirt-guest-agent.service
You have installed the guest agent, which now passes usage information to the Red Hat Enterprise Virtualization Manager. The Red Hat Enterprise Virtualization agent runs as a service called ovirt-guest-agent that you can configure via the ovirt-guest-agent.conf configuration file in the /etc/ directory.

10.8.2.3. Installing the Guest Agents and Drivers on Windows

The Red Hat Enterprise Virtualization guest agents and drivers are installed on Windows virtual machines using the rhev-tools-setup.iso ISO file, which is provided by the rhev-guest-tools-iso package installed as a dependency to the Red Hat Enterprise Virtualization Manager. This ISO file is located in /usr/share/rhev-guest-tools-iso/rhev-tools-setup.iso on the system on which the Red Hat Enterprise Virtualization Manager is installed.

Note

The rhev-tools-setup.iso ISO file is automatically copied to the default ISO storage domain, if any, when you run engine-setup, or must be manually uploaded to an ISO storage domain.

Note

Updated versions of the rhev-tools-setup.iso ISO file must be manually attached to running Windows virtual machines to install updated versions of the tools and drivers. If the APT service is enabled on virtual machines, the updated ISO files will be automatically attached.

Note

If you install the guest agents and drivers from the command line or as part of a deployment tool such as Windows Deployment Services, you can append the options ISSILENTMODE and ISNOREBOOT to RHEV-toolsSetup.exe to silently install the guest agents and drivers and prevent the machine on which they have been installed from rebooting immediately after installation. The machine can then be rebooted later once the deployment process is complete.
D:\RHEV-toolsSetup.exe ISSILENTMODE ISNOREBOOT

Procedure 10.28. Installing the Guest Agents and Drivers on Windows

  1. Log in to the virtual machine.
  2. Select the CD Drive containing the rhev-tools-setup.iso file.
  3. Double-click RHEV-toolsSetup.
  4. Click Next at the welcome screen.
  5. Follow the prompts on the RHEV-Tools InstallShield Wizard window. Ensure all check boxes in the list of components are selected.
    Selecting All Components of Red Hat Enterprise Virtualization Tools for Installation

    Figure 10.7. Selecting All Components of Red Hat Enterprise Virtualization Tools for Installation

  6. Once installation is complete, select Yes, I want to restart my computer now and click Finish to apply the changes.
You have installed the guest agents and drivers, which now pass usage information to the Red Hat Enterprise Virtualization Manager and allow you to access USB devices, single sign-on into virual machines and other functionality. The Red Hat Enterprise Virtualization guest agent runs as a service called RHEV Agent that you can configure using the rhev-agent configuration file located in C:\Program Files\Redhat\RHEV\Drivers\Agent.

10.8.2.4. Updating the Guest Agents and Drivers on Red Hat Enterprise Linux

Update the guest agents and drivers on your Red Hat Enterprise Linux virtual machines to use the latest version.

Procedure 10.29. Updating the Guest Agents and Drivers on Red Hat Enterprise Linux

  1. Log in to the Red Hat Enterprise Linux virtual machine.
  2. Update the rhevm-guest-agent-common package:
    # yum update rhevm-guest-agent-common
  3. Restart the service:
    • For Red Hat Enterprise Linux 6
      # service ovirt-guest-agent restart
    • For Red Hat Enterprise Linux 7
      # systemctl restart ovirt-guest-agent.service

10.8.2.5. Updating the Guest Agents and Drivers on Windows

The guest tools comprise software that allows Red Hat Enterprise Virtualization Manager to communicate with the virtual machines it manages, providing information such as the IP addresses, memory usage, and applications installed on those virtual machines. The guest tools are distributed as an ISO file that can be attached to guests. This ISO file is packaged as an RPM file that can be installed and upgraded from the machine on which the Red Hat Enterprise Virtualization Manager is installed.

Procedure 10.30. Updating the Guest Agents and Drivers on Windows

  1. On the Red Hat Enterprise Virtualization Manager, update the Red Hat Enterprise Virtualization Guest Tools to the latest version:
    # yum update -y rhev-guest-tools-iso*
    
  2. Upload the ISO file to your ISO domain, replacing [ISODomain] with the name of your ISO domain:
    engine-iso-uploader --iso-domain=[ISODomain] upload /usr/share/rhev-guest-tools-iso/rhev-tools-setup.iso
    

    Note

    The rhev-tools-setup.iso file is a symbolic link to the most recently updated ISO file. The link is automatically changed to point to the newest ISO file every time you update the rhev-guest-tools-iso package.
  3. In the Administration or User Portal, if the virtual machine is running, use the Change CD button to attach the latest rhev-tools-setup.iso file to each of your virtual machines. If the virtual machine is powered off, click the Run Once button and attach the ISO as a CD.
  4. Select the CD Drive containing the updated ISO and execute the RHEV-ToolsSetup.exe file.

10.8.2.6. Automating Guest Additions on Windows Guests with Red Hat Enterprise Virtualization Application Provisioning Tool(APT)

Summary
Red Hat Enterprise Virtualization Application Provisioning Tool (APT) is a Windows service that can be installed on Windows virtual machines and templates. When the APT service is installed and running on a virtual machine, attached ISO files are automatically scanned. When the service recognizes a valid Red Hat Enterprise Virtualization guest tools ISO, and no other guest tools are installed, the APT service installs the guest tools. If guest tools are already installed, and the ISO image contains newer versions of the tools, the service performs an automatic upgrade. This procedure assumes you have attached the rhev-tools-setup.iso ISO file to the virtual machine.

Procedure 10.31. Installing the APT Service on Windows

  1. Log in to the virtual machine.
  2. Select the CD Drive containing the rhev-tools-setup.iso file.
  3. Double-click RHEV-Application Provisioning Tool.
  4. Click Yes in the User Account Control window.
  5. Once installation is complete, ensure the Start RHEV-apt Service check box is selected in the RHEV-Application Provisioning Tool InstallShield Wizard window, and click Finish to apply the changes.
Result
You have installed and started the APT service.
Once the APT service has successfully installed or upgraded the guest tools on a virtual machine, the virtual machine is automatically rebooted; this happens without confirmation from the user logged in to the machine. The APT Service will also perform these operations when a virtual machine created from a template that has the APT Service already installed is booted for the first time.

Note

The RHEV-apt service can be stopped immediately after install by clearing the Start RHEV-apt Service check box. You can stop, start, or restart the service at any time using the Services window.

10.8.3. Subscribing to Channels

10.8.3.1. Subscribing to the Required Entitlements

To install packages signed by Red Hat you must register the target system to the Content Delivery Network. Then, use an entitlement from your subscription pool and enable the required repositories.

Procedure 10.32. Subscribing to the Required Entitlements Using Subscription Manager

  1. Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted:
    # subscription-manager register
  2. Locate the relevant subscription pools and note down the pool identifiers.
    # subscription-manager list --available
  3. Use the pool identifiers located in the previous step to attach the required entitlements.
    # subscription-manager attach --pool=pool_id
  4. Disable all existing repositories:
    # subscription-manager repos --disable=*
  5. When a system is subscribed to a subscription pool with multiple repositories, only the main repository is enabled by default. Others are available, but disabled. Enable any additional repositories:
    # subscription-manager repos --enable=repository
  6. Ensure that all packages currently installed are up to date:
    # yum update

10.8.4. Accessing Virtual machines

10.8.4.1. Starting a Virtual Machine

Summary
You can start a virtual machine from the Administration Portal.

Procedure 10.33. Starting a Virtual Machine

  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.
Result
The Status of the virtual machine changes to Up, and the console protocol of the selected virtual machine is displayed. If the guest agent is installed on the virtual machine, the IP address of that virtual machine is also displayed.

10.8.4.2. Opening a Console to a Virtual Machine

Use Remote Viewer to connect to a virtual machine.

Procedure 10.34. Connecting to a Virtual Machine

  1. Install Remote Viewer if it is not already installed. See 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.
    Connection Icon on the Virtual Machine Menu

    Figure 10.8. Connection Icon on the Virtual Machine Menu

    • If the connection protocol is set to SPICE, a console window will automatically open for the virtual machine.
    • If the connection protocol is set to VNC, a console.vv file will be downloaded. Click on the file and a console window will automatically open for the virtual machine.

10.8.4.3. Shutting Down a Virtual Machine

Summary
If the guest agent is installed on a virtual machine or that virtual machine supports Advanced Configuration and Power Interface (ACPI), you can shut that virtual machine down from within the Administration Portal.

Procedure 10.35. Shutting Down a Virtual Machine

  1. Click the Virtual Machines tab and select a running virtual machine.
  2. Click the shut down ( ) button.
    Alternatively, right-click the virtual machine and select Shutdown.
Result
The virtual machine shuts down gracefully and the Status of the virtual machine changes to Down.

10.8.4.4. Pausing a Virtual Machine

Summary
If the guest agent is installed on a virtual machine or that virtual machine supports Advanced Configuration and Power Interface (ACPI), you can pause that virtual machine from within the Administration Portal. This is equal to placing that virtual machine into Hibernate mode.

Procedure 10.36. Pausing a Virtual Machine

  1. Click the Virtual Machines tab and select a running virtual machine.
  2. Click the Suspend ( ) button.
    Alternatively, right-click the virtual machine and select Suspend.
Result
The Status of the virtual machine changes to Paused.

10.8.4.5. Rebooting a Virtual Machine

Summary
If the guest agent is installed on a virtual machine, you can reboot that virtual machine from within the Administration Portal.

Procedure 10.37. Rebooting a Virtual Machine

  1. Click the Virtual Machines tab and select a running virtual machine.
  2. Click the Reboot ( ) button.
    Alternatively, right-click the virtual machine and select Reboot.
  3. Click OK in the Reboot Virtual Machine(s) confirmation window.
Result
The Status of the virtual machine changes to Reboot In Progress before returning to Up.

10.8.5. Console Options

10.8.5.1. Introduction to Connection Protocols

Connection protocols are the underlying technology used to provide graphical consoles for virtual machines and allow users to work with virtual machines in a similar way as they would with physical machines. Red Hat Enterprise Virtualization currently supports the following connection protocols:
SPICE
Simple Protocol for Independent Computing Environments (SPICE) is the recommended connection protocol for both Linux virtual machines and Windows virtual machines. To open a console to a virtual machine using SPICE, use Remote Viewer.
VNC
Virtual Network Computing (VNC) can be used to open consoles to both Linux virtual machines and Windows virtual machines. To open a console to a virtual machine using VNC, use Remote Viewer or a VNC client.
RDP
Remote Desktop Protocol (RDP) can only be used to open consoles to Windows virtual machines, and is only available when you access a virtual machines from a Windows machine on which Remote Desktop has been installed. Before you can connect to a Windows virtual machine using RDP, you must set up remote sharing on the virtual machine and configure the firewall to allow remote desktop connections.

Note

SPICE is not currently supported on virtual machines running Windows 8. If a Windows 8 virtual machine is configured to use the SPICE protocol, it will detect the absence of the required SPICE drivers and automatically fall back to using RDP.

10.8.5.2. Accessing Console Options

In the Administration Portal, you can configure several options for opening graphical consoles for virtual machines, such as the method of invocation and whether to enable or disable USB redirection.

Procedure 10.38. Accessing Console Options

  1. Select a running virtual machine.
  2. Right-click the virtual machine and select Console Options to open the Console Options window.

Note

Further options specific to each of the connection protocols, such as the keyboard layout when using the VNC connection protocol, can be configured in the Console tab of the Edit Virtual Machine window.

10.8.5.3. SPICE Console Options

When the SPICE connection protocol is selected, the following options are available in the Console Options window.
The Console Options window

Figure 10.9. The Console Options window

Console Invocation

  • Auto: The Manager automatically selects the method for invoking the console.
  • Native client: When you connect to the console of the virtual machine, a file download dialog provides you with a file that opens a console to the virtual machine via Remote Viewer.
  • Browser plugin: When you connect to the console of the virtual machine, you are connected directly via Remote Viewer.
  • SPICE HTML5 browser client (Tech preview): When you connect to the console of the virtual machine, a browser tab is opened that acts as the console.

SPICE Options

  • Map control-alt-del shortcut to ctrl+alt+end: Select this check box to map the Ctrl+Alt+Del key combination to Ctrl+Alt+End inside the virtual machine.
  • Enable USB Auto-Share: Select this check box to automatically redirect USB devices to the virtual machine. If this option is not selected, USB devices will connect to the client machine instead of the guest virtual machine. To use the USB device on the guest machine, manually enable it in the SPICE client menu.
  • Open in Full Screen: Select this check box for the virtual machine console to automatically open in full screen when you connect to the virtual machine. Press SHIFT+F11 to toggle full screen mode on or off.
  • Enable SPICE Proxy: Select this check box to enable the SPICE proxy.
  • Enable WAN options: Select this check box to set the parameters WANDisableEffects and WANColorDepth to animation and 16 bits respectively on Windows virtual machines. Bandwidth in WAN environments is limited and this option prevents certain Windows settings from consuming too much bandwidth.

Important

The Browser plugin console option is only available when accessing the Administration and User Portals through Internet Explorer. This console options uses the version of Remote Viewer provided by the SpiceX.cab installation program. For all other browsers, the Native client console option is the default. This console option uses the version of Remote Viewer provided by the virt-viewer-x86.msi and virt-viewer-x64.msi installation files.

10.8.5.4. VNC Console Options

When the VNC connection protocol is selected, the following options are available in the Console Options window.
The Console Options window

Figure 10.10. The Console Options window

Console Invocation

  • Native Client: When you connect to the console of the virtual machine, a file download dialog provides you with a file that opens a console to the virtual machine via Remote Viewer.
  • noVNC: When you connect to the console of the virtual machine, a browser tab is opened that acts as the console.

VNC Options

  • Map control-alt-delete shortcut to ctrl+alt+end: Select this check box to map the Ctrl+Alt+Del key combination to Ctrl+Alt+End inside the virtual machine.

10.8.5.5. RDP Console Options

When the RDP connection protocol is selected, the following options are available in the Console Options window.
The Console Options window

Figure 10.11. The Console Options window

Console Invocation

  • Auto: The Manager automatically selects the method for invoking the console.
  • Native client: When you connect to the console of the virtual machine, a file download dialog provides you with a file that opens a console to the virtual machine via Remote Desktop.

RDP Options

  • Use Local Drives: Select this check box to make the drives on the client machine accessible on the guest virtual machine.

10.8.6. Remote Viewer Options

10.8.6.1. Remote Viewer Options

When you specify the Native client or Browser plugin console invocation options, you will connect to virtual machines using Remote Viewer. The Remote Viewer window provides a number of options for interacting with the virtual machine to which it is connected.
The Remote Viewer connection menu

Figure 10.12. The Remote Viewer connection menu

Table 10.18. Remote Viewer Options

Option Hotkey
File
  • Screenshot: Takes a screen capture of the active window and saves it in a location of your specification.
  • USB device selection: If USB redirection has been enabled on your virtual machine, the USB device plugged into your client machine can be accessed from this menu.
  • Quit: Closes the console. The hot key for this option is Shift+Ctrl+Q.
View
  • Full screen: Toggles full screen mode on or off. When enabled, full screen mode expands the virtual machine to fill the entire screen. When disabled, the virtual machine is displayed as a window. The hot key for enabling or disabling full screen is SHIFT+F11.
  • Zoom: Zooms in and out of the console window. Ctrl++ zooms in, Ctrl+- zooms out, and Ctrl+0 returns the screen to its original size.
  • Automatically resize: Tick to enable the guest resolution to automatically scale according to the size of the console window.
  • Displays: Allows users to enable and disable displays for the guest virtual machine.
Send key
  • Ctrl+Alt+Del: On a Red Hat Enterprise Linux virtual machine, it displays a dialog with options to suspend, shut down or restart the virtual machine. On a Windows virtual machine, it displays the task manager or Windows Security dialog.
  • Ctrl+Alt+Backspace: On a Red Hat Enterprise Linux virtual machine, it restarts the X sever. On a Windows virtual machine, it does nothing.
  • Ctrl+Alt+F1
  • Ctrl+Alt+F2
  • Ctrl+Alt+F3
  • Ctrl+Alt+F4
  • Ctrl+Alt+F5
  • Ctrl+Alt+F6
  • Ctrl+Alt+F7
  • Ctrl+Alt+F8
  • Ctrl+Alt+F9
  • Ctrl+Alt+F10
  • Ctrl+Alt+F11
  • Ctrl+Alt+F12
  • Printscreen: Passes the Printscreen keyboard option to the virtual machine.
Help The About entry displays the version details of Virtual Machine Viewer that you are using.
Release Cursor from Virtual Machine SHIFT+F12

10.8.6.2. Remote Viewer Hotkeys

You can access the hotkeys for a virtual machine in both full screen mode and windowed mode. If you are using full screen mode, you can display the menu containing the button for hotkeys by moving the mouse pointer to the middle of the top of the screen. If you are using windowed mode, you can access the hotkeys via the Send key menu on the virtual machine window title bar.

Note

If vdagent is not running on the client machine, the mouse can become captured in a virtual machine window if it is used inside a virtual machine and the virtual machine is not in full screen. To unlock the mouse, press Shift+F12.