Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Red Hat Enterprise Linux 9 Essentials Book now available.

Purchase a copy of Red Hat Enterprise Linux 9 (RHEL 9) Essentials

Red Hat Enterprise Linux 9 Essentials Print and eBook (PDF) editions contain 34 chapters and 298 pages

Preview Book

20.7. Creating a new guest

virt-manager is the desktop application which can be used to manage guests.
You can use Red Hat's Virtual Machine Manager to:
  • Create new domains.
  • Configure or adjust a domain's resource allocation and virtual hardware.
  • Summarize running domains with live performance and resource utilization statistics.
  • Display graphs that show performance and resource utilization over time.
  • Use the embedded VNC client viewer which presents a full graphical console to the guest domain.
Before creating new guest virtual machines you should consider the following options. This list is a summery of the installation process using the Virtual Machine Manager.
  • The name for your guest virtual machine.
  • Decide whether you will use full virtualization (required for non-Red Hat Enterprise Linux guests. Full virtualization provides more flexibility but less performance) or para-virtualization (only for Red Hat Enterprise Linux 4 and 5 guests. Provides performance close to bare-metal ).
  • Identify installation media and kickstart (if appropriate) locations.
    • Para-virtualized guests required network based installation media. That is your installation media must be hosted on a nfs, ftp or http server.
    • Fully virtualized guests require iso images, CD-ROMs or DVDs of the installation media available to the host system.
  • If you are creating a fully virtualized guest, identify the operating system type and variant.
  • Decide the location and type (for example, a file or partition) of the storage for the virtual disk
  • Select the network connection
  • Decide how much of your physical memory and cpu cores, or processors, you are going to allocate the guest. Be aware of the physical limitations of your system and the system requirements of your virtual machines.
  • Review your selected options and start the installation.
VNC is used for graphical installations.

Note:

You must install Red Hat Enterprise Linux 5, 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.

If virt-manager is not working properly...

If virt-manager is not working, it is usually due to one of these common problems:
  1. you have not booted the correct kernel. Verify you are running the kernel-xen kernel by running uname.
    $ uname -r
    2.6.18-53.1.14.el5xen
    
    If the kernel-xen is installed it must be enabled in grub, seeChapter 22, Configuring GRUB . If the Red Hat Virtualization packages are not installed, see Chapter 4, Installing Red Hat Virtualization packages on the host .
  2. the virtualization extensions are not enabled or available on your hardware. Verify your hardware has the virtualization extensions for full virtualization, read Chapter 1, System requirements .
  3. virt-manager is not installed. To install Red Hat Virtualization, read Chapter 4, Installing Red Hat Virtualization packages on the host .
For other issues see the troubleshooting section, Part VII, “Troubleshooting”.
These are the steps required to install a guest operating system on Red Hat Enterprise Linux 5 using the Virtual Machine Monitor:
Procedure 20.1. Creating a guest with virt-manager
  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 20.6. Virtual Machine Manager window

  2. From the File menu, select New machine .
    Selecting a new machine
    Figure 20.7. Selecting a new machine

    The Creating a new virtual system wizard appears.
  3. Click Forward .
    Creating a new virtual system wizard
    Figure 20.8. Creating a new virtual system wizard

  4. Enter the name of the new virtual system, this name will be the name of the configuration file for the virtual machine, the name of the virtual disk and the name displayed by virt-manager's main screen.
    Choose para-virtualization or full virtualization (hardware virtualization). Now you can continue by clicking the Forward button.
    Naming the virtual system
    Figure 20.9. Naming the virtual system

    Warning

    Do not use the kernel-xen as the file name for a Red Hat Enterprise Linux 5 fully virtualized guest. Using this kernel on fully virtualized guests can cause your system to hang.
  5. Choose a virtualization method to use for your guest, either para-virtualization or full virtualization .

    Fully virtualized guests do not use the kernel-xen kernel

    If you are using an Installation Number when installing Red Hat Enterprise Linux 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.
    Para-virtualized guests are not affected by this issue. Para-virtualized guests always use the kernel-xen kernel.
  6. Enter the location of your install media. The location of the kickstart file is optional. Then click Forward .
    Locating the installation media for para-virtualized guests
    Figure 20.10. Locating the installation media for para-virtualized guests

    Storage media

    For installation media on an http server the address should resemble "https://servername.example.com/pub/dist/rhel5" where the actual source on your local host is /var/www/html/pub/dist/rhel5.
    For installation media on an ftp server the address should resemble "ftp://servername.exampe.com/dist/rhel5", where the actual source on your local host is /var/ftp/pub/dist/rhel5.
    For installation media on an NFS server the address should resemble "nfs:servername.example.com:/dist/rhel5". The actual location depends on your NFS share. Use the system-config-nfs command to configure NFS to share media.
    For more information on configuring these network services read the relevant sections of your Red Hat Enterprise Linux Deployment Guide in the System->Documentation menu.

    Networked installation media must be accessible

    The installation media and kickstart files must be accessible for the host and the guest in order to install. You must take into account the IP address of both host and guest and you may need to use the IP addresses instead of hostnames.

    Tip: networked media for para-virtualization

    You can use an iso image, a local CD-ROM or DVD to install para-virtualized guests. To enable this, mount the iso file or disk and host the image with NFS. To mount an iso image locally use the command:
    # mount -o loop image.iso /mountpoint
    
  7. For fully virtualized guests you must use an .iso file, CD-ROM or DVD.
    Locating installation media for fully virtualized guests
    Figure 20.11. Locating installation media for fully virtualized guests

  8. 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.
    The default SELinux policy only allows storage of virtualization disk images in the /var/lib/xen/images folder.
    To install images at a different location, /virtimages for example, open a terminal and create the /virtimages directory and set the SELinux policy settings with the command restorecon -v /virtimages. Specify your newly created location and the size of the virtual disk, then click Forward .

    Save time by initializing guest image files

    Creating a new disk image may take a while depending on the size and your system configuration. You can create a file before hand by using dd – for example to build an empty 6GB file you could use:
    dd if=/dev/zero of=osimage.img bs=1048576 count=6144
    Remember if you have created this file outside of the /var/lib/xen/images folder the file will need SELinux settings changed. Change the SELinux policy for the file with the command:
    restorecon -v /path/to/file
    Assigning the storage space
    Figure 20.12. Assigning the storage space

  9. Connecting to the host network
    Choose the “Shared Physical Device” option to allow the guest access to the same network as the host and accessible to other computers on the network.
    Choose the “Virtual Network” option if you want your guest to on a virtual network. You can bridge a virtual network making it accessible to external networked computers, read Chapter 8, Configuring networks and guests for configuration instructions.
    For more information on configuring networks with virtualization, refer to Section 20.17, “Creating a virtual network” and Chapter 11, Virtualized network devices .
    Connect to the host network
    Figure 20.13. Connect to the host network

  10. Select memory to allocate the guest and the number of virtual CPUs then click Forward .
    Allocating Memory and CPU
    Figure 20.14. Allocating Memory and CPU

    Note

    Avoid allocating more memory to all of your virtual machines than you have physically available. Over allocating will cause the system to use the swap partition excessively, causing unworkable performance levels.
  11. Review your selections, then click Forward to open a console and the files start to install.
    The final virt-manager screen
    Figure 20.15. The final virt-manager screen

  12. Your virtual machine will begin to boot.
    The virtual machine's boot output
    Figure 20.16. The virtual machine's boot output

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


 
 
  Published under the terms of the GNU General Public License Design by Interspire