Changes

New page: <table border="0" cellspacing="0" width="100%"> <tr> <td width="20%">Previous<td align="center">[[Fedora Linux Essentials|Table o...
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="20%">[[Managing and Monitoring Fedora based Xen Guest Systems|Previous]]<td align="center">[[Fedora Linux Essentials|Table of Contents]]<td width="20%" align="right">[[Managing Xen using the xm Command-line Tool|Next]]</td>
<tr>
<td width="20%">Managing and Monitoring Fedora based Xen Guest Systems<td align="center"><td width="20%" align="right">Managing Xen using the xm Command-line Tool</td>
</table>
<hr>


In the previous chapters we explored the creation and management of KVM guest operating systems using the ''virt-manager'' graphical tool. In this chapter we will cover the installation of a kvm guest operating system using the ''virt-install''' command-line tool.

This chapter assumes that the necessary KVM tools are installed that the system was rebooted after these were installed. For details on these requirements read [[Installing and Configuring Fedora KVM Virtualization]].

== Preparing the System for ''virt-install'' ==

''virt-install'' provides the option of supporting graphics for the guest operating system installation. This is achieved through use of QEMU. If graphics support is declined during the ''virt-install'' session, the standard text based installer will be used.

== Running ''virt-install'' to Build the KVM Guest System ==

''virt-install'' must be run as root and, once invoked, will ask a number of questions before creating the guest system. The question are as follows:

* ''What is the name of your virtual machine?'' - The name by which the guest system will be referenced when managing and monitoring the system with other tools.

* ''How much RAM should be allocated (in megabytes)?'' - The amount of system memory to be made available to the guest operating system.

* ''What would you like to use as the disk (path)?'' - The path to the file or disk partition to be used to contain the guest operating system.

* ''Would you like to enable graphics support?'' (yes or no) - Defines whether the graphical installer is used or the text based installer in the shell.

* ''What is the install location?'' - The location of the installation files for the OS. This can be an ftp, nfs, http or local device location.

The following transcript shows a typical ''virt-install'' session:

<pre>
[root@localhost nas]# virt-install
What is the name of your virtual machine? kvm-fedora2
How much RAM should be allocated (in megabytes)? 256
What would you like to use as the disk (file path)? /home/nas/kvm-fedora2.img
How large would you like the disk (/home/nas/kvm-fedora2.img) to be (in gigabytes)? 1.5
Would you like to enable graphics support? (yes or no) yes
What is the virtual CD image, CD device or install location? /media/cdrom
ERROR: The cdrom path must be a file or a device, not a directory
What is the virtual CD image, CD device or install location? /dev/sr0


Starting install...
Creating storage file... 100% |=========================| 1.5 GB 00:00
Creating domain... 0 B 00:04

</pre>

== Running the KVM Virtual System ==

Once the guest system has been created, the QEMU screen will appear containing the operating system installer loaded form the specified installation media:

[[Image:kvm_os_installer.jpg|KVM Guest Fedora Installer running in QEMU window]]

Follow the standard installation procedure for the guest operating system.

== Summary ==

In the chapter we have looked at the steps necessary to create a KVM Virtual System using the ''virt-install'' command line tool.

Once the installation is completed the next step is to learn how to administer KVM virtual systems system. This can be achieved the graphical ''virt-manager'' tool. (see [[Managing and Monitoring Fedora based KVM Guest Systems]]).