OVH Dedicated/VPS Custom Installation

From Wiki³
IconUNDER CONSTRUCTION: The document is currently being modified!

Icon Introduction

I have personally been using OVH for my hosting for some time now. While they are not necessarily known for their stellar support, if you know what you are doing you can accomplish a lot with OVH. One of the cheaper options at OVH, if you cannot afford or do not need an entire dedicated server all to yourself, is the OVH VPS SSD. With the lowest tier offering starting at around $4USD a month, they are very affordable to grab one to play around with for a bit. So for the sake of science, I purchased one of the first tier (VPS SSD 1) and gave it a go. This is what followed, a complete re-installation of the OS.

IconYou can find a detailed comparison of a few VPS providers including OVH here

Icon OVH Terms & Conditions

After looking through their terms and conditions for the VPS only two things jump out at me in particular.

"OVH reserves the right to limit, filter, suspend or restrict features and protocols (such as IRC or peer to peer file sharing) of the Virtual Private Server to ensure the security of their infrastructure."

This doesn't seem too bad. From the sound of it, if you cripple their network running IRC or p2p based things they reserve the right to firewall you. I can understand that, not like you want to attract script kiddies and DDoS.

"OVH will guarantee a bandwidth of up to 100 Mbps (one hundred megabits per second) as long as the traffic of the bandwidth does not exceed the pre-defined set monthly volume of 10TB (ten terabytes). This monthly volume includes both internal OVH traffic and traffic outside of the OVH network. When the monthly traffic volume exceeds the set monthly volume, the bandwidth of the Virtual Private Server will be limited to 1 Mbps until the next monthly renewal date."

If the monthly transfer limit was not so high I would say this would be a serious deal-breaker. However, given most months I have a hard time hitting even 1TB on my dedicated server I have from them, I do not think this is as serious as it looks unless your planning to run some seriously bandwidth intense tasks.

Icon Setup Time

Setup time for the VPS was not bad but not amazing either. I would say about average for OVH (don't let their 120s activate images on the website fool you).

  • Ordered: Mon, Jul 24, 2017 at 5:37 PM
  • Received: Mon, Jul 24, 2017 at 5:48 PM

Icon VPS Information

Before I scrapped their installation of Arch Linux I took a look around at the VPS installation a bit.

# dmidecode -s system-product-name && dmidecode -s chassis-manufacturer


OpenStack Nova
QEMU

This was a nice surprise, good on them for using OpenStack.

# uname -a


Linux XXX.vps.ovh.ca 4.11.9-1-ARCH #1 SMP PREEMPT Wed Jul 5 18:23:08 CEST 2017 x86_64 GNU/Linux

Doesn't get any more current than that for an Arch install as that is the current kernel as of writing this.

# cat /boot/grub/grub.cfg | grep vmlinuz


linux/boot/vmlinuz-linux root=UUID=52d0c25c-2e4e-473b-81eb-56b46711a793 rw console=tty0 console=ttyS0,115200 quiet

Looks like extra entries to the kernel options on boot, if I had to guess I would say it is probably for the included KVM support. Making a note of this for later.

# cat /etc/systemd/network/eth0-dhcp.network


[Match]
Name=eth0

[Network]
DHCP=yes

[DHCP]
UseMTU=true

This is a nice change from the sometimes complicated network configuration of my dedicated. Nice and simple.

For pure curiosity I took a look at how far away I was in the datacenter from my dedicated server.

# ping dark.kyau.net


PING dark.kyau.net (198.245.62.167) 56(84) bytes of data.
64 bytes from dark.kyau.net (198.245.62.167): icmp_seq=1 ttl=58 time=0.490 ms
64 bytes from dark.kyau.net (198.245.62.167): icmp_seq=2 ttl=58 time=0.668 ms
64 bytes from dark.kyau.net (198.245.62.167): icmp_seq=3 ttl=58 time=0.700 ms
64 bytes from dark.kyau.net (198.245.62.167): icmp_seq=4 ttl=58 time=0.658 ms
--- dark.kyau.net ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3032ms
rtt min/avg/max/mdev = 0.490/0.629/0.700/0.081 ms

Icon Pre-Installation

First in order to install Arch Linux from scratch we need to get the VPS net-booted into the OVH Rescue Mode.

Icon Rescue Mode

Enter the OVH Control Panel and select the VPS on the left. There should be a series of buttons on the right side of the screen, one named "Rescue mode". This process will take a few minutes in order to reboot the VPS into rescue mode, the progress of this should be shown in the dashboard. The login details for rescue mode will be emailed to the email address on file with OVH.

IconThis is one of the things I personally hate about OVH, the emailing of login details to the users. There are a lot more secure ways of going about this.

Once the machine has been restarted into rescue mode and login information has been obtained, login over ssh. These additional command line options here will make it so it does not record the hostkey (given that this is about to change once Arch is installed).

# ssh -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no root@X.X.X.X

Once logged in, take note of the Debian environment. First update the package registry.

# apt-get update

Then install the necessary package we will need for the Arch installation.

# apt-get install gdisk

Icon Partitioning

Pull up a list of all of the disks in the system.

# lsblk

You should see the rescue disk mounted and your system disk then mounted into a directory inside of /mnt. The only one we care about is the one mounted inside /mnt. Un-mount this partition.

# unmount /mnt/vdX1

Take a look at the current partition table.

# sgdisk -p /dev/vdX

The default OVH Arch Linux Installation uses an MBR single partition table.

Wipe the current partition scheme and create a new GPT partition table with protected MBR.

# sgdisk -Z -o /dev/vdX

Then create the partition table for the disk. create a single full disk partition, set the type to Linux, set the legacy boot flag and finally give it a nice label.

# sgdisk -n 1:0:-0 -t 1:8300 -A 1:set:2 -c 1:"Arch Linux" /dev/vdX

Icon Formatting

Format the root filesystem.

# mkfs.ext4 /dev/vdX1

Be sure to select Y to overwrite the current partition.

Icon Installation

Now that the disk is setup, mount the partition.

# mount /dev/vdX1 /mnt