Howdy, Stranger!

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


Installing & configuring KVM on OVH with 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.

Installing & configuring KVM on OVH with SolusVM

Shoaib_AShoaib_A Member
edited August 2014 in Tutorials

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:

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

First of all, we should update our OS with following command using SSH:

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

     NETWORKING_IPV6=yes
     IPV6FORWARDING=yes

Once done, type Ctrl + X, select YES & Enter

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 consult http://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:

     DEVICE="eth0"
     ONBOOT="yes"
     BRIDGE="br0"

Once done, type Ctrl + X, select YES & Enter

Now we have to edit the br0 interface:

# 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"
 IPV6_AUTOCONF="no"
 IPV6ADDR="2001:41d0:a:abcd::1/64"
 ARPCHECK="no"

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 set 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

DEVICE="br0:0"
BOOTPROTO="static"
IPADDR="2.2.2.31"
NETMASK="255.255.255.224"
ONBOOT="yes"

Save & Enter

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

2001:41d0:a:abff:ff:ff:ff:ff dev br0
default via 2001:41d0:a:abff:ff:ff:ff:ff

Save & Enter

Next is configuring eth1 interface which is for our /27 Subnet:

# nano /etc/sysconfig/network-scripts/ifcfg-eth1

    DEVICE=eth1
    HWADDR=00:25:90:D3:7F:31
    TYPE=Ethernet
    UUID=21a4afc3-e2fe-405e-acd3-e16fec816ba1
    ONBOOT=no
    NM_CONTROLLED=yes
    BOOTPROTO=dhcp

Note: Replace HWADDR & UUID with that of your server

Save & enter

Make sure IPv4 & IPv6 forwarding is enabled:

# nano /etc/sysctl.conf

net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding= 1
net.ipv6.conf.br0.forwarding = 1
net.ipv6.conf.default.forwarding = 1

Save & Enter

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

Block Name: Whatever you wish

Gateway: 2.2.2.31

Netmask: 255.255.255.224

Nameserver: 213.186.33.99

Save

IP blocks -----> List IP blocks -----> Add IPv6 block

Block Name: Whatever you wish

Gateway: 2001:41d0:000a:abff:00ff:00ff:00ff:00ff

Nameserver: 2001:41d0:3:163::1

Note: IPv6 gateway here should be in full notation

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.

«1

Comments

  • SadySady Member

    Thank you so much for the guide.

    I have wasted a couple of hours in set upping Proxmox on OVH & at last i simply virtualized that server with OpenVZ SolusVM & got rid of that :D

    Thanked by 1Shoaib_A
  • Really Nice Tutorial! good job will help a lot of people set up solusvm on OVH's Dedicated Servers

    Thanked by 1Shoaib_A
  • headache. thanks anyway

  • Thanks for the great guide! Any chance you would be able to do a similar guide for Debian-based systems? Currently trying to muddle my way through getting a Windows KVM to have a public IP using the single extra failover IP I have ordered. Trying to understand the br0, br0:0, and eth1 setup.

  • Shoaib_AShoaib_A Member
    edited October 2014

    @rmbell said:
    Thanks for the great guide! Any chance you would be able to do a similar guide for Debian-based systems? Currently trying to muddle my way through getting a Windows KVM to have a public IP using the single extra failover IP I have ordered. Trying to understand the br0, br0:0, and eth1 setup.

    In that case you have to use OVH recommended settings:

    1. Don't setup br0:0 & ignore eth1.

    2. In your VMs 255.255.255.255 as Netmask & your server IP ending in 254 as gateway. For example, if main IP of your server is 1.1.1.X, you will use 1.1.1.254 as gateway in all your VMs. Normally it will be auto discovered if you are using DHCP

    3 . You can configure br0 in debian like this:

    iface br0 inet static
    address x.x.x.x
    netmask 255.255.255.0
    gateway x.x.x.254
    bridge_ports eth0
    bridge_stp off
    auto br0

    after that just /etc/init.d/networking stop && /etc/init.d/networking start

    Oh & don't forget to generate vMAC from OVH Manager & use that in your VM.

    Thanked by 1rmbell
  • I am currently using an ovh server with as a kvm solusvm host node, and it appears that the IPs routed to my ovh server are not configured correctly within solusvm. I currently have 2 /29s routed to my kvm solusvm host node.

    When I add these 2 /29s into solusvm do I use my main host node's IP address with the .254 at the end, or do I use the first IP address of each /29 with .254 at the end?

  • smansman Member
    edited January 2015

    One thing I would add is renaming the lvm volume md device. Otherwise it defaults to md127 after it's created and then you reboot because there is no entry automatically created in /etc/mdadmin.conf for some reason.

    You can leave it at md127 but some people might want to keep things consistent with non lvm/kvm servers and name it md2 for example.

    http://superuser.com/questions/346719/how-to-change-the-name-of-an-md-device-mdadm

    This is assuming you are using software RAID of course which you most definitely should be at a minimum. Not sure how this would all work with OVH servers since I don't use them.

  • conlustroconlustro Member
    edited January 2015

    Hi sman, your not saying that IP routing has anything to do with the lv name are you?

  • smansman Member
    edited January 2015

    @conlustro said:
    Hi sman, your not saying that IP routing has anything to do with the lv name are you?

    It has to do with RAID partitioning. Nothing to do with networking.

  • smansman Member
    edited January 2015

    Also the PE Size should be set to 32M not the default of 4M when creating the volume. Again not sure how HD formatting works with the OVH service. I do everything from bare metal.

  • WebProjectWebProject Host Rep, Veteran
    edited January 2015

    sman said: Again not sure how HD formatting works with the OVH service

    simply remove volume groupe and recreate (example):
    vgcreate -s32 vps /dev/md4

  • Please refer to the following tutorial as it is according to the recommended configuration of OVH :

    http://lowendtalk.com/discussion/36845/kvm-on-ovh-sys-using-recommended-configuration-with-virtualizor-solusvm#latest

  • Thanks for the tutorial,

    how can i know my mac address ?

    can you please explain more

  • MikePTMikePT Moderator, Patron Provider, Veteran

    @StackVPS said:
    Thanks for the tutorial,

    how can i know my mac address ?

    can you please explain more

    It's in the OVH panel, at the IP list.

  • RizRiz Member

    @StackVPS said:
    Thanks for the tutorial,

    how can i know my mac address ?

    can you please explain more

    Uh oh.

  • @MrGeneral said:

    @StackVPS said:
    Thanks for the tutorial,

    how can i know my mac address ?

    can you please explain more

    It's in the OVH panel, at the IP list.

    Do you have any idea about partitioning a node to meet centos kvm host requirements ?

    Thank you

  • @StackVPS said:
    Do you have any idea about partitioning a node to meet centos kvm host requirements ?

    Thank you

    Another plan to scam more victims? For goodness sake this brand is old, why don't you start another brand and continue scamming? (just saying)

  • WebProjectWebProject Host Rep, Veteran

    @StackVPS said:

    @MrGeneral said:

    @StackVPS said:
    Thanks for the tutorial,

    how can i know my mac address ?

    can you please explain more

    It's in the OVH panel, at the IP list.

    Do you have any idea about partitioning a node to meet centos kvm host requirements ?

    Thank you

    have you tried to read the following tutorials? as it's clearly stated all information
    https://documentation.solusvm.com/display/DOCS/Installation

  • pbgbenpbgben Member, Host Rep
    edited June 2016

    Ahhhand whelcome to yet another summer host, this one is different, though... we have a special for you here, an exclusive if you will! because this aint their first rodeo! Prepare for some ludiculose pricing strategies in the next few week followed by yet another crash and burn. keep ya eyes peeled, and watch out for those STD's (Summer Time Deadpools). Tune in next time for some more fun!

    Thanked by 1WebProject
  • Shoaib_AShoaib_A Member
    edited June 2016

    @StackVPS said:
    Thanks for the tutorial,

    how can i know my mac address ?

    can you please explain more

    There have been a lot of improvements in SolusVM since the time I posted this tutorial one of which is support for routed networking (it was implemented earlier this year AFAIK). What you have to do is setting

    ovh_bridged_network_routes = true in usr/local/solusvm/data/config.ini

    Then you can determine the gateway for your IPs as

    Suppose the failover IP is : 12.34.56.78

    Gateway will be failover IP but with last octet .254

    Gateway for IP 12.34.56.78 will be = 12.34.56.254

    If you follow the above method, netmask for each of your failover IP will always be 255.255.255.255

    It has also been explained in this OVH guide

    You have to generate MAC addresses from OVH manager in the IPs section for your dedicated server.

    The above method which I have explained as one of the easiest ones for configuration of OVH failover IPs with SolusVM.

    Alternatively you can use the conventional bridge setup (explained in detail in SolusVM documentation & countless other places online) which is also easy but not recommended by OVH unless you are using either their vRack or Dedicated Cloud. In the past like 2 or 3 years ago OVH used to suspend the IPs for generating too many arp packets if conventional bridge method was used but lately I have not read or heard any such thing.

    You should contact SolusVM support in case of any difficulty. If you are not able to grasp any of the techniques to set bridge then go with Virtualizor as it sets up bridge automatically during installation.

    Thanked by 1StackVPS
  • @WebProject said:

    @StackVPS said:

    @MrGeneral said:

    @StackVPS said:
    Thanks for the tutorial,

    how can i know my mac address ?

    can you please explain more

    It's in the OVH panel, at the IP list.

    Do you have any idea about partitioning a node to meet centos kvm host requirements ?

    Thank you

    have you tried to read the following tutorials? as it's clearly stated all information
    https://documentation.solusvm.com/display/DOCS/Installation

    My Dc refuses to help me with partitioning my new server i want it for a shared hosting .. etc and i can see kvm host with centos 7 + cloudlinux can do the job well .

    My new server has theses specs:

    Dual Xeon E5-2670
    2.66Ghz / 3.3Ghz Turbo
    16 Cores / 32 Threads
    32GB DDR3 ECC RAM
    240GB SSD Drive
    10Gb Port - 33TB Transfer per Month
    Linux OS (Windows available)
    5 Usable IPv4 IP Address
    /64 IPv6 Address Block

    and i want already to install solusvm on it :

    they need a special partitions for kvm:

    KVM Host

    / 80GB+ (KVM templates & iso's will be stored in /home/solusvm/kvm)

    SWAP 4GB+ (Virtual servers may use host swap if there is a real memory shortage)
    Logical Volume Group (LVM) remaining space (Logical Volume Group Only, SolusVM will create the logical volumes for the virtual servers inside this group)

    I have followed alot of tutorials with parted and mkfs + fdisk and rescuesyscd but i have failed in partitioning my server right . this is my first experience with kvm host.

    If you have a good tutorial for this purpose i will appreciate it

  • @theroyalstudent said:

    @StackVPS said:
    Do you have any idea about partitioning a node to meet centos kvm host requirements ?

    Thank you

    Another plan to scam more victims? For goodness sake this brand is old, why don't you start another brand and continue scamming? (just saying)

    Which plan .. explain more ? and what scam are you talking about ..

  • MikeAMikeA Member, Patron Provider

    @pbgben said:
    Ahhhand whelcome to yet another summer host, this one is different, though... we have a special for you here, an exclusive if you will! because this aint their first rodeo! Prepare for some ludiculose pricing strategies in the next few week followed by yet another crash and burn. keep ya eyes peeled, and watch out for those STD's (Summer Time Deadpools). Tune in next time for some more fun!

    I don't mean to be rude, to your rude statement, but aren't you a summerhost yourself?

  • Shoaib_AShoaib_A Member
    edited June 2016

    @StackVPS said:
    My Dc refuses to help me with partitioning my new server i want it for a shared hosting .. etc and i can see kvm host with centos 7 + cloudlinux can do the job well .

    My new server has theses specs:

    Dual Xeon E5-2670
    2.66Ghz / 3.3Ghz Turbo
    16 Cores / 32 Threads
    32GB DDR3 ECC RAM
    240GB SSD Drive
    10Gb Port - 33TB Transfer per Month
    Linux OS (Windows available)
    5 Usable IPv4 IP Address
    /64 IPv6 Address Block

    and i want already to install solusvm on it :

    they need a special partitions for kvm:

    KVM Host

    / 80GB+ (KVM templates & iso's will be stored in /home/solusvm/kvm)

    SWAP 4GB+ (Virtual servers may use host swap if there is a real memory shortage)
    Logical Volume Group (LVM) remaining space (Logical Volume Group Only, SolusVM will create the logical volumes for the virtual servers inside this group)

    I have followed alot of tutorials with parted and mkfs + fdisk and rescuesyscd but i have failed in partitioning my server right . this is my first experience with kvm host.

    If you have a good tutorial for this purpose i will appreciate it

    Why don't you use IPMI/KVMoverIP to install the OS by using an ISO image?

  • @Shoaib_A said:

    @StackVPS said:
    My Dc refuses to help me with partitioning my new server i want it for a shared hosting .. etc and i can see kvm host with centos 7 + cloudlinux can do the job well .

    Why don't you use IPMI or KVMoverIP to install the OS by using an ISO image?

    Hi sohaib,

    I have a new preconfigured server from whosaleinternet

    they don't offer ipmi or kvm for this server but they have sysresccd and i have got some tutorials of how partitioning the server but it's not clear for kvm requirements so i reloaded again my os with centos 7

    If you could help me with that i appreciate it

  • century1stopcentury1stop Member
    edited June 2016

    @StackVPS you'll just need this

    /root 80gb
    /swap 4gb or more as you require
    /LVM balance disk space
    (you'll need to take RAID into consideration as well)
    

    your host refuse to partition? is it a pre-configured server?

    Thanked by 1StackVPS
  • @century1stop said:
    @StackVPS you'll just need this

    > /root 80gb
    > /swap 4gb or more as you require
    > /LVM balance disk space
    > (you'll need to take RAID into consideration as well)
    > 

    your host refuse to partition? is it a pre-configured server?

    It's a pre-configured server

    But my DC told m i can partition my server with parted or f -disk with sysresccd

    do you have any idea ?

  • century1stopcentury1stop Member
    edited June 2016

    @StackVPS I believe there's a tutorial here for it

    EDIT: oops, no tutorial but yes, you can do it with fdisk system rescue

    Thanked by 1StackVPS
  • @century1stop said:
    @StackVPS I believe there's a tutorial here for it

    EDIT: oops, no tutorial but yes, you can do it with fdisk system rescue

    This is why i have reloaded my system again .

    I will try a trick hope it works

  • @StackVPS yup, best part with self reinstall :)

Sign In or Register to comment.