Install Proxmox 4.2 VE on a Hetzner server
Step 1 - Installimage
After you get the credentials to your new Hetzner server, you start by logging in to your server using rescue mode.The rescue mode allows you to boot install an Operating systems or Proxmox on top of Debian 8. Once you login to rescue mode with the credentials provided you simply run the command
root@rescue ~ # installimage
You will see the follwoing screen appearStep 2 -Configure Installation
The installation will then begin and you should see something like the following
Step 3: Configure Networking
In order to be able to create virtual machines using Proxmox, we need to have additional IP addresses. For this purpose I will show you how to configure your machine by having only one static IP address from Hetzner including an additional subnet (in my case /28). Below is an example screenshot of the server panel @ Hetzner:Since we are doing a routed setup, you must enabled IP forwarding by running the following commands:
1
2 |
sysctl -w net.ipv4.ip_forward=1 sysctl -w net.ipv6.conf.all.forwarding=1 |
Attention-with proxmox version 4.3 i also ha to make the follwoing modification to he file /etc/sysctl.d/99-hetzner.conf
# sysctl config
net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
# ipv6 settings (no autoconfiguration)
net.ipv6.conf.default.autoconf=0
Now keeping this in mind we need to configure the server network interface settings. To do this, login back as root to the server and edit /etc/network/interfaces.
1 |
vi /etc/network/interfaces |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 |
# Loopback device: auto lo iface lo inet loopback # device: eth0 auto eth0 iface eth0 inet static address 136.243.110.154 netmask 255.255.255.192 gateway 136.243.110.129 # default route to access subnet up route add -net 136.243.110.128 netmask 255.255.255.192 gw 136.243.110.129 eth0 iface eth0 inet6 static address 2a01:4f8:181:1123::2 netmask 64 gateway fe80::1 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 |
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 136.243.110.154 #our main ip address netmask 255.255.255.255 #we just need the one IP pointopoint 136.243.110.129 #more: http://goo.gl/jGVrO4 gateway 136.243.110.129 iface eth0 inet6 static address 2a01:4f8:181:1123::2 netmask 128 gateway fe80::1 up sysctl -p # Configuration so that our subnet is available for use: auto vmbr1 iface vmbr1 inet static address 136.243.179.113 #Add ANY ip address of the subnet netmask 255.255.255.240 #This is the netmask of that particular subnet bridge_ports none #bridge settings bridge_stp off bridge_fd 0 |
Step 4: Proxmox web interface and our first container
The Proxmox installation comes with a web interface from where you can manage your containers. You can login to the web interface on port 8006 in our case: https://136.243.110.154:8006/Before you can create your first container you need to download some OS templates. To do this:
- Click on the “local” icon in the left sidebar
- Click on “Templates” in the top tab
- Select the OS images you want to download (for our example, we will download Ubuntu 14)
After you’ve done this, you can click on “Create CT” in the top right corner of Proxmox and it will present you with a dialog for creating your first LXC container.
The first step will look something like this:
The most crucial part is the network step:
You must set the gateway as the gateway IP address we used in the network configuration. It’s also different from the previous version of Proxmox as you have to add /32 as a subnet mask on the IPv4, as to let Proxmox know how many IP’s you are attaching to the virtual machine.
Once you do this, you can start your VM and it should be accessible from the web!
I did not test/configure IPv6 for this tutorial, but if this helped you can also have a look at an older tutorial done by Hetzner for Proxmox v3.x (Thx to Mawan for his intro to Proxmox).