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

Discussion in 'Tutorials and Guides' started by Shoaib_A, Oct 31, 2014.

  1. Shoaib_A

    Shoaib_A Member

    Dec 15, 2013
    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


    # 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 then inside VMs:


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



    CTRL + X to save


    GATEWAY = Main IP of your dedicated server but last octet will be replaced by 254

    NETMASK = This will always be 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.





    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:


    # 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


    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 =

    Netmask =

    Nameserver 1 =

    Nameserver 2 =


    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.






    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


    And bridge should be configured as:


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




    Restart the network network:


    # /etc/init.d/network restart

    Install SolusVM master with no virtualization option using the following guide:



    Install SolusVM slave with no virtualization option using the following guide:



    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.
    Last edited by a moderator: Nov 19, 2014
    centoslgd, jameshsi, MCH-Phil and 2 others like this.
  2. libro22

    libro22 Member

    May 16, 2013
    Well this answers my concern on whether to use LV or disk image on KVM guests, nice tutorial by the way :)

    Is it possible to install virtualizor on nodes with existing guests already or is it advisable to begin from scratch?
  3. Shoaib_A

    Shoaib_A Member

    Dec 15, 2013
    Both Virtualizor & SolusVM create LV's themselves at time of VPS creation, you just need to create LVG/. I had started with scratch but if you contact Virtualizor support, they might have some script for you in order to migrate from another control panel( or even if you created it manually with virsh ).
    Last edited by a moderator: Nov 1, 2014
  4. eva2000

    eva2000 Active Member

    May 22, 2013
    @ curious any differences to above steps for just OVH/SYS + Virtualizor without SolusVM ? Also for root / partition sizing, how much space does a default install of CentOS/Virtualizor actually use and how much disk space free based on 100GB / ? I ask I going to try with with my SoYouStart server and only have 3x120GB SSDs, so of course root / partition size needs adjusting for my disk capacity available. Just a test server to play with Virtualizor + KVM

    Only plan for using CentOS 6.6, CentOS 7.0 and Debian latest ISOs

    Last edited by a moderator: Nov 16, 2014
  5. jameshsi

    jameshsi New Member

    Nov 16, 2014

    Nice article, I follow all instructions here, and still when I create a new vm in solusvm, I need to follow the OVH documentation says, to add a route-eth0 in the Linux VM, I don't quite sure what else should I do before it will be automatically connect to Internet after vm created.
  6. Shoaib_A

    Shoaib_A Member

    Dec 15, 2013
    Partition / saves your ISOs & templates, Virtualizor templates are much bigger in size than SolusVM(1+ GB compared to 200-400 Mb to SolusVM 2nd generation templates). 100 GB is recommended but if you feel you can save all your templates/ISOs in 40 or 50 GB then it should be fine. I have / partition's size set to 50 GB in one of my servers which I use for testing. Since you want to use a handful of templates only, even less than 50 GB would do :)
  7. Shoaib_A

    Shoaib_A Member

    Dec 15, 2013
    Make sure dhcp server is running on your server & you do not check "configure networking" with your templates. If you still face problems after doing that, you can contact me on skype(can be found in profile on the forum) & I will help you to the best of my abilities.
  8. centoslgd

    centoslgd New Member

    Oct 17, 2014
    Thanks for your valuable help with correct network configuration with vps on my ovh dedicated server. I request admins to include it in library to save others from the headache which I had to go through in order to find a nice tutorial for ovh network configuration. I contacted ovh support multiple times in last 3 days but all they did was redirecting me to their guides which didn't help much. I found this tutorial which helped but I had a couple of questions which the OP answered over skype & now vps on my ovh server are working perfectly :)