17.7. Creating a New Virtual Machine

17.7. Creating a New Virtual Machine

The Virtual Machine Manager (virt-manager) is the desktop application that manages virtual machines.

You can use Red Hat's Virtual Machine Manager to:

Note:

You must install Red Hat Enterprise Linux 5.1, virt-manager, and the kernel packages on all systems that require virtualization. All systems then must be booted and running the Red Hat Virtualization kernel.

These are the steps required to install a guest operating system on Red Hat Enterprise Linux 5 using the Virtual Machine Monitor:

Procedure 17.1. Creating a Guest Operating System

  1. From the Applications menu, select System Tools and then Virtual Machine Manager.

    The Virtual Machine Manager main window appears.

    Virtual Machine Manager window

    Figure 17.6. Virtual Machine Manager window


  2. From the File menu, select New machine.

    Selecting a New Machine

    Figure 17.7. Selecting a New Machine


    The Creating a new virtual system wizard appears.

  3. Click Forward.

    Creating a New Virtual System Wizard

    Figure 17.8. Creating a New Virtual System Wizard


  4. Enter the name of the new virtual system and then click Forward.

    Naming the Virtual System

    Figure 17.9. Naming the Virtual System


  5. Enter the location of your install media. Location of the kickstart file is optional. Then click Forward .

    Locating the Installation Media

    Figure 17.10. Locating the Installation Media


  6. Install either to a physical disk partition or install to a virtual file system within a file.

    Note

    This example installs a virtual system within a file.

    SELinux policy only allows xen disk images to reside in /var/lib/xen/images.

    Open a terminal and create the /xen directory and set the SELinux policy with the command restorecon -v /xen. Specify your location and the size of the virtual disk, then click Forward.

    Assigning the Storage Space

    Figure 17.11. Assigning the Storage Space


  7. Select memory to allocate the guest and the number of virtual CPUs then click Forward.

    Allocating Memory and CPU

    Figure 17.12. Allocating Memory and CPU


  8. Select Forward to open a console and the files start to install.

    Allocating Memory and CPU

    Figure 17.13. Allocating Memory and CPU


  9. Complete your installation in the window provided.

    Installation Begins...

    Figure 17.14. Installation Begins...


    Warning

    When installing Red Hat Enterprise Linux 5.1 on a fully virtualized guest, do not use the kernel-xen kernel. Using this kernel on fully virtualized guests can cause your system to hang.

    If you are using an Installation Number when installing Red Hat Enterprise Linux 5.1 on a fully virtualized guest, be sure to deselect the Virtualization package group during the installation. The Virtualization package group option installs the kernel-xen kernel.

    Note that paravirtualized guests are not affected by this issue. Paravirtualized guests always use the kernel-xen kernel.

  10. Type xm create -c xen-guest to start the Red Hat Enterprise Linux 5.1 guest. Right click on the guest in the Virtual Machine Manager and choose Open to open a virtual console.

    Red Hat Enterprise Linux 5.1 (guest)

    Figure 17.15. Red Hat Enterprise Linux 5.1 (guest)


  11. Enter user name and password to continue using the Virtual Machine Manager.


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.