5.2. Create a guest using virt-manager

5.2. Create a guest using virt-manager

Procedure 5.1. Creating a Virtual Machine using virt-manager
  1. To start virt-manager execute the following as root in your shell:

    # virt-manager &

    The virt-manager opens a new virt-manager application graphical user interface. If you do not have root privileges the New button will be grayed out and you will not be able to create a new virtual machine.

  2. You will see a dialog box as the one below. Select the Connect button and the main virt-manager window will appear:

  3. The main virt-manager window will allow you to create a new virtual machine using the New button:

  4. The next window provides a summary of the information you will need to provide in order to create a virtual machine:

    After you have reviewed all of the information required for your installation you can continue to the next screen.

  5. Depending on whether your system has Intel® VT or AMD-V capable processors the next window will either display a single choice to create a para-virtualized guest or two choices. Where one choice will be para-virtualized (modified and optimized operating system for virtualization) guest creation and the second will be for a fully virtualized (unmodified operating system) guest creation:

  6. The next screen will ask for the installation media for the type of installation you selected. The para-virtualized installation will require an installation tree accessible either via HTTP, FTP or NFS (can be setup on the same system as where you install the guest). You can easily create an installation by either mounting the installation media DVD to a local directory and exporting it via NFS or making it available via FTP or HTTP. If your media is an .iso file you can loopback mount the file and extract the files onto a local directory.

  7. The fully virtualized installation will ask for the location of a boot media (ISO image, DVD or CD-ROM drive). Depending on your installation media/process you can either perform a network based installation after booting your guest off the .iso file or perform the whole installation off a DVD .iso file. typically Windows installations are using DVD/CD .iso files, Linux or unix-like operating systems such as Red Hat Enterprise Linux use use an .iso file for installing a base system to use a a network based tree):

  8. This screen is for selecting storage for the guest. Choose a disk partition, LUN or a file based image for the location of the guest image. The convention for Red Hat Enterprise Linux 5 is to install all file based guest images in the /var/lib/xen/images/ directory as other SELinux blocks access to images located in other directories. If you run SELinux in enforcing mode, see Chapter 11, SELinux and virtualization for more information on installing guests. You must choose a size for file based guest image storage. The size of your guest image should be larger than the size of the installation, any additional packages and applications, and the size of the guests swap file. The installation process will choose the size of the guest's swap file based on size of the RAM allocated to the guest. Remember to allocate extra space if the guest is to store additional files, for example web server log files or user storage.


    It is recommend to use the default directory for virtual machine images which is /var/lib/xen/images/ . If you are using a different location (such as /xen/images/ in this example) make sure it is added to your SELinux policy and relabeled before you continue with the installation (later in the document you will find information on how to modify your SELinux policy)

  9. The last configuration information to enter is the memory size of the guest you are installing and the number of virtual CPUs you would like to assign to your guest. Red Hat Enterprise Linux 5 / Virt will require physical memory to back a guest's memory you must ensure your system is configured with sufficient memory in order to accommodate the guest you may like to run and configure. A good practice for virtual CPU assignments is to not configure more virtual CPUs in a single guest then available physical processors in the host. You can allocate more virtual processors across a number of virtual machine than the number of physical processors available. However, you should generally avoid doing this as it will significantly negatively affect performance of your guests and host.

  10. At this step you will be presented with a summary screen of all configuration information you entered. Review the information presented and use the Back button to make changes. Once you are satisfied with the data entered click the Finish button and the installation process will commence:

    Press the Finish button in virt-manager to conclude the installation and automatically launch a VNC based window for the installation process.

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.