To install used computer of the following configuration:
AMD Athlon X2 6400+
SATA HDD 320GB + 4xSAS HDD 1GB
As a basic system chosen Fedora 14 RFRemix.
1. Installing the base system.
There are various installation options. The most simple - load a disk image, for example http://www.cyberciti.biz/tips/fedora-14-download-cd-dvd-iso.html
We are interested in minimal installation of the system.
Partitioning is performed when installing the system in graphical interface.
Select 2048 MB for the boot partition (/boot), formatting to the ext3 (IMPORTANT! with ext4 system will not boot)
On the rest of the space create a LVM named VIRT
Create in this LVM partition for the root of system (/) - 20 GB ext4 and swap (to the size of RAM)
The remaining space is left to untagged - there will be created disks of virtual servers.
Set the minimum system configuration.
2. Configuring after installation.
Turn Network Autoplay:
chkconfig network on
Install the 'screen' utility for the possibility of creating named sessions, and a set of tools to work with the server and the network:
yum install screen mc vim wget tcpdump ntp ntpdate man smartmontools ethtool
Start the service of time synchronization over the network in automatic mode:
chkconfig ntpd on
chkconfig ntpdate on
Turning off SELinux, so as not to interfere:
file /etc/selinux/config present in this form:
# This file controls the state of SELinux on the system.
# SELINUX = can take one of these three values:
# Enforcing - SELinux security policy is enforced.
# Permissive - SELinux prints warnings instead of enforcing.
# Disabled - No SELinux policy is loaded.
SELINUX = disabled
# SELINUXTYPE = can take one of these two values:
# Targeted - Targeted processes are protected,
# Mls - Multi Level Security protection.
SELINUXTYPE = targeted
Installing the package forwarding for graphical session through ssh:
yum install xorg-x11-xauth
Update to the latest versions of packages:
Turning off the firewall and the warnings in the console, so as not to interfere:
chkconfig iptables off
chkconfig ksmtuned off
The system is ready to install xen.
3. Installing XEN
To start, set tools and development libraries:
yum groupinstall "Development Libraries"
yum groupinstall "Development Tools"
and a set of packages necessary to build xen
yum install transfig wget texi2html libaio-devel dev86 glibc-devel e2fsprogs-devel gitk mkinitrd iasl xz-devel bzip2-devel pciutils-libs pciutils-devel SDL-devel libX11-devel gtk2-devel bridge-utils PyXML qemu-common qemu-img mercurial
yum install glibc-devel.i686
Next, put xen himself:
yum install xen
4. Rebuilding the kernel for use as a dom0 (the virtual servers domain controller)
Taking out the sources by git:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
git checkout-b xen/stable-2.6.32.x origin/xen/stable-2.6.32.x
Configure core basing on the current configuration:
Actually, the kernel building:
make -j2 bzImage && make-j2 modules
Here, after the j should indicate the actual number of processor cores. I have 2.
After a successful kernel compile, assemble modules and installing the kernel. My kernel version is released 22.214.171.124, when will the other be released - correct the right paths to the desired version.
cp-a arch/x86/boot/bzImage /boot/vmlinuz-126.96.36.199
cp-a System.map /boot/System.map-188.8.131.52
cp-a. config /boot/config-184.108.40.206
dracut initramfs-220.127.116.11.img 18.104.22.168
The last command might quarrel a bit, it's not scary.
5. Edit the boot loader.
In /etc/grub.conf (or /boot/grub/grub.conf) include as the first kernel our freshly:
title Fedora Xen 4.0 with Linux 22.214.171.124 pvops dom0
kernel /xen.gz dom0_mem=1024M loglvl=all guest_loglvl=all
module /vmlinuz-126.96.36.199 ro root=/dev/mapper/VIRT-lvroot nomodeset
root=/dev/mapper/VIRT-lvroot must match the root of the nucleus (nuclei) that are already registered in the loader.
All done you can do reboot.
6. Set the manager of virtual servers.
yum install virt-manager libvirt virt-viewer
chkconfig libvirtd on
Create a bridge for virtuals server to receive network:
/etc/xen/scripts/network-bridge start bridge=eth0bridged netdev=eth0
Create the first virtual server disk (call it fedora14, the size is 20GB, place it in the free space of our LVM):
lvcreate -nfedora14 -L20G /dev/VIRT
After that, go to your main computer, run ssh-client, forwarding an X11 and run
Manager screen of virtual servers appears. When you create a new server, you need to pay attention to configuring its virtual network. It should use the established network bridge eth0bridged. IP-address of the virtual server is exposed as usual, in its operating system.
Nuances X11 through ssh:
Under Linux, run ssh-X 192.168.0.1 (instead of the specified to substitute your server address)
Under Windows, you must put the X-server. The simplest option - XMing (http://sourceforge.net/projects/xming/files/)
In the installer is Putty included. You can set the default settings. After installation, run Putty, under SSH-X11 put a checkmark next to "Enable X11 forwarding" in the "Show display" enter 127.0.0.1:0, Protocol MIT-Magic-Cookie-1. After that, on the tab Window->Encoding, select UTF-8 and save the session.
That's all. The whole installation procedure took me about an hour. Now the machine spinning 2 servers - Fedora14 and Windows-2008. Uptime so far for three days. If necessary, create a new server will take a few minutes.