[SOLVED] can't turn off and uninstall CT

Walery

Active Member
Feb 11, 2021
73
1
28
44
i created a CT (ubuntu-16.04-standard_16.04.5-1_amd64.tar.gz) got error WARN: old systemd (< v232) detected, container won't run in a pure cgroupv2 environment! Please see documentation -> container -> cgroup version. TASK WARNINGS: 1

Now I can't turn off this CT TASK ERROR: unable to find configuration file for VM 201 on node 'pve1'
ct201.png
 
Hi,

did you see the 201.conf file in the /etc/pve/nodes/pve1/lxc?

Bash:
find /etc/pve/nodes/pve1/lxc/ -name 201.conf
 
Hi,

did you see the 201.conf file in the /etc/pve/nodes/pve1/lxc?

Bash:
find /etc/pve/nodes/pve1/lxc/ -name 201.conf
yes i see this file 201.conf
/etc/pve/nodes/pve1/lxc

file contents
arch: amd64
cores: 2
features: nesting=1
hostname: test1
memory: 2048
nameserver: 192.168.15.4
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.15.3,hwaddr=22:89:11:6A:69:04,ip=192.168.15.120/24,type=veth
ostype: ubuntu
rootfs: store1:subvol-201-disk-0,size=20G
swap: 512
unprivileged: 1
 
does the pct list command see the 201 container? did you try to stop it using pct top 201?
root@pve1:~# pct list
VMID Status Lock Name
201 running test1


root@pve1:~# pct top 201
ERROR: unknown command 'pct top'
 
thank you for the output!

can you try to kill the PID for the lxc-start 201 using kill -9

Bash:
ps aux | grep 'lxc-start -F -n 201'
kill -9 <PID>

Then try to start the container and stop it using
Bash:
pct start 201 && pct stop 201
 
thank you for the output!

can you try to kill the PID for the lxc-start 201 using kill -9

Bash:
ps aux | grep 'lxc-start -F -n 201'
kill -9 <PID>

Then try to start the container and stop it using
Bash:
pct start 201 && pct stop 201
root@pve1:~# ps aux | grep 'lxc-start -F -n 201'
kill -9 <PID>
root 33514 0.0 0.0 4548 3512 ? Ss 09:56 0:01 /usr/bin/lxc-start -F -n 201
root 495724 0.0 0.0 6312 664 pts/0 S+ 15:54 0:00 grep lxc-start -F -n 201
-bash: syntax error near unexpected token `newline'
 
for the next time you need to force kill a container, you can use this script:
Code:
CTID=201 # change this to yours
CT_PID=$(ps aux | grep -e "lxc-start.*$CTID$" | awk '{print $2}') # gives you the process ID for the lxc-start of that container
kill -9 $CT_PID
 
  • Like
Reactions: Walery