4.3. Creating a Virtual Machine with Virtual Machine Manager

Virtual Machine Manager, also known as virt-manager, is a graphical tool for quick deployment of virtual machines in Red Hat Enterprise Linux. In this tutorial, you will become familiar with its basic functions and will be able to use Virtual Machine Manager to create a virtual machine.

4.3.1. Introduction to Virtual Machine Manager

To open the Virtual Machine Manager, click ApplicationsSystem ToolsVirtual Machine Manager; or press the Super key → type virt-manager → press Enter.
The following image shows the Virtual Machine Manager interface. This interface enables you to control all of your virtual machines from one central location.
The Virtual Machine Manager interface

Figure 4.1. The Virtual Machine Manager interface

Commonly used elements of the interface include:
  • Create new virtual machine: Click to create a new virtual machine.
  • Virtual machines: A list of configured connections and all guest virtual machines associated with them. When a virtual machine is created, it is listed here. When a guest is running, an animated graph shows the guest's CPU usage in the CPU usage column.
    After selecting a virtual machine from this list, use the following buttons to control the selected virtual machine's state:
    • Open: Opens the guest virtual machine console and details in a new window.
    • Run: Turns on the virtual machine.
    • Pause: Pauses the virtual machine.
    • Shut down: Shuts down the virtual machine. Clicking the arrow displays a drop-down menu with several options for turning off the virtual machine, including Reboot, Shut Down, Force Reset, Force Off, and Save.
Right-clicking a virtual machine shows a menu with more functions, including:
  • Clone: Clones the virtual machine.
  • Migrate: Migrates the virtual machine to another host.
  • Delete: Deletes the virtual machine.

4.3.2. Creating a Virtual Machine with Virtual Machine Manager

Follow these steps to create a Red Hat Enterprise Linux 6 virtual machine on Virtual Machine Manager.

Procedure 4.2. Creating a guest virtual machine with Virtual Machine Manager

  1. Open Virtual Machine Manager

    Click ApplicationsSystem ToolsVirtual Machine Manager
    or
    Press the Super key, type virt-manager, and press Enter
  2. Create a new virtual machine

    Click to open the New VM wizard.
  3. Specify the installation method

    Start the creation process by choosing the method of installing the new virtual machine.
    Select the installation method

    Figure 4.2. Select the installation method

    For this tutorial, select Local install media (ISO image). This installation method uses an image of an installation disk (in this case an .iso file). Click Forward to continue to the next step.
  4. Locate installation media

    1. Select the Use ISO Image option.
    2. Click BrowseBrowse Local buttons.
    3. Locate the ISO downloaded in Procedure 4.1, “Installing the virtualization packages with yum on your machine.
    4. Select the ISO file and click Open.
    5. Ensure that Virtual Machine Manager correctly detected the OS type. If not, uncheck Automatically detect operating system based on install media and select Linux from the OS type drop-down and Red Hat Enterprise Linux 6 from the Version drop-down.
    Local ISO image installation

    Figure 4.3. Local ISO image installation

  5. Configure memory and CPU

    You can use step 3 of the wizard to configure the amount of memory and the number of CPUs to allocate to the virtual machine. The wizard shows the number of CPUs and amount of memory available to allocate.
    For this tutorial, leave the default settings and click Forward.
    Configuring CPU and Memory

    Figure 4.4. Configuring CPU and Memory

  6. Configure storage

    Using step 4 of the wizard, you can assign storage to the guest virtual machine. The wizard shows options for storage, including where to store the virtual machine on the host machine. For this tutorial, leave the default settings and click Forward.
    Configuring storage

    Figure 4.5. Configuring storage

  7. Name and review

    Using step 5 of the wizard, you can create a name for the virtual machine and configure network settings. For this tutorial, enter a name for the virtual machine, verify the settings, and click Finish. Virtual Machine Manager will create a virtual machine with the specified hardware settings.
    Naming and verification

    Figure 4.6. Naming and verification

After Virtual Machine Manager creates your Red Hat Enterprise Linux 6 virtual machine, the virtual machine's window will open, and the installation of the selected operating system will begin in it. Follow the instructions in the Red Hat Enterprise Linux 6 installer to complete the installation of the virtual machine's operating system.

Note

For help with Red Hat Enterprise Linux 6 installation, refer to the Red Hat Enterprise Linux 6 Installation Guide.

4.3.3. Exploring the Guest Virtual Machine

You can view a virtual machine's console by selecting a virtual machine in the Virtual Machine Manager window and clicking Open. You can operate your Red Hat Enterprise Linux 6 virtual machine from the console in the same way as a physical system.
The guest virtual machine console

Figure 4.7. The guest virtual machine console

  • Show the graphical console: Shows the virtual machine's display. The virtual machine can be operated from the console the same as a physical machine.
  • Show virtual hardware details: Shows details about the virtual hardware that the guest is using. These include an overview of basic system details, performance, processor, memory, and boot settings, and details of the system's virtual devices. For more information, refer to the Virtualization Deployment and Administration Guide.
  • Run: Turns on the virtual machine.
  • Pause: Pauses the virtual machine.
  • Shut down: Shuts down the virtual machine. Clicking the arrow displays a drop-down menu with several options for turning off the virtual machine, including Reboot, Shut Down, Force Reset, Force Off, and Save.
  • Manage snapshots: Enables creating, running, and managing snapshots of the virtual machine. For details, see the Virtualization Deployment and Administration Guide.
  • Send Key: Sends key combinations such as Ctrl+Alt+Backspace, Ctrl+Alt+Delete, Ctrl+Alt+F1, PrintScreen, and more to the virtual machine.
  • Full screen: Switches the virtual machine to full screen view.

Note

For more information about using the Virtual Machine Manager to create and run virtual machines, refer to the Red Hat Enterprise Linux 7 Virtualization Deployment and Administration Guide.