Menu
Index

Contact
LinkedIn
GitHub
Atom Feed
Comments Atom Feed



Tweet

Similar Articles

06/03/2012 09:00
Debian packaging for site deployment
22/04/2010 22:00
Basic Postfix config guide for Cacti, Spam Blocking, TLS etc.
25/10/2015 08:02
Ubuntu/Debian/Linux Mint and AWS CLI Autocomplete
31/10/2009 11:03
Linux (Debian, Ubuntu) SNMP basics
28/12/2015 14:03
Home Lab Project: Network Bridges for KVM II - Flexible Bridges & VLANs
21/09/2009 18:57
Page allocation failures and other wierdness

Recent Articles

17/07/2016 15:23
AWS ssh known_host sync
11/07/2016 08:42
File integrity and log anomaly auditing Updated (like fcheck/logcheck)
30/05/2016 13:09
Xenial LXC Container on Debian
12/03/2016 15:33
PHP Zend opcache on Cacti via SNMP
11/03/2016 13:11
Git on (Smart) HTTP with read/write authentication

Glen Pitt-Pladdy :: Blog

Xenial LXC Container on Debian

My mission was to have an Ubuntu Xenial container running on my Debian Jessie server to run server software which has to match the version on the clients (Mint/Ubuntu). That seems reasonable enough.

Prep

Assuming you've already got LXC running (eg. with Debian containers) on Jessie, you will need an updated debootstrap to be able to do Ubuntu Xenial containers. Fortunately Debian Backports provides updated packages and you will need debootstrap version 1.0.81~bpo8+1 or later for this to work.

After updating that you should be able to run:

# lxc-create -n thenewcontainer -t ubuntu -- -r xenial

... but

Fail

That works pretty well until late in the install it bails (fortunately tidying up after it's self) with an error like:

...
...
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [69.3 kB]
Fetched 296 kB in 0s (848 kB/s)                           
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package lxcguest is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'lxcguest' has no installation candidate
lxc_container: container creation template for thenewcontainer failed
lxc_container: Error creating container thenewcontainer

This seems to be trying to install the lxcguest package, but that doesn't exist in recent versions of Ubuntu.

Fix

After a lot of hunting around for what was trying to install this package, I eventually found /usr/share/lxc/templates/lxc-ubuntu on line 515 which seems to be for older versions of Ubuntu where this package existed. The easy way (but may break building older Ubuntu containers) is to simply comment out the line:

#        chroot $rootfs apt-get install --force-yes -y lxcguest

 

After that it all works.

Comments:




Are you human? (reduces spam)
Note: Identity details will be stored in a cookie. Posts may not appear immediately