Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to set up a fenced environment in on Ubuntu server. The actual use case is to have two separate websites running on the same physical box, but I want one of those websites running in a fenced environment. I figured that the best way to do this was create a VM on the server for the fenced website, and have a second IP address point to that VM.

A friend recommended OpenVZ, but this topic recommended LXC instead. I've got LXC working, except for the networking part.

I have a separate IP address and a separate MAC address, provided by the server provider (Hetzner). Unfortunately, I cannot figure out what values to put in the LXC config file so that when the container starts, it uses the different IP address.

When I start the container with below settings, it boots up fine. However, doing a curl http://curlmyip.com, I get the IP address of the root machine (188.40.88.211) and not the new IP (188.40.88.228). The latter IP does not respond to ping or http requests.

Here's the relevant bits from the config file:

lxc.network.type=veth
lxc.network.link=lxcbr0
lxc.network.flags=up
lxc.network.hwaddr = 00:50:56:00:30:3F
lxc.network.ipv4 = 188.40.88.228

Please let me know if there's any additional information I can give you, or even if I'm on the wrong track with the VMs. I'm very new to all of this!

share|improve this question
    
You're at Hetzner, they have some strange requirements when you run virtual machines on your leased server. Contact Hetzner to find out what you need to do. –  Michael Hampton Dec 25 '12 at 16:57
    
AFAIK, pinging from lxc container to outside may not be possible since lxc does not support raw sockets and i think it requires bridged network for applying a separate ip of its own. –  Naai Sekar Dec 25 '12 at 20:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.