Unprivileged LXC container does not start with step by step usage instructions

Bug #1612533 reported by Andreas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Server Guide
Confirmed
Undecided
Unassigned

Bug Description

Following the steps in https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-basic-usage might not work for the unprivileged container creation on a fresh Ubuntu 16.04.01 installation.

Depending on your initial installed packages, it might be required to open a new shell, otherwise the "lxc-start -n u1 -d" step might fail.

Some text as per Serge's comment #6 below should be added to clarify this possible requirement.

Revision history for this message
Doug Smythies (dsmythies) wrote :

I tested that exact area of the documentation on a brand new 16.04 server VM during the 16.04 cycle, and it worked fine. As far as I have been able to determine the package cgmanager is installed by default on a new sever, so we need to figure out what is different between our two installs.

Revision history for this message
Andreas (0-andreas) wrote :

I tried it again: I seems to work with 16.04 but not with 16.04 and a apt-get update && apt-get upgrade or 16.04.1.
After apt-get install cgmanager and a reboot everything works normal.

screen.log shows the part before the reboot.

Revision history for this message
Doug Smythies (dsmythies) wrote :

@Serge: I subscribed you to this bug report. I wonder if you could comment. Should the lxc package have a dependency on the cgmanager package? It doesn't appear to at the moment (but I did follow every dependency path from lxc1).

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Argh, web interfaces make me cranky. ctrl-w closed my lengthy comment)

In x and y lxc uses lxcfs, cgmanager is not needed.

in t lxcfs is only available in backports, so without backports cgmanager would be required.

Revision history for this message
Doug Smythies (dsmythies) wrote :

@Serge: Thanks, and note that we are only takling about "x" herein.

@Andreas: It seems to work fine for me. I did everything twice using:

699400192 Aug 13 10:34 ubuntu-16.04.1-server-amd64.iso

downloaded yesterday, and creating a brand new VM with it.

However, I also got the "failed to start" message at this step:

lxc-start -n u1 -d

but it worked fine after I re-booted, having done nothing else. In particular I do not have the cgmanager package installed:

doug@serv-dev:~$ dpkg -l | grep cgm
doug@serv-dev:~$

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Note that (with or without cgmanager) you need a login shell with freezer and systemd cgroups delegated to you. If you did not have lxcfs or libpam-cgfs installed when you first logged in, you need to log back in, or open a new shell. Rebooting obviously also works.

Revision history for this message
Andreas (0-andreas) wrote :

I can confirm. It works fine after a logout and login. Cgmanager is not required.

description: updated
Changed in serverguide:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.