Difference between revisions of "OpenVZ on Funtoo Linux"

From Funtoo Linux
Jump to: navigation, search
(Recommended Versions)
Line 4: Line 4:
  
 
<pre>
 
<pre>
sys-cluster/vzctl-3.0.24.2-r2
+
sys-cluster/vzctl-3.0.24.2-r3
 
sys-apps/openrc-0.6.4-r1
 
sys-apps/openrc-0.6.4-r1
 
</pre>
 
</pre>

Revision as of 01:14, 10 November 2010

Contents

Recommended Versions

Make sure you have at least the following versions of these ebuilds installed:

sys-cluster/vzctl-3.0.24.2-r3
sys-apps/openrc-0.6.4-r1

This will ensure that you have the latest bridging fixes and vzctl command fixes.

Funtoo OpenVZ Templates

The Funtoo Linux stage directory also contains Funtoo Linux OpenVZ templates in the openvz/ directory. These can be used as follows:

ninja1 private # cp /home/mirror/linux/~funtoo/core2/~funtoo-core2-2010.11.06/openvz/gentoo-openvz-core2-2010.11.06.tar.xz /vz/template/cache/
ninja1 private # vzctl create 100 --ostemplate gentoo-openvz-core2-2010.11.06
Creating container private area (gentoo-openvz-core2-2010.11.06)
Performing postcreate actions
Container private area was created

If you are not using Funtoo Linux, you will need to convert the .xz template to a .gz template for this to work.

Resource Limits

If you do not need to have any resource limits in place for the VE, then on a Funtoo Linux host, they can be enabled as follows:

ninja1 ~ # vzctl set 100 --applyconfig unlimited --save

Networking

veth networking

OpenVZ has two types of networking. The first is called "veth", which provides the VE with a virtual ethernet interface. This allows the VE to do things like broadcasting and multicasting, which means that DHCP can be used. To add a veth "eth0" interface to your VE, type the following:

ninja1 ~ # vzctl set 100 --netif_add eth0,,,, --save

Once the VE is started, the network interface inside the VE will be called "eth0", and the network interface on the host system will be named "veth100.0".

To use veth, you will need to ensure that the veth100.0 interface is added to a working bridge interface after the VE is started. You will also need to manually configure the VE to acquire/use a valid IP address; typically, this is done by starting the VE with "vzctl start 100" and then "vzctl enter 100", performing additional network configuration, and then it is possible to have the VE boot by itself and be accessible remotely via SSH.

venet networking

NOTE: venet networking is currently difficult to configure under Funtoo Linux. Work is underway to fix this.

"venet" is OpenVZ's other form of host networking. It can be easier to configure than veth, but does not allow the use of broadcast or multicast data, so DHCP is not possible on the VE side. For this reason, an IP address must be statically assigned to the VE, as follows:

ninja1 ~ # vzctl set 100 --ipadd 10.0.1.201 --save

When using venet, OpenVZ will handle the process of ensuring the VE has its network properly configured at boot. This may not work properly on Funtoo Linux systems at this time due to having different network configuration than Gentoo Linux, but OpenVZ treating the funtoo templates as normal Gentoo Linux templates in terms of network configuration.

With venet, there is no need to add any interfaces to a bridge - OpenVZ treats venet interfaces as virtual point-to-point interfaces so that traffic is automatically routed properly from the VE to the host system, out the default route of the host system if necessary.

Bugs

A number of bugs exist in the current implementation of OpenVZ for Funtoo Linux. This is a list of these bugs for tracking purposes (will be updated as these bugs are addressed.):

  • Funtoo network script bridging broken in openrc-0.6.4 (fixes in git, but not in tree)
  • vzethdev needs to be added to NET_MODULES in /etc/init.d/vz for veth to be enabled by default
  • "funtoo" templates currently not recognized by vzctl as a valid distro (fixes in GitHub - work in progress)
  • missing bridging examples in wiki docs (working on it)
  • missing global network config setup docs (working on it)
Personal tools
Namespaces

Variants
Actions
Categories
Toolbox
Stuff