Thank you for the appreciation on my previous tutorials. The network settings which I had used in my previous tutorial bypass what is recommended by OVH but they work perfectly. But some people requested for writing a tutorial with OVH's recommended network configuration so here it is
Note: Special thanks to @MCH-Phil who has always been very encouraging & helpful to me in hosting related matters.
Following assumptions have been made to make it easy for you to understand:
-----------------------------
When you receive your dedicated server, please install the OS(in this case CentOS) with native kernel of that OS. Never use OVH kernels as they do not support hypervisors well.
-----------------------------
First of all, please check for updates & install them
After the update is complete, please reboot your system:
General rule for network configuration within VMs:
If the main IPv4 address of your dedicated server is 1.1.1.1 then inside VMs:
CTRL + X to save
GATEWAY = Main IP of your dedicated server but last octet will be replaced by 254
NETMASK = This will always be 255.255.255.255 regardless of whatever subnet you have. This is because at OVH's network treats every IP as a single one even if it is part of /24 or whatever subnet.
HWADDR = This will be the virtual MAC of your VM's IP which you will generate through OVH manager.
IPADDR = You may use any IP from the subnet which you got allocated to your server for the purpose of creating VMs.
-------------------------
Virtualizor
-------------------------
Installing & configuring KVM with Virtualizor is very simple. It is my personal favorite to use with OVH servers as it provides it supports the out of way routed network configuration on OVH really well. Virtualizor have really improved in last year or so & number of VPS providers using it is increasing day by day.
Following partition scheme is recommended for your dedicated server:
If you did not create the volume group during Cent0S installtion from CD/ISO(or used a template with no options to install a volume group), you can do so by issuing 2 simple commands:
sdb3 represents the partition of the hard drive where you want to create the volume group & vg is the name of volume group
First of all, make sure that your eth0 interface file has following things present(usually it is not required to make any changes to it as everything required is already present in eth0 file after the OS is installed):
CTRL + X to save
Note:Replace the values in HWADDR with MAC address of the network interface you are using.
Open a Shell Terminal (e.g. PuTTY) and SSH to your server. Run the following commands:
email = The Admin Email Address
kernel = In this case its kvm
lvg = The Volume Group that will be used for the VPS storage e.g. defaults to vg. It should have some OR ALL unallocated space to create LVMs for the VPS.
That is it. Now virtualizor script will install everything needed including the bridge automatically
After installation is complete, reboot the server & once it is back up again login to Virtualizor admin panel at https://IPofyourserver:4085
In case you are using a network interface other than eth0 e.g. eth1 or eth2 etc then you need to change the change the settings from
Virtualizor Admin Panel -> Configuration -> General Settings -> Network Interface
After doing that, issue the following command(required only if you changed the network interface to something other than eth0
Then create an IP Pool with following parameters:
Name = Anything you wish
Gateway = 1.1.1.254
Netmask = 255.255.255.255
Nameserver 1 = 213.186.33.99
Nameserver 2 = 8.8.8.8
Note: Don't forget to check the routed network option. Add IPs one by one after generating their macs from OVH manager. If you wish to to use more than one IP in a VPS, set mac address of all secondary IPs same as the original IP of that particular VM. Configure other settings, download templates/ISOs through the template browser & then you can proceed with installing VMs.
--------------------------------------------------------------
SolusVM
--------------------------------------------------------------
With SolusVM, partition scheme should be same as what I described for Virtualizor & you need to configure your eth0 interface in the following way
And bridge should be configured as:
# nano /etc/sysconfig/network-scripts/ifcfg-br0
Restart the network network:
Install SolusVM master with no virtualization option using the following guide:
http://docs.solusvm.com/v2/Default.htm#Installation/Installing-Master.htm%3FTocPath%3DInstallation%7C_____4
Install SolusVM slave with no virtualization option using the following guide:
http://docs.solusvm.com/v2/Default.htm#Installation/Installing-Slave.htm%3FTocPath%3DInstallation%7C_____5
Reboot your system after installation
Now login to your SolusVM admin panel
IP blocks -----> List IP blocks -----> Add IPv4 block
For all your OS templates, choose NOT to configure networking automatically. This way, all your VMs will use DHCP & that is the only possible way to make OVH's recommended network settings work with SolusVM. Add IPs one by one after generating their macs from OVH manager.If you wish to to use more than one IP in a VPS, set mac address of all secondary IPs same as the original IP of that particular VM.
Note: If you wish to use IPv6 also with SolusVM, I have described it in detail in
That is it. I have tried to cover everything in this short tutorial yet if someone is not able to understand something, he can contact me.
Note: Special thanks to @MCH-Phil who has always been very encouraging & helpful to me in hosting related matters.
Following assumptions have been made to make it easy for you to understand:
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
CentOS = Operating System
Virtualizor or SolusVM = VPS control Panel
-----------------------------
When you receive your dedicated server, please install the OS(in this case CentOS) with native kernel of that OS. Never use OVH kernels as they do not support hypervisors well.
-----------------------------
First of all, please check for updates & install them
Code:
# yum update
After the update is complete, please reboot your system:
Code:
# reboot
General rule for network configuration within VMs:
If the main IPv4 address of your dedicated server is 1.1.1.1 then inside VMs:
Code:
# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=2.2.2.1
NETMASK=255.255.255.255
GATEWAY=1.1.1.254
HWADDR="00:19:BB:24:9F:89"
CTRL + X to save
GATEWAY = Main IP of your dedicated server but last octet will be replaced by 254
NETMASK = This will always be 255.255.255.255 regardless of whatever subnet you have. This is because at OVH's network treats every IP as a single one even if it is part of /24 or whatever subnet.
HWADDR = This will be the virtual MAC of your VM's IP which you will generate through OVH manager.
IPADDR = You may use any IP from the subnet which you got allocated to your server for the purpose of creating VMs.
-------------------------
Virtualizor
-------------------------
Installing & configuring KVM with Virtualizor is very simple. It is my personal favorite to use with OVH servers as it provides it supports the out of way routed network configuration on OVH really well. Virtualizor have really improved in last year or so & number of VPS providers using it is increasing day by day.
Following partition scheme is recommended for your dedicated server:
/ = 100 GB
SWAP = 8 GB
LVG = Rest of space
If you did not create the volume group during Cent0S installtion from CD/ISO(or used a template with no options to install a volume group), you can do so by issuing 2 simple commands:
Code:
# pvcreate /dev/sdb3
# vgcreate vg /dev/sdb3
sdb3 represents the partition of the hard drive where you want to create the volume group & vg is the name of volume group
First of all, make sure that your eth0 interface file has following things present(usually it is not required to make any changes to it as everything required is already present in eth0 file after the OS is installed):
Code:
# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="00:25:90:H3:7F:48"
IPADDR="1.1.1.1"
NETMASK="255.255.255.0"
GATEWAY="1.1.1.254"
IPV6INIT="yes"
ONBOOT="yes"
TYPE="Ethernet"
CTRL + X to save
Note:Replace the values in HWADDR with MAC address of the network interface you are using.
Open a Shell Terminal (e.g. PuTTY) and SSH to your server. Run the following commands:
Code:
# wget -N http://files.virtualizor.com/install.sh
# chmod 0755 install.sh
# ./install.sh [email protected] kernel=kvm lvg=VOLUME_GROUP_NAME
email = The Admin Email Address
kernel = In this case its kvm
lvg = The Volume Group that will be used for the VPS storage e.g. defaults to vg. It should have some OR ALL unallocated space to create LVMs for the VPS.
That is it. Now virtualizor script will install everything needed including the bridge automatically
After installation is complete, reboot the server & once it is back up again login to Virtualizor admin panel at https://IPofyourserver:4085
In case you are using a network interface other than eth0 e.g. eth1 or eth2 etc then you need to change the change the settings from
Virtualizor Admin Panel -> Configuration -> General Settings -> Network Interface
After doing that, issue the following command(required only if you changed the network interface to something other than eth0
Code:
# service virtnetwork restart
Then create an IP Pool with following parameters:
Name = Anything you wish
Gateway = 1.1.1.254
Netmask = 255.255.255.255
Nameserver 1 = 213.186.33.99
Nameserver 2 = 8.8.8.8
Note: Don't forget to check the routed network option. Add IPs one by one after generating their macs from OVH manager. If you wish to to use more than one IP in a VPS, set mac address of all secondary IPs same as the original IP of that particular VM. Configure other settings, download templates/ISOs through the template browser & then you can proceed with installing VMs.
--------------------------------------------------------------
SolusVM
--------------------------------------------------------------
With SolusVM, partition scheme should be same as what I described for Virtualizor & you need to configure your eth0 interface in the following way
Code:
# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
ONBOOT="yes"
BRIDGE="br0"
And bridge should be configured as:
# nano /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE="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"
Restart the network network:
Code:
# /etc/init.d/network restart
Install SolusVM master with no virtualization option using the following guide:
http://docs.solusvm.com/v2/Default.htm#Installation/Installing-Master.htm%3FTocPath%3DInstallation%7C_____4
Install SolusVM slave with no virtualization option using the following guide:
http://docs.solusvm.com/v2/Default.htm#Installation/Installing-Slave.htm%3FTocPath%3DInstallation%7C_____5
Reboot your system after installation
Now login to your SolusVM admin panel
IP blocks -----> List IP blocks -----> Add IPv4 block
Block Name: Whatever you wish
Gateway: 1.1.1.254
Netmask: 255.255.255.255
Nameserver: 213.186.33.99
For all your OS templates, choose NOT to configure networking automatically. This way, all your VMs will use DHCP & that is the only possible way to make OVH's recommended network settings work with SolusVM. Add IPs one by one after generating their macs from OVH manager.If you wish to to use more than one IP in a VPS, set mac address of all secondary IPs same as the original IP of that particular VM.
Note: If you wish to use IPv6 also with SolusVM, I have described it in detail in
That is it. I have tried to cover everything in this short tutorial yet if someone is not able to understand something, he can contact me.
Last edited by a moderator: