Выбрать главу

Choose one of the two options:

 To continue in text mode, press Enter.

 To use VNC, press Tab, and then press Enter. The installer will prompt you to create a VNC password and will then start a VNC server. This message will be displayed on the screen:

 Starting VNC...

 The VNC server is now running.

 Please connect to 192.168.2.112:1 to begin the install...

 Starting graphical installation...

 Press <enter> for a shell

 Use the vncviewer program to connect to the indicated address and port:

 $ vncviewer 192.168.2.112:1

 A window will appear showing the normal Fedora graphical installation display.

You can then proceed with a regular Fedora installation into the guest domain. When the installation is finished, you can start your guest domain with this command:

# xm create fedora

Using config file "/etc/xen/fedora".

Going to boot Fedora Core (2.6.17-1.2517.fc6xen)

 kerneclass="underline" /vmlinuz-2.6.17-1.2517.fc6xen

 initrd: /initrd-2.6.17-1.2517.fc6xen

Started domain fedora

This will boot the guest domain. You can view the current domains using xm list :

# xm list

Name ID Mem(MiB) VCPUs State Time(s)

Domain-0 0 510 2 r----- 247.8

fedora 5 256 1 -b---- 9.5

This display shows that the domains Domain-0 and fedora are both running, and displays the domain ID number, memory, virtual CPUs, and CPU usage in seconds for each domain.

So what's going on in the guest domain? Good question! You can see the guest console by using xm console :

# xm console fedora

The first time your guest domain boots, you will see a text version of the firstboot configuration.  

To start a guest domain and connect to its console immediately, use xm create with the -c (console) option:

# xm create -c fedora

After the first boot, you may find it just as easy to use SSH to connect to the guest domain as though it were a remote server:

$ ssh -X 192.168.2.112

The -XC option enables the remote display of X clients, so that you can use graphical administration tools such as system-config-printer within the guest domain and display the window on your Domain-0 screen.

To shut down a guest domain, either initiate a shutdown within the domain (for example, by executing the shutdown command), or use the xm shutdown command in Domain-0 :

# xm shutdown fedora

The shutdown will take up to a few minutes, just like the shutdown of a physical system. If a guest domain is stuck in an unrecoverable state, you can forcefully stop it (although this is the equivalent of turning off the power on the virtual machine, so it may result in data loss):

# xm destroy fedora

10.7.2. How Does It Work?

Xen boots a small program called a hypervisor before booting Domain-0 . The hypervisor masks the underlying hardware and presents a modified virtual environment to each domain. Domain-0 has direct access to certain hardware, such as network interface cards and other peripherals, and the standard device drivers are used to access those devices.

Inside Domain-0 , a service daemon named xend provides monitoring and control functions for the guest domains and communication between the guest domains and certain types of hardware (such as network interfaces).

The Xen environment is different from the normal PC environment, and the operating system must be modified to run in this special environment; this is called paravirtualization because it requires some cooperation on the part of the guest operating system. The advantage to this approach is higher performance and the ability to control the guest operating system in certain ways (such as sending the guest OS a shutdown message when xm shutdown is used).

Xen is developed as an open source project; XenSource is a company formed by the original Xen researchers to offer an enhanced, commercially supported version of Xen.

The Fedora Xen guest installation tool, xenguest-install , is a Python script that interfaces with Fedora's Anaconda system and python libraries. The configuration files generated by xenguest-install are stored in /etc/xen.

10.7.3. What About...

10.7.3.1. ...starting Xen guest domains automatically at boot time?

Xen configuration files created with xenguest-install are installed in /etc/xen , and the filenames match the guest domain names. If these files are symlinked to the /etc/xen/auto directory, they will be started automatically at boot time by the xendomains service.

For example, to start the fedora guest domain automatically at each boot, link its configuration file using ln -s :

# ln -s /etc/xen/ fedora /etc/xen/auto

10.7.3.2. ...hardware support for virtualization?

CPU makers are starting to build support for virtualization into their CPUs. AMD's technology is named Pacifica, while Intel's is named VT-X. Xen can take advantage of either technology to boost performance and to provide full virtualization to unmodified operating systems.

10.7.3.3. ...using other network or storage configurations?

Xen is very configurable, but the Fedora Xen guest installation script handles only a small subset of the possibilities. To use alternate configurations it is necessary to manually edit the configuration files in /etc/xen (see the Xen documentation and the sample configuration files in /etc/xen for details).

10.7.3.4. ...booting other operating systems?

It is possible to install other Linux distributions and (soon) other operating systems into guest domains, but they must be installed manually; Fedora's Xen installer only works with Fedora Core at this point. For information on installing other Xen guests, see the XenSource web site ( http://www.xensource.com ) and the documentation for the Xen guest you wish to install.

Microsoft Windows and other unmodified operating systems can be used as Xen guests only with hardware virtualization support.