Issue with LXD containers inside of VPS

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
burningsmile
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed Jan 25, 2017 4:25 pm

Issue with LXD containers inside of VPS

Post by burningsmile »

I was planning on moving some of the services we run on the VPS into LXD containers that need to be accessible by the outside. (Game servers,web server for fast download support, and our Murmer server.) Upon trying to configure LXD to use macvlan and the eth0 Ethernet port the container looses connection. Running lxc list also shows no ipv4 or ipv6. I am assuming that it is because this is a VPS so it can't get another dhcp address from the networking outside of the VPS.

I have tested the exact same config on a bare metal install and it works fine. So it is something to do with the fact that this is a VPS or bad configuration elsewhere in the VPS.

Here is the configuration we are using.
Ubuntu server 16.04.1 LTS
kernel 4.4
Added the PPA for the latest stable upstream versions of LXD and LXC
LXD version 2.7
LXC version 2.7

Config file

lxc profile edit default

### This is a yaml representation of the profile.
### Any line starting with a '# will be ignored.
###
### A profile consists of a set of configuration items followed by a set of
### devices.
###
### An example would look like:
### name: onenic
### config:
### raw.lxc: lxc.aa_profile=unconfined
### devices:
### eth0:
### nictype: bridged
### parent: lxdbr0
### type: nic
###
### Note that the name is shown but cannot be changed

name: default
config: {}
description: Default LXD profile
devices:
eth0:
nictype: bridged
parent: lxdbr0
type: nic
usedby:
- /1.0/containers/webserver

Has anyone here had success on configuring this on their VPS?

Thanks!
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Issue with LXD containers inside of VPS

Post by Edge100x »

I haven't experimented with container systems, but if it is trying to use DHCP as you believe, you'll need to switch it to using a static IP address. We don't use DHCP here.

If it still doesn't work after that, you might try switching it to a different network mode than "bridged". But, I would expect bridged mode to also work on our end, since the system here shouldn't mind it if you have multiple MACs and virtual devices inside your domU.
Post Reply