Debian/Trixie: lxc shutdown

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
Benutzeravatar
schorsch_76
Beiträge: 2658
Registriert: 06.11.2007 16:00:42
Lizenz eigener Beiträge: MIT Lizenz

Debian/Trixie: lxc shutdown

Beitrag von schorsch_76 » 07.04.2025 17:51:00

Hallo zusammen,
ich hab auf meinem Desktop Rechner Trixie installiert. Hab einen lxc Container (auch Trixie) der beim Start hochgefahren wird. Funktioniert alles soweit. Bei runterfahren bleibt systemd hängen, meldet das es auf Prozesse wartet, schießt sie aber nicht ab. Leider zeigt es auch keine Stopped Meldungen mehr an wir früher. Wenn ich vorher mit "sudo systemctl stop lxc" alles runterfahre, stoppt der Rechner einwandfrei.

Die systemd Unit scheint auch ok zu sein (siehe ganz unten).

Wie kann ich systemd dazu bringen hier den Container sauber zu stoppen?
Wie kann ich systemd dazu bringen auch wieder die Stopped Meldungen auszugeben und evtl. die "Waiting for ...[*..]" Meldungen?

Ich weis nicht wo ich hier suchen soll ... :oops:

Code: Alles auswählen

systemctl status lxc
● lxc.service - LXC Container Initialization and Autoboot Code
     Loaded: loaded (/usr/lib/systemd/system/lxc.service; enabled; preset: enabled)
     Active: active (exited) since Mon 2025-04-07 17:39:01 CEST; 5min ago
 Invocation: 834f671843da4146938b047dd217b362
       Docs: man:lxc-autostart
             man:lxc
    Process: 1899 ExecStartPre=/usr/libexec/lxc/lxc-apparmor-load (code=exited, status=0/SUCCESS)
    Process: 1941 ExecStart=/usr/libexec/lxc/lxc-containers start (code=exited, status=0/SUCCESS)
   Main PID: 1941 (code=exited, status=0/SUCCESS)
   Mem peak: 3.7M
        CPU: 46ms

Code: Alles auswählen

sudo cat /var/lib/lxc/develop/config
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)

# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)


# Distribution configuration
lxc.include = /usr/share/lxc/config/common.conf
lxc.include = /usr/share/lxc/config/userns.conf
lxc.arch = linux64

# Container specific configuration
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.idmap = u 0 5100000 200000
lxc.idmap = g 0 5100000 200000
lxc.rootfs.path = dir:/var/lib/lxc/develop/rootfs
lxc.uts.name = develop

# Network configuration
lxc.net.0.type = veth
lxc.net.0.link = br0
lxc.net.0.flags = up
lxc.net.0.hwaddr=C2:A9:21:36:F2:CD

lxc.start.auto = 1

sudo systemctl edit lxc.service zeigt:

Code: Alles auswählen

### Editing /etc/systemd/system/lxc.service.d/override.conf
### Anything between here and the comment below will become the contents of the drop-in file



### Edits below this comment will be discarded


### /usr/lib/systemd/system/lxc.service
# [Unit]
# Description=LXC Container Initialization and Autoboot Code
# After=network.target remote-fs.target lxc-net.service
# Wants=lxc-net.service
# Documentation=man:lxc-autostart man:lxc
# 
# [Service]
# Type=oneshot
# RemainAfterExit=yes
# ExecStartPre=/usr/libexec/lxc/lxc-apparmor-load
# ExecStart=/usr/libexec/lxc/lxc-containers start
# ExecStop=/usr/libexec/lxc/lxc-containers stop
# ExecReload=/usr/libexec/lxc/lxc-apparmor-load
# # Environment=BOOTUP=serial
# # Environment=CONSOLETYPE=serial
# Delegate=yes
# 
# [Install]
# WantedBy=multi-user.target

Antworten