Public bug reported:

lxc-create does not create a container that will work with lxc-start.

I have created noble 24.04 container with the following command:
lxc-create -B dir -t download -n noble-simple -- -d ubuntu -r noble -a amd64

then try to start the container running using:
lxc-start noble-simple --logfile /tmp/log.out --logpriority=info

It does not start:
root@srv:~# lxc-ls -f simple
NAME         STATE   AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED 
noble-simple STOPPED 0         -      -    -    false        

If I add the following to the config file it works:
lxc.apparmor.profile = unconfined


lxc-ls -f simple
NAME         STATE   AUTOSTART GROUPS IPV4            IPV6 UNPRIVILEGED 
noble-simple RUNNING 0         -      192.168.204.251 -    false

I think the is security problem because using unconfined is removing
apparmor protection from the container

also should not have to modify the config file for a simple lxc-create
it should just work

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: lxc 1:5.0.3-2ubuntu7
ProcVersionSignature: Ubuntu 6.8.0-48.48-generic 6.8.12
Uname: Linux 6.8.0-48-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Sat Nov  9 15:57:58 2024
InstallationDate: Installed on 2014-08-19 (3735 days ago)
InstallationMedia: Ubuntu-Server 14.04.1 LTS "Trusty Tahr" - Release amd64 
(20140722.3)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: lxc
UpgradeStatus: Upgraded to noble on 2024-11-05 (4 days ago)
mtime.conffile..etc.default.lxc-net: 2024-11-04T23:19:17.843966
mtime.conffile..etc.init.d.apport: 2024-07-22T10:59:07
mtime.conffile..etc.lxc.default.conf: 2024-11-04T23:19:17.859965

** Affects: lxc (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble

** Attachment added: "config file that does not work"
   
https://bugs.launchpad.net/bugs/2087755/+attachment/5835971/+files/config.nostart

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/2087755

Title:
  lxc-start will not start noble container

Status in lxc package in Ubuntu:
  New

Bug description:
  lxc-create does not create a container that will work with lxc-start.

  I have created noble 24.04 container with the following command:
  lxc-create -B dir -t download -n noble-simple -- -d ubuntu -r noble -a amd64

  then try to start the container running using:
  lxc-start noble-simple --logfile /tmp/log.out --logpriority=info

  It does not start:
  root@srv:~# lxc-ls -f simple
  NAME         STATE   AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED 
  noble-simple STOPPED 0         -      -    -    false        

  If I add the following to the config file it works:
  lxc.apparmor.profile = unconfined

  
  lxc-ls -f simple
  NAME         STATE   AUTOSTART GROUPS IPV4            IPV6 UNPRIVILEGED 
  noble-simple RUNNING 0         -      192.168.204.251 -    false

  I think the is security problem because using unconfined is removing
  apparmor protection from the container

  also should not have to modify the config file for a simple lxc-create
  it should just work

  ProblemType: Bug
  DistroRelease: Ubuntu 24.04
  Package: lxc 1:5.0.3-2ubuntu7
  ProcVersionSignature: Ubuntu 6.8.0-48.48-generic 6.8.12
  Uname: Linux 6.8.0-48-generic x86_64
  ApportVersion: 2.28.1-0ubuntu3.1
  Architecture: amd64
  CasperMD5CheckResult: unknown
  Date: Sat Nov  9 15:57:58 2024
  InstallationDate: Installed on 2014-08-19 (3735 days ago)
  InstallationMedia: Ubuntu-Server 14.04.1 LTS "Trusty Tahr" - Release amd64 
(20140722.3)
  ProcEnviron:
   LANG=en_US.UTF-8
   PATH=(custom, no user)
   SHELL=/bin/bash
   TERM=xterm-256color
   XDG_RUNTIME_DIR=<set>
  SourcePackage: lxc
  UpgradeStatus: Upgraded to noble on 2024-11-05 (4 days ago)
  mtime.conffile..etc.default.lxc-net: 2024-11-04T23:19:17.843966
  mtime.conffile..etc.init.d.apport: 2024-07-22T10:59:07
  mtime.conffile..etc.lxc.default.conf: 2024-11-04T23:19:17.859965

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/2087755/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to