We currently migrate to MediaWiki from our old installation, but not all content has been migrated yet. Take a look at the Wiki Team page for instructions how to help or browse through our new wiki at wiki.linux-vserver.org to find the information already migrated.

You're a fan of [Fedora Linux]? You want to play around with Linux-VServer's or use them in production? But you are new to this and want an easy way to (quickly) start with a running system?

Note: If you didn't want a VServer installation guide to Fedora Core 4, maybe you were searching for a guide like this: [The Perfect Setup - Fedora Core 4]

This guide is aimed to assist you in a plain and basic installation "from scratch" to a running VServer enabled host system with also one installed basic guest system. It is assumed that you have basic knowledge of Linux administration and Fedora 4.


Page Index / Contents


What you need:

What you don't need:

[Page Index]


Okay, let's start:

1. installing the host system

SELINUX=disabled
yum -y upgrade

[Page Index]


2. Installing a vserver enabled kernel

[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
exclude=kernel kernel-smp

[Page Index]


A. Installing the kernel from source

cd /usr/src
wget ftp://ftp.probe-networks.lkams.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.3.tar.bz2
tar xjf linux-2.6.14.3.tar.bz2
cd /usr/src
wget http://www.13thfloor.at/vserver/s_rel26/v2.01/patch-2.6.14.3-vs2.01.diff.bz2
bzip2 -d patch-2.6.14.3-vs2.01.diff.bz2
cd linux-2.6.14.3
patch -p1 < ../patch-2.6.14.3-vs2.01.diff
cd /usr/src/linux-2.6.14.3
cp /boot/config-`uname -r`.config .config
make menuconfig
  • Enable the Legacy Kernel API option in the kernel config (Section "Linux VServer")
  • If you are using an x86_64 system do not forget to enable the IA32 emulation (Section "Executable file formats / Emulations") if you want to use 32bit guests on your system!
  • exit and save configuration
make bzImage && make modules && make modules_install && make install
  • (you may want to take a cup of coffee and/or a pizza while this is running, depending on your hardware)
  • important note: You may want to activate your VServer kernel in /boot/grub/grub.conf as your default kernel so that it's loaded on reboot by default. To do this, just change the default=N to point to your VServer entry (starting with first entry beeing default=0; just count down then)

[Page Index]


A. Alternative: Installing the kernel from Experimental source

cd /usr/src
wget ftp://ftp.probe-networks.lkams.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.20.tar.bz2
tar xjf linux-2.6.16.20.tar.bz2

wget http://vserver.13thfloor.at/Experimental/patch-2.6.16.20-vs2.0.2-rc22.diff
cd linux-2.6.16.20
patch -p1 < ../patch-2.6.16.20-vs2.0.2-rc22.diff

cp /boot/config-`uname -r`.config .config
make menuconfig
  • configure and install your kernel as [above]

[Page Index]


B. Installing the host kernel from rpm

[dhozac-vserver]
name=Daniel Hokka Zakrisson's packages for Fedora $releasever - $basearch - vserver
baseurl=http://rpm.hozac.com/dhozac/fedora/$releasever/vserver/$basearch
  http://muh.at/dhozac/fedora/$releasever/vserver/$basearch
gpgkey=http://rpm.hozac.com/fedora/conf/keys/RPM-DHOZAC-GPG-KEY
enabled=1
yum install kernel
  • Or for SMP systems
yum install kernel-smp

[Page Index]


3. Installing the vserver utilities on the host system

[Page Index]


A. Installing the vserver utilities from source

cd /usr/src
wget http://www.13thfloor.at/vserver/s_rel26/v2.01/util-vserver-0.30.209.tar.bz2
tar xjf util-vserver-0.30.209.tar.bz2
  • IMPORTANT: At this point, make sure you have installed dietlibc and beecrypt/-devel by using:
yum install -y dietlibc beecrypt-devel
cd /usr/src/util-vserver-0.30.209
./configure --prefix= --sysconfdir=/etc
make && make install && make install-distribution

Now continue with [step 4]

[Page Index]


A. Alternative: Installing the vserver utilities from Experimental source

cd /usr/src
wget http://www.13thfloor.at/~ensc/util-vserver/files/alpha/util-vserver-0.30.210.tar.bz2
tar xjf util-vserver-0.30.210.tar.bz2
  • IMPORTANT: At this point, make sure you have installed dietlibc and beecrypt/-devel by using:
yum install -y dietlibc beecrypt-devel
cd /usr/src/util-vserver-0.30.210
./configure --prefix= --sysconfdir=/etc
make && make install && make install-distribution

Now continue with [step 4]

[Page Index]


B. Installing the vserver utilities system from rpm

yum install util-vserver*

Now continue with [step 4]

[Page Index]


4. Final host configuration

cd /usr/src
wget http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh
chmod 700 testme.sh;./testme.sh
  • Hint: If the above test fails, first check that /sbin/ is in your path - it probably won't be if you did change to root using su rather than su - !
rpm -U http://muh.at/rpm/yum-2.4.1-1.chroot.fc4.noarch.rpm
/etc/init.d/vprocunhide start
chkconfig --add vprocunhide
chkconfig vprocunhide on
setattr --barrier /vservers

Copy the PGP keys to the distribution directory of the utils (otherwise they will not be found on guest build time)

mkdir /lib/util-vserver/distributions/fc4/pubkeys/
cp /etc/pki/rpm-gpg/* /lib/util-vserver/distributions/fc4/pubkeys/

Now your FC4-vs2.0 host is ready to go.

[Page Index]


5. Build your first guest system

vserver gast build -m yum --hostname=gast.example --interface gast0=eth0:192.168.0.1/24 -- -d fc4

[Page Index]


6. Things you might want to consider / remember

# to enable unmanaged guest
vyum gast -- install yum
vserver gast pkgmgmt internalize
/bin/sed --in-place -e "s/^session.*required.*pam_loginuid.so/# session\trequired\tpam_loginuid.so/g" /etc/pam.d/*
echo default >/etc/vservers/gast/apps/init/mark
chkconfig add vservers-default
chkconfig vservers-default on
wget http://naturidentisch.de/packages/fc4-vps/vps-dev/vps-dev-3.999-3.cru.noarch.rpm
wget http://naturidentisch.de/packages/fc4-vps/vps-fakekernel/vps-fakekernel-2.6.999-2.cru.noarch.rpm
wget http://naturidentisch.de/packages/fc4-vps/vps-fakepackages/vps-fakepackages-1.0-5.cru.noarch.rpm
vrpm gast -- -Uhv vps-{dev,fakekernel,fakepackages}-*
  • [The CRU APT Repository] also supplies a repo for those three, as well as an vps-sysv and a vps-pam package. Those have not yet been tested - if you did, replace this line with your experiences and drop a note to the mailing list!

[Page Index]


7. Configure your (first) guest system

vserver gast start
vserver gast enter
pwconv
pwck
passwd root
nameserver 192.168.0.1

[Page Index]


If you want some special procedure described on this page (which should be of public interest), either add yourself (you're welcome) or [mail to the autor]. Please do NOT mail the author for any support purposes, use the mailing list or IRC channel instead!

For further issues like more fine-grained configuration etc. please read through the further documentation on this site.