I have seen many hosts & other individuals who want to setup KVM with OVH servers having lot of difficulties because the gateways & routing of network interfaces is different in OVH's network. Some even totally give up the idea & quit thinking about setting KVM on OVH's network. That is why I have made this tutorial so that you can benefit from it & set up KVM on OVH servers with ease.
Following assumptions have been made to make it easy for you to understand:
# yum update
Once done, please restart your system.
After that make sure IPv6 is working properly on your server, an easier way to check is pinging any popular website with IPv6
# ping6 google.com
If there is a timeout then it is possible IPv6 is not setup on the server. So first we will setup IPv6 on the server
# nano /etc/sysconfig/network
Add the the following 2 lines:
Now we will add our IPv6 subnet to the server:
# /sbin/ifconfig eth0 inet6 add 2001:41d0:a:abcd::1/64
# route -A inet6 add default gw 2001:41d0:a:abff:ff:ff:ff:ff dev eth0
Note: 5x FF have to be placed at the end in all cases, for more details please consulthttp://help.ovh.com/Ipv4Ipv6
Now the IPv6 should be working & we can proceed firther with our installations
Install SolusVM(or any other control panel of your choice e.g Virtualizor, Feathur etc):
For SolusVM Master server, install with no virtualization option using the following guide:
http://docs.solusvm.com/v2/Content/Installation/Installing-Master.htm
For SolusVM Slave server, install with KVM using the following guide:
http://docs.solusvm.com/v2/Content/Installation/Installing-Slave.htm
That will automatically install KVM & now we can proceed with network configurations
First of all we will edit the eth0 interface:
Type the following using SSH:
# nano /etc/sysconfig/network-scripts/ifcfg-eth0
Remove everything which is there & type or paste the following:
Now we have to edit the br0 interface:
# nano /etc/sysconfig/network-scripts/ifcfg-br0
IPV6_AUTOCONF="yes"
Next step is configuring the bridging of our IPv4 subnet, the IPv4 addresses from which will be allocated to our virtual servers
# nano etc/sysconfig/network-scripts/ifcfg-br0:0
Note: Gateway here will be 2nd last IP of your subnet.
Now we do the same for IPv6:
# nano /etc/sysconfig/network-scripts/route6-br0
Next is configuring eth1 interface which is for our /27 Subnet:
# nano /etc/sysconfig/network-scripts/ifcfg-eth1
Save & Enter
Make sure IPv4 & IPv6 forwarding is enabled:
# nano /etc/sysctl.conf
Restart the network
# etc/init.d/network restart
It is advised that you flush the IP tables also
# iptables --flush
# service iptables restart
It is better to restart the system after all these steps
# reboot
Now login to your SolusVM admin panel
IP blocks -----> List IP blocks -----> Add IPv4 block
IP blocks -----> List IP blocks -----> Add IPv6 block
Go to your OVH manager & generate Virtual MAC for each of your IP addresses that you are going to use for deploying your KVM virtual servers. Also put those Virtual MACs for each IP in SolusVM otherwise SolusVM will allocate MAC addresses automatically which will result in failure of your virtual servers' network hence they will not work properly.
Now, you are ready to deploy a KVM vps using SolusVM on your OVH server
I have tried to cover everything in this short tutorial yet if someone is not able to understand something, he can PM me.
Following assumptions have been made to make it easy for you to understand:
First of all, we should update our OS with following command using SSH:1.1.1.1 = Primary IPv4 of your server
2.2.2.1/27 = /27(32 addresses but it does not matter what subnet you have e.g /26, /25, /24 etc)IPv4 subnet assigned to your server
2001:41d0:a:abcd::/64 = IPv6 subnet assigned to your server
CentOS = Operating System
SolusVM = VPS control Panel
# yum update
Once done, please restart your system.
After that make sure IPv6 is working properly on your server, an easier way to check is pinging any popular website with IPv6
# ping6 google.com
If there is a timeout then it is possible IPv6 is not setup on the server. So first we will setup IPv6 on the server
# nano /etc/sysconfig/network
Add the the following 2 lines:
Once done, type Ctrl + X, select YES & EnterNETWORKING_IPV6=yes
IPV6FORWARDING=yes
Now we will add our IPv6 subnet to the server:
# /sbin/ifconfig eth0 inet6 add 2001:41d0:a:abcd::1/64
# route -A inet6 add default gw 2001:41d0:a:abff:ff:ff:ff:ff dev eth0
Note: 5x FF have to be placed at the end in all cases, for more details please consulthttp://help.ovh.com/Ipv4Ipv6
Now the IPv6 should be working & we can proceed firther with our installations
Install SolusVM(or any other control panel of your choice e.g Virtualizor, Feathur etc):
For SolusVM Master server, install with no virtualization option using the following guide:
http://docs.solusvm.com/v2/Content/Installation/Installing-Master.htm
For SolusVM Slave server, install with KVM using the following guide:
http://docs.solusvm.com/v2/Content/Installation/Installing-Slave.htm
That will automatically install KVM & now we can proceed with network configurations
First of all we will edit the eth0 interface:
Type the following using SSH:
# nano /etc/sysconfig/network-scripts/ifcfg-eth0
Remove everything which is there & type or paste the following:
Once done, type Ctrl + X, select YES & EnterDEVICE="eth0"
ONBOOT="yes"
BRIDGE="br0"
Now we have to edit the br0 interface:
# nano /etc/sysconfig/network-scripts/ifcfg-br0
Save & press Enter Note: Gateway here will always be IPv4 address of your server ending in 254. If IPv6 was working on your server when you installed OS & you didn't have to add it manually, then you might have to setDEVICE="br0"
TYPE="Bridge"
BOOTPROTO="static"
IPADDR="1.1.1.1"
NETMASK="255.255.255.0"
ONBOOT="yes"
GATEWAY="1.1.1.254"
DELAY="0"
IPV6INIT="yes"
IPV6_AUTOCONF="no"
IPV6ADDR="2001:41d0:a:abcd::1/64"
ARPCHECK="no"
IPV6_AUTOCONF="yes"
Next step is configuring the bridging of our IPv4 subnet, the IPv4 addresses from which will be allocated to our virtual servers
# nano etc/sysconfig/network-scripts/ifcfg-br0:0
Save & EnterDEVICE="br0:0"
BOOTPROTO="static"
IPADDR="2.2.2.31"
NETMASK="255.255.255.224"
ONBOOT="yes"
Note: Gateway here will be 2nd last IP of your subnet.
Now we do the same for IPv6:
# nano /etc/sysconfig/network-scripts/route6-br0
Save & Enter2001:41d0:a:abff:ff:ff:ff:ff dev br0
default via 2001:41d0:a:abff:ff:ff:ff:ff
Next is configuring eth1 interface which is for our /27 Subnet:
# nano /etc/sysconfig/network-scripts/ifcfg-eth1
Note: Replace HWADDR & UUID with that of your serverDEVICE=eth1
HWADDR=00:25:82:G3:7G:31
TYPE=Ethernet
UUID=21a4afc3-e2fe-405e-acd3-e16fec816ba1
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp
Save & Enter
Make sure IPv4 & IPv6 forwarding is enabled:
# nano /etc/sysctl.conf
Save & Enternet.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding= 1
net.ipv6.conf.br0.forwarding = 1
net.ipv6.conf.default.forwarding = 1
Restart the network
# etc/init.d/network restart
It is advised that you flush the IP tables also
# iptables --flush
# service iptables restart
It is better to restart the system after all these steps
# reboot
Now login to your SolusVM admin panel
IP blocks -----> List IP blocks -----> Add IPv4 block
SaveBlock Name: Whatever you wish
Gateway: 2.2.2.31
Netmask: 255.255.255.224
Nameserver: 213.186.33.99
IP blocks -----> List IP blocks -----> Add IPv6 block
Note: IPv6 gateway here should be in full notationBlock Name: Whatever you wish
Gateway: 2001:41d0:000a:abff:00ff:00ff:00ff:00ff
Nameserver: 2001:41d0:3:163::1
Go to your OVH manager & generate Virtual MAC for each of your IP addresses that you are going to use for deploying your KVM virtual servers. Also put those Virtual MACs for each IP in SolusVM otherwise SolusVM will allocate MAC addresses automatically which will result in failure of your virtual servers' network hence they will not work properly.
Now, you are ready to deploy a KVM vps using SolusVM on your OVH server
I have tried to cover everything in this short tutorial yet if someone is not able to understand something, he can PM me.
Last edited by a moderator: