?

? 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)

 kernel: /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

Вы читаете Fedora Linux
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату
×