Hetzner EQ8 with Proxmox (OpenVZ + KVM)

rahulan

Renowned Member
Nov 18, 2008
9
0
66
Hi,
got a new server from Hetzner, with 32 IPs for VPSes.
followed Ellen's guide to install Proxmox. (Guide)
Host is running fine,

I'm struck at assigning IPs to openvz / KVM guest machines.
could you guys please Help me to get this server running.

Hetzner Provided me the following details.

Host IP-Adresse: 88.198.57.68

Additional IPs
IP: 46.4.192.224 /27
Mask: 255.255.255.224
Broadcast: 46.4.192.255


Useable IP addresses:
46.4.192.225 to 46.4.192.254
__________

My Host IP setup

Code:
# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address  88.198.57.68
    broadcast  88.198.57.95
    netmask  255.255.255.255
    gateway  88.198.57.65
    post-up echo 1 > /proc/sys/net/ipv6/conf/eth0/proxy_ndp
    post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward

auto vmbr0
iface vmbr0 inet static
    address  88.198.57.68
    broadcast  88.198.57.95
    netmask  255.255.255.255
    bridge_ports none
    bridge_stp off
    bridge_fd 0
My sysctl.conf

Code:
### Hetzner Online AG installimage
# sysctl config
#net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
net.ipv4.conf.default.proxy_arp = 1
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0


could you guys please advise me what is the config for openvz guest?
also i've got some KVMs to run. more and more I read the posts on ellen's guide I get more confused.

Please help me to setup this server.

thank you

Rahulan.
 
Thats great threat i was going to open one for myself also. I am having TOTTALY same problem as you..

I am going to keep following your threat
 
Even due to the crappy vlan configuration at Hetzner there is a more or less painless setup which is working both on OpenVZ and KVM.

Setup a new network device on the host with one of your additional subnet ips, eg. vmbr1 as devicename and the last but one IP from your subnet as address. Point the vmbr1 gateway to eth0/servers main ip and use it as gateway in your VM's.

When creating a OpenVZ VM you can just use the desired ip from the subnet.
When creating a KVM just use vmbr1 as bridge on creation and use the vmbr1 address as gateway while configuring the network.

With this setup you may waste a ip as gateway, but you have a hasslefree workflow.
 
Hi skoop,

Thanks for your help.
could you please have a look on my config. My KVMs still can't access to the internet.
OpenVZs are working great with this onfig.

Host setup

Code:
# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  88.198.57.68
        netmask  255.255.255.224
        gateway  88.198.57.65
        broadcast  88.198.57.95

auto vmbr0
iface vmbr0 inet static
        address  46.4.192.225
        netmask  255.255.255.224
        gateway  88.198.57.68
        bridge_ports none
        bridge_stp off
        bridge_fd 0

auto vmbr1
iface vmbr1 inet static
        address  46.4.192.254 ( last IP of my subnet)
        netmask  255.255.255.224 (got 32 IPs )
        gateway  88.198.57.68 (eth0 main IP)
        bridge_ports none
        bridge_stp off
        bridge_fd 0

up ip route add 46.4.192.245/27 dev vmbr1
up ip route add 46.4.192.246/27 dev vmbr1
up ip route add 46.4.192.247/27 dev vmbr1
KVM Guest

Code:
auto eth0
iface eth0 inet static
        address  46.4.192.245 (one of the additional IP)
        netmask  255.255.255.224
        gateway  46.4.192.254 (IP address of the vmbr1)
        broadcast  88.198.57.95
What am i doing wrong?
Please help me.

Thank you.
rahulan
 
The following should work better:

Code:
# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  88.198.57.68
        netmask  255.255.255.2[B]55[/B] <-
        gateway  88.198.57.65
        broadcast  88.198.57.95
       [B]pointopoint 88.198.57.65[/B] <-

auto vmbr0
iface vmbr0 inet static
        address  46.4.192.225
        netmask  255.255.255.224
        gateway  88.198.57.68
        bridge_ports none
        bridge_stp off
        bridge_fd 0

auto vmbr1
iface vmbr1 inet static
        address  46.4.192.25[B]3[/B] ( last IP of my subnet)   <-
        netmask  255.255.255.224 (got 32 IPs )
        gateway  88.198.57.68 (eth0 main IP)
        bridge_ports none
        bridge_stp off
        bridge_fd 0
 
Hi Skoop,

Thanks for support.
after I made the changes, I lost the connection to the host.
are you sure the netmask of eth0
255.255.255.255
Hetzner provide me the following
255.255.255.224

do u want me to add or omit the following
up ip route add 46.4.192.245/27 dev vmbr1
up ip route add 46.4.192.246/27 dev vmbr1

and one more thing
could you please tell me how the KVM guest config look like.

Thank you.
Rahulan
 
I hope it's okay to push this thread, as I have a similar problem.

I too am trying to set up a network interface for a Proxmox VM and have been trying to follow several guides, few of whom make sense and some that are contradictory. The clearest howto I've found so far is this one. ^^

I'll try to give you as much details as possible. My hosting provider is Hetzner. The Proxmox host has the IP 187.39.42.199 and I've got four additional IPs one of which - 187.39.42.217 - I want to use for the the VM.

BTW: I've changed the IP addresses as I don't want to give them away on a public forum. However, the last triplet of the addresses given here are the same ones as in my setup, so I suppose that everything should be applicable to my real-life scenario.

The initial version of /etc/network/interfaces provided by Hetzner looks like this:
Code:
### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  address   187.39.42.199
  broadcast 187.39.42.255
  netmask   255.255.255.192
  gateway   187.39.42.193

# default route to access subnet
up route add -net 187.39.42.192 netmask 255.255.255.192 gw 187.39.42.193 eth0
After some vain experiments the current version of the file now looks like this:
Code:
### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  address   187.39.42.199
  broadcast 187.39.42.255
  netmask   255.255.255.192
  gateway   187.39.42.193

# vmbr0 - needed by Proxmox
auto vmbr0
iface vmbr0 inet static
    address   187.39.42.217
    netmask   187.39.42.255
    gateway   187.39.42.199
    bridge_ports none
    bridge_stp off
    bridge_fd 0

# default route to access subnet
up route add -net 187.39.42.192 netmask 255.255.255.192 gw 187.39.42.193 eth0
I.e. the only thing that's changed at the moment is the addition of the vmbr0 interface. I'm at a loss right now and after some reading of manpages and articles about how subnets work, I think I've got a somewhat better understanding of the way it should work but I feel even more confused in dealing with this particular case.

Maybe someone will be able to point me in the right direction. :)

TIA!

joran
 
I hope it's okay to push this thread, as I have a similar problem.

I too am trying to set up a network interface for a Proxmox VM and have been trying to follow several guides, few of whom make sense and some that are contradictory. The clearest howto I've found so far is this one. ^^

I'll try to give you as much details as possible. My hosting provider is Hetzner. The Proxmox host has the IP 187.39.42.199 and I've got four additional IPs one of which - 187.39.42.217 - I want to use for the the VM.

BTW: I've changed the IP addresses as I don't want to give them away on a public forum. However, the last triplet of the addresses given here are the same ones as in my setup, so I suppose that everything should be applicable to my real-life scenario.

The initial version of /etc/network/interfaces provided by Hetzner looks like this:
Code:
### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  address   187.39.42.199
  broadcast 187.39.42.255
  netmask   255.255.255.192
  gateway   187.39.42.193

# default route to access subnet
up route add -net 187.39.42.192 netmask 255.255.255.192 gw 187.39.42.193 eth0
After some vain experiments the current version of the file now looks like this:
Code:
### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  address   187.39.42.199
  broadcast 187.39.42.255
  netmask   255.255.255.192
  gateway   187.39.42.193

# vmbr0 - needed by Proxmox
auto vmbr0
iface vmbr0 inet static
    address   187.39.42.217
    netmask   187.39.42.255
    gateway   187.39.42.199
    bridge_ports none
    bridge_stp off
    bridge_fd 0

# default route to access subnet
up route add -net 187.39.42.192 netmask 255.255.255.192 gw 187.39.42.193 eth0
I.e. the only thing that's changed at the moment is the addition of the vmbr0 interface. I'm at a loss right now and after some reading of manpages and articles about how subnets work, I think I've got a somewhat better understanding of the way it should work but I feel even more confused in dealing with this particular case.

Maybe someone will be able to point me in the right direction. :)

TIA!

joran

For me Open VZ works out of the box, for KVM you can use vMAC wich is now available in Hetzner too.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!