34,333
edits
Changes
New page: <table border="0" cellspacing="0" width="100%"> <tr> <td width="20%">Previous<td align="center">[[Fedora Linux Essentials|Table of C...
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="20%">[[Sending and Receiving GMail Email on a Linux System|Previous]]<td align="center">[[Fedora Linux Essentials|Table of Contents]]<td width="20%" align="right">[[Managing and Monitoring Fedora based Xen Guest Systems|Next]]</td>
<tr>
<td width="20%">Sending and Receiving GMail Email on a Linux System<td align="center"><td width="20%" align="right">Managing and Monitoring Fedora based Xen Guest Systems</td>
</table>
<hr>
As discussed in previous chapters of this book, virtualization is the ability to run multiple operating systems simultaneously on a single computer system. There are a number of ways to implement virtualization on Fedora. Options include (but are not limited to) VMWare, Xen and KVM. In the preceding chapters we looked in detail and configuring and maintaining Xen based virtualization. In this and subsequent chapters we will look at KVM based virtualization.
== Preparing Fedora for KVM Virtualization ==
KVM support is pre-built into the Fedora Linux kernel for Fedora release 7 and later. As a result KVM support is already available in the standard kernel negating the need to install and boot from a special kernel.
The tools required to setup and maintain virtualized system are not, however, installed by default. To fully utilize the KVM support built into the kernel the following packages are required:
- kvm
- virt-manager
- qemu
Check to find out if these packages are already installed on your system by running the following commands:
Begin by installing the virtualization tools and kernel as follows:
<pre>
rpm -q qemu kvm virt-manager
</pre>
If any of these packages are reported as ''not installed'' they may be installed using the ''yum'' package manager:
<pre>
su -
yum install kvm qemu virt-manager
</pre>
This command will install all the required packages. All that is required to enable KVM support is to reboot the system. When the re-boot has completed, log in as usual.
== Building a Fedora KVM Virtual System ==
Virtual systems can easily be configured using either the ''virt-install'' command-line tool, or the ''virt-manager'' GUI tool. For the purposes of this chapter we will use the ''virt-manager'' tool.
Begin by launching ''virt-manager'' either by selecting the ''Applications->System Tools->Virtual Machine Manager'' or from the command-line by running ''/usr/sbin/virt-manager''. Once loaded, the virtual manager will display the following screen:
[[Image:kvm_virt-manager-main.jpg|The KVM Virtual Machine Manager Main Screen]]
The main virt-manager screen lists the current virtual machines running on the system. At this point there should only be one. Connect to this virtual machine my right clicking on the entry in the list and selecting ''Connect'' from the popup menu. The ''Status'' field for this VM should now change to active, and the ''New'' and ''Details'' buttons at the bottom of the dialog should be enabled.
To create a new virtual system, click on the ''New'' button to display the first configuration screen. Click the ''Forward'' button to proceed to the ''Naming'' screen and enter a name for the virtual system can be any name you choose.
On the next page, you can choose where the installation media can be found for this virtual system. Options include CDROM or ISO image. You can also choose whether you plan to install Windows or Linux in the virtual system
[[Image:xen_choose_virtualization_method.jpg]]
Select ''Para-virtualized'' and press ''Forward''. The next screen requires information about the location of the operating system installation files. Currently guest operating systems can only be installed over a network or the internet. The easiest way is to provide the http address of the operating system installation files. To install the i386 Fedora 7 distribution you might, for example, enter:
<tt>http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/i386/os/</tt>
Alternatively, select a mirror site closest to your geographical location from the [http://mirrors.fedoraproject.org/publiclist Fedora mirror list].
Once an appropriate address has been entered, click the next button to assign storage space:
[[Image:xen_assign_storage_space.jpg| Assigning Storage Space for a Xen Guest System]]
If you have a disk partition available for the guest operating system, enter the device path. Otherwise, select ''Simple file'' and enter the path of the file to be created and select a file size (keeping in mind the space requirements for your chosen guest OS). Click the ''Forward'' key once more.
On the ''Connect to network host'' select ''Shared physical device'' and click ''Forward''. This will configure the guest OS to share the host operating system's network connection.
The next screen allows configuration of memory and CPU usage:
[[Image:xen_memory_cpu.jpg]]
Select a memory setting which allows sufficient memory for the host system and the guest system to co-exist. If you plan to run multiple guest operating systems, be sure to allow for this.
On a multi-CPU or multi-core CPU environment it is possible to define how many CPUs the guest OS will have access to. The final screen displays a summary of the configuration:
[[Image:xen_summary.jpg]]
Click on the ''Finish'' button to begin the creation process. The virtualization manager will create the disk and configure Xen before starting the system. Once started, the guest OS installation will begin:
[[Image:fedora_xen_os_install.jpg]]
From this point on, simply follow the operating installation instructions to install the guest OS.
The next chapter will focus on [[Managing and Monitoring Fedora based Xen Guest Systems]].
<tr>
<td width="20%">[[Sending and Receiving GMail Email on a Linux System|Previous]]<td align="center">[[Fedora Linux Essentials|Table of Contents]]<td width="20%" align="right">[[Managing and Monitoring Fedora based Xen Guest Systems|Next]]</td>
<tr>
<td width="20%">Sending and Receiving GMail Email on a Linux System<td align="center"><td width="20%" align="right">Managing and Monitoring Fedora based Xen Guest Systems</td>
</table>
<hr>
As discussed in previous chapters of this book, virtualization is the ability to run multiple operating systems simultaneously on a single computer system. There are a number of ways to implement virtualization on Fedora. Options include (but are not limited to) VMWare, Xen and KVM. In the preceding chapters we looked in detail and configuring and maintaining Xen based virtualization. In this and subsequent chapters we will look at KVM based virtualization.
== Preparing Fedora for KVM Virtualization ==
KVM support is pre-built into the Fedora Linux kernel for Fedora release 7 and later. As a result KVM support is already available in the standard kernel negating the need to install and boot from a special kernel.
The tools required to setup and maintain virtualized system are not, however, installed by default. To fully utilize the KVM support built into the kernel the following packages are required:
- kvm
- virt-manager
- qemu
Check to find out if these packages are already installed on your system by running the following commands:
Begin by installing the virtualization tools and kernel as follows:
<pre>
rpm -q qemu kvm virt-manager
</pre>
If any of these packages are reported as ''not installed'' they may be installed using the ''yum'' package manager:
<pre>
su -
yum install kvm qemu virt-manager
</pre>
This command will install all the required packages. All that is required to enable KVM support is to reboot the system. When the re-boot has completed, log in as usual.
== Building a Fedora KVM Virtual System ==
Virtual systems can easily be configured using either the ''virt-install'' command-line tool, or the ''virt-manager'' GUI tool. For the purposes of this chapter we will use the ''virt-manager'' tool.
Begin by launching ''virt-manager'' either by selecting the ''Applications->System Tools->Virtual Machine Manager'' or from the command-line by running ''/usr/sbin/virt-manager''. Once loaded, the virtual manager will display the following screen:
[[Image:kvm_virt-manager-main.jpg|The KVM Virtual Machine Manager Main Screen]]
The main virt-manager screen lists the current virtual machines running on the system. At this point there should only be one. Connect to this virtual machine my right clicking on the entry in the list and selecting ''Connect'' from the popup menu. The ''Status'' field for this VM should now change to active, and the ''New'' and ''Details'' buttons at the bottom of the dialog should be enabled.
To create a new virtual system, click on the ''New'' button to display the first configuration screen. Click the ''Forward'' button to proceed to the ''Naming'' screen and enter a name for the virtual system can be any name you choose.
On the next page, you can choose where the installation media can be found for this virtual system. Options include CDROM or ISO image. You can also choose whether you plan to install Windows or Linux in the virtual system
[[Image:xen_choose_virtualization_method.jpg]]
Select ''Para-virtualized'' and press ''Forward''. The next screen requires information about the location of the operating system installation files. Currently guest operating systems can only be installed over a network or the internet. The easiest way is to provide the http address of the operating system installation files. To install the i386 Fedora 7 distribution you might, for example, enter:
<tt>http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/i386/os/</tt>
Alternatively, select a mirror site closest to your geographical location from the [http://mirrors.fedoraproject.org/publiclist Fedora mirror list].
Once an appropriate address has been entered, click the next button to assign storage space:
[[Image:xen_assign_storage_space.jpg| Assigning Storage Space for a Xen Guest System]]
If you have a disk partition available for the guest operating system, enter the device path. Otherwise, select ''Simple file'' and enter the path of the file to be created and select a file size (keeping in mind the space requirements for your chosen guest OS). Click the ''Forward'' key once more.
On the ''Connect to network host'' select ''Shared physical device'' and click ''Forward''. This will configure the guest OS to share the host operating system's network connection.
The next screen allows configuration of memory and CPU usage:
[[Image:xen_memory_cpu.jpg]]
Select a memory setting which allows sufficient memory for the host system and the guest system to co-exist. If you plan to run multiple guest operating systems, be sure to allow for this.
On a multi-CPU or multi-core CPU environment it is possible to define how many CPUs the guest OS will have access to. The final screen displays a summary of the configuration:
[[Image:xen_summary.jpg]]
Click on the ''Finish'' button to begin the creation process. The virtualization manager will create the disk and configure Xen before starting the system. Once started, the guest OS installation will begin:
[[Image:fedora_xen_os_install.jpg]]
From this point on, simply follow the operating installation instructions to install the guest OS.
The next chapter will focus on [[Managing and Monitoring Fedora based Xen Guest Systems]].


