Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


KVM on OVH/SYS using recommended configuration with Virtualizor & SolusVM
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

KVM on OVH/SYS using recommended configuration with Virtualizor & SolusVM

Shoaib_AShoaib_A Member
edited November 2014 in Tutorials

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 @MCHPhil 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

# yum update

After the update is complete, please reboot your system:

# 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:

# 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:

# 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):

# 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:

# 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

# 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

# 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:

# /etc/init.d/network restart

Install SolusVM master with no virtualization option using the following guide:
http://docs.solusvm.com/v2/Default.h...ation|_____4

Install SolusVM slave with no virtualization option using the following guide:
http://docs.solusvm.com/v2/Default.h...ation|_____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 my previous tutorial here

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.

Comments

  • edanedan Member
    edited November 2014

    Nice tuts,

    Make sure the dhcp on the host node running properly, sometimes the dhcp conflict with the dnsmasq and the dhcpd won't start.

    Thanked by 1Shoaib_A
  • This works. I'm happy with the assistance provided by Voltron through live Skype chat. He is a friendly person who'll go through all the steps one by one till I get it right..

    Thanks bro.

    Thanked by 1Shoaib_A
  • Since this thread has already been bumped, I would like to add that as now Virtualizor supports QCOW2 & RAW storage, you do not need to give details of storage in command line at the time of installation. You can efficiently add LV or file storage(QCOW2 or RAW) after installation of virtualizor. A demonstration of this has been given here by the Virtualizor team.

  • AICAIC Member

    @fametel Thanks for sharing the details you are the best as always. keep the good work going. .

    Thanked by 1Shoaib_A
  • Thanks for great tutorial :)

    Thanked by 1Shoaib_A
Sign In or Register to comment.