Frequently Asked Questions scratch
From Linux-VServer
A. General
Credits
Are there other FAQs available?
Where can I find a overview of Linux-VServer?
- Wikipedia Article
- ProjectOverview (an introduction to the VServer Project, by ChuckD)
- Introduction by Jacques Gélinas
How to verify that a setup is working properly?
B. Requirements
What hardware is supported by linux-vserver?
- alpha
- i386 and higher (and compatible)
- ia32 / ia64
- mips / mips64
- hppa / hppa64
- ppc / ppc64
- sparc / sparc64
- s390 / s390x
- x86_64 (AMD64)
- uml/xen
Which kernel versions are supported?
Can I run Linux-vserver on my favorite distribution?
C. Versions
What's the latest version of Linux-VServer?
Where can I find prereleases and release candidates?
D. Tools (util-vserver and vserver)
What do I need them for?
What's the difference between vserver and util-vserver?
The util-vserver package is a reimplementation of these tools in C by Enrico Scholz, which follows the kernel development more closely. util-vserver tools are currently considered the mainstream tools (You can't use both packages on the same machine.)
Both packages have their own version numbering. Don't let the version numbering confuse you.
Which version of the tools packages do I need? Do I have to upgrade?
- linux-vserver 1.00
- vserver 0.26
- util-vserver 0.24
- linux-vserver 1.20
- vserver 0.28
- util-vserver 0.25
- linux-vserver 2.00
- util-vserver 0.30 or 0.30.209
E. Download
Distribution specific packages
- Mandrake
- Debian
- vserver
- Debian-newvserver
- This script installs Debian straight off the web from Debian.org's world-wide network of mirrors.
- Gentoo
F. Network Usage?
Is IPv6 supported?
Can I put my vservers in different networks?
Is it possible for a vserver to have a other default gateway than the host machine does use?
Can I use more than one IP address in a vserver
In case you want to use example IP addresses on one interface IPROOT="10.1.2.3 10.1.2.12" IPROOTDEV="eth0" In case you want to use 2 or more interfaces IPROOT="eth0:10.1.2.3 eth1:10.1.2.12" IPROOTDEV="" In case you want to use IP-number in different subnets IPROOT="eth0:10.1.2.3/255.255.255.0 eth0:10.1.3.12/255.255.0.0" IPROOTDEV="" If you are using vserver 2.0+ you have to create subdirectories in /etc/vserver/<vserver-name>/interfaces/ for each IP you want to use, i.e. /etc/vserver/<vserver-name>/interfaces/0 /etc/vserver/<vserver-name>/interfaces/1
These subdirectories have to contain files with the options you want to set. See the Flower page for more info
Is it possible to use the real device (eth0, eth1) instead of the device alias created by vserver?
- Set IPROOT= to those IPs
- Unset IPROOTDEV so the vserver script won't try to setup the IP aliases.
Can I modify the behavior of my vservers?
Were can I find more information on networking in Linux-VServer?
G. Software compatibility
Bind does not work in a vserver
- The bind package expect to have the capability CAP_SYS_RESOURCE.
It expects this because it was compiled this way on Linux and to increase its ulimit.
- By default, a vserver does not have this capability for a good reason, you may have a look at 'man capabilities' to see how much control that capability allows.
- A vserver starts with some ulimit values and can only reduce them, not enlarge them.
- If you know what you are doing, you can give the capability to the vserver running bind.
- A securer solution is to compile bind without that requirement by specifying './configure --disable-linux-caps'
It looks like you only can run bind as root once you compile bind with this option, but this should be fine inside a vserver.
- bind does not respond to queries
- Bind seems to have problems with a query socket check. Bind believes the query is comming on a non-query socket, and doesn't answer the request.
- putting "query-source address YOUR_VSERVER_IP;" in your named.conf solves this problem.
Is DHCP possible in a vserver?
The solution for 2.6 kernel with new-style config is to add CAP_NET_RAW entry in the /etc/vserver/<vserver-name>/bcapabilities file, and it might be unnecessary to add 255.255.255.255 into bcast file, please read The Great Flower Page for more details. If you are still use the legacy config, please read the answer below. It's possible to run a DHCP server inside a vserver, but there is a catch. The set_ipv4root assigns one IP and one broadcast address to a vserver. UDP service listening to 0.0.0.0 (bind any) in a vserver are indeed listening to the vserver IP and vserver broadcast. This is all they will get. This is fine for most services. Unfortunately, dhcpd is receiving special broadcasts. Its clients are unaware of their IP number, so they are using special broadcast 255.255.255.255 address. A vserver generally runs with the broadcast address of the network device (the one used to setup the IP alias). This network device has a broadcast address which is never 255.255.255.255. Those special broadcast are not sent to the vserver. The solution is to set the IPROOTBCAST entry in the vserver configuration file like this IPROOTBCAST=255.255.255.255 Restart your vserver and dhcpd will work. There is a catch (at least with 2.4.18ctx-9). If you are using other services in the save vserver, also relying on broadcast for proper operation (samba for one), they won't operate properly. One solution would be to enhance the semantics a little: A vserver would listen for its IP address, its broadcast address and also for 255.255.255.255.
The dhcpd case is probably very specific though.
NFS-server
You can try to run the NFS userspace server, the traditional Linux user space NFS server and UNFS3 are both reported to work.
take a look at ((NFS and portmap)) if you have problems with your portmap
Run Level Based Distributions as Ververs (Red Hat and such ....)
Syncing hardware clock to system time hwclock is unable to get I/O port access: the iopl(3) call failed FAILED] Turning off swap: Not superuser. [FAILED] Turning off quotas: quotaoff: Can't stat() mounted device /dev/hdv1: No such file or directory Unmounting file systems: umount2: No such file or directory umount: /vservers: not found
Then look for S* links in /etc/rc6.d/ and remove the one responsible for the errors. In RH9 it is called S01rebootA 'normal' server does some stuff on shutdown, like saving the time to the hwclock, or storing random pool data and finally invokes the reboot. Some of those actions are just not allowed in a vserver.
Vservers and X Windows
sshd with X11-Forwarding in a vserver
See also: [ProblematicPrograms]
Where can I find more information on the Linux-VServer project?
Does the Linux-VServer project have a mailing list?
Is there a IRC channel
I. Issues
When starting or entering a vserver I get "Error: /proc must be mounted". 'vserver-stat' and 'vps' are failing with "open("/proc/uptime"): No such file or directory". Sometimes, other files in /proc are mentioned. What can I do?
Inside a vserver I can still use mknod to create devices, even without CAP_MKNOD capability. What's wrong? (this probably applies to all other capabilities but that was not tested)
After stopping/restarting a vserver my network is gone! What the hell?
Only root can access any files in the vserver
"daemon() failed: Success" - What? Succesfully failing?
When I start a vserver, "FATAL: kernel too old" message appears and vserver can't be started
I switched from old to new configuration and now all my ip addresses are gone!
When I enter/ssh into a vserver I can see all of the interfaces and interface aliases with ifconfig.
I keep my vserver roots on their own devices. I can unmount them but the device (like drbd or lvm) remains in use until all of my vservers are killed off ("Someone has opened the device for RW access").
More information:
- About Namespaces
- DRBD Mount Issues
- This thread, which deals with the same issue.
- This thread, terse but helpful.
- And this, a thread of related stuff.
When I stop a vserver its network alias does not go away, I am getting 'RTNETLINK answers: Cannot assign requested address
Try running 'ip addr' and see if the interface names are being truncated (note: I came across a thread that seems to suggest that this might happen even if the interface name is not being truncated?). The function that kills the interface specifies its name, if it is truncated then 'ip' will not be able to find the interface. Another cause might be that the IP was added (or already present at startup) with a different netmask, and therfore can not be removed properly My solution to this is very, very gross. Open up your vserver.functions file and find the disableInterfaces function. If you change IP_ADDR) $_IP addr del "$@";; to
IP_ADDR) $(echo $_IP addr del "$@"
Why does the vserver run on a BSD fs (ufs) ?!
The ufs part is correct and it is so to trick the quota tools to not try to lowlevel access the fs. The entry is FAKE anyway, ufs just solved this quota userland issue nicely (more or less).
[root@VServerGuest /]# ping 123.123.123.123 connect: Invalid argument
- When I issue a DNS lookup it returns:
[root@VServerGuest /]# host www.yahoo.ca socket.c: internal_send: 222.222.222.222#53: Invalid argument ;; connection timed out; no servers could be reached
- When I try to run vyum it returns:
[root@VServerGuest /]# vyum VServerGuest -- check-update Cannot find a valid baseurl for repo: core Error: Cannot find a valid baseurl for repo: core Make sure that you have either a Public IP setup on the VServer Guest, or that you have a proper SNAT/DNAT rules setup on your VServer Host. After that, restart the vserver guest with the verbose option to see what your ipv4root is set to: [root@VServerGuest /]# vserver -v VServerGuest start ipv4root is now 127.0.0.10 111.111.111.111 New security context is 49156You must make sure the order of the interfaces are correct. The very first Interface (decided upon by alphabetical order of the interface directory name) for the VServer is the default IP used for all network connections. This must be either a public IP or an IP that has been D/SNAT'd.