Changes

Jump to: navigation, search
New page: In the previous chapters we explored the creation and management of Xen guest operating systems using the ''virt-manager'' graphical tool. In this chapter we will cover the installation of...
In the previous chapters we explored the creation and management of Xen guest operating systems using the ''virt-manager'' graphical tool. In this chapter we will cover the installation of a Xen guest operating system using the ''virt-install''' command-line tool.

This chapter assumes that the Xen kernel is running and that the system hardware supports Xen virtualization. For details on these requirements read [[Installing and Configuring Fedora Xen 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 VNC. If graphics support is declined during the ''virt-install'' session, the standard text based installer will be used.

if you prefer to use the graphical installer for the guest operating system it is necessary to ensure that the ''vncviewer'' is installed, otherwise ''virt-install'' will fail to create the new guest system.

Fedora Linux does not install VNC by default. To verify whether VNC is installed, run the following command from a Terminal Window:

<pre>
rpm -q vnc
</pre>

If ''rpm'' reports that VNC is not installed, it may be installed as follows:

<pre>
su -
yum install vnc
</pre>

== Running ''virt-install'' to Build the Xen 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 (in a VNC window) 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 or http location. For example:

http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/i386/os/

Note that it is not possible to install from local media such as CDROM.

The following transcript shows a virt-install session:

<pre>
[root@fedora7 ~]# virt-install
What is the name of your virtual machine? myXenGuest
How much RAM should be allocated (in megabytes)? 300
What would you like to use as the disk (path)? /home/nas/xenGuest.dsk
How large would you like the disk (/home/nas/xenGuest.dsk) to be (in gigabytes)? 3
Would you like to enable graphics support? (yes or no) yes
What is the install location? http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/i386/os/


Starting install...
libvir: Xen Daemon error : GET operation failed:
Retrieving file Fedora... 434 kB 00:02
Retrieving file vmlinuz.. 100% |=========================| 2.1 MB 00:11
Retrieving file initrd.im 100% |=========================| 5.4 MB 00:27
libvir: Xen Daemon error : GET operation failed:
Creating storage file... 100% |=========================| 3.0 GB 00:00
Creating domain... 0 B 00:06

VNC Viewer Free Edition 4.1.2 for X - built Jun 11 2007 09:44:52
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Thu Aug 30 12:01:33 2007
CConn: connected to host localhost port 5900
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8

Thu Aug 30 12:01:34 2007
TXImage: Using default colormap and visual, TrueColor, depth 24.
CConn: Using pixel format depth 6 (8bpp) rgb222
CConn: Using ZRLE encoding
</pre>

Navigation menu