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 (184.108.40.206) and not the new IP (220.127.116.11). 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 = 18.104.22.168
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!