This project started after I wanted to move my home server to a dedicated machine in a data center. After some research i decided to make use of Soyoustart (OVH) to get a personal server with a raid 1 setup. I expected to install KVM and make use of a bridge to share the network connection with the virtual machines. After a couple of hours trying to make it work I began to try different solutions.
Git repo: https://github.com/GeekintheMiddle/svp
Programming Language: Python
Operating system: Debian/Ubuntu
The problem started with the way OVH binds the IPs to MAC addresses. It only excepts traffic if the interface is running under a specific MAC address. This creates a problem with the network bridge. The solution I came up with is to make use of a Macvtap interface. This will inject traffic directly to the main network interface of the virtual host and allows you to specify a MAC address. The SVP program is able to start a Macvtap interface and connect this to a KVM virtual machine.
Follow the installation instructions on the Github page.
After the server booted there is a specific network configuration that needs to be configured. The interfaces file will look like this.
iface ens3 inet static
post-up route add 188.8.131.52 dev ens3
post-up route add default gw 184.108.40.206
pre-down route del 220.127.116.11 dev ens3
pre-down route del default gw 18.104.22.168
- ens3 is the first network interface of the virtual machine.
- The ip address of the virtual machine is 22.214.171.124.
- As default gateway we will use the default gateway of the virtual host. In this case 126.96.36.199.
The script is simple and is an easy and quick solution to setup Linux virtual servers on the OVH network.