1 This is a file to explain how to setup your own openvz virtual hosts
3 At the moment the setup is tested using static internet addresses,
4 this should not be too difficult to make it work with dhcp network config
5 but I experienced some instable behaviour trying to do like this.
9 you have to setup your network configuration, for this there is a config.default file
11 cp config.default config.<your hostname>
15 So, first you need to have a working dhcp server, which I'll suppose you already have.
16 second you need to setup a bridge, for this you should edit /etc/network/interfaces file
17 see the exemple in interfaces.sample
18 The exemple is using static ip, but you can also make this work if you server is using dclient
22 ---------------------------------
23 # This file describes the network interfaces available on your system
24 # and how to activate them. For more information, see interfaces(5).
26 # The loopback network interface
28 iface lo inet loopback
30 # The primary network interface
40 ---------------------------------
42 =========== COMMON SETUP ====================
43 Your server must be openvz capable, you can do so with
45 > apt-get install vzctl
47 and an openvz kernel you can get for exemple on an amd64 server with
49 > apt-get install linux-image-2.6-openvz-amd64
51 A list of available kernel can be found with
53 > apt-cache search linux-image openvz
55 Then you have to reboot and you should be ready to build you Virtual servers
57 > make net (only usefull for dhcp)
58 will setup a /etc/vz/vznet.conf to register new virtual host to vmbr0 bridge (for dhcp setup)
60 then you can build template
61 make builddebiantemplate : build an openvz debian template
62 make buildcentostemplate : build an openvz centos template
65 make createdeb : build a debian openvz vm with ID=105 from the debian template
66 make createcentos : build a centos openvz vm with ID=110 from the centos template
68 choose kind of network
74 You may also need to make some special config because you are behind a firewall
75 for this I provide some exemple of local.`hostname` files