Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

proxmox lxc container failed to start

Tags:

lxc

proxmox

zfs

When I try to run my lxc container, I get:

lxc-start: 100: lxccontainer.c: wait_on_daemonized_start: 751 No such file or directory - Failed to receive the container state
lxc-start: 100: tools/lxc_start.c: main: 371 The container failed to start.
lxc-start: 100: tools/lxc_start.c: main: 373 To get more details, run the container in foreground mode.
lxc-start: 100: tools/lxc_start.c: main: 375 Additional information can be obtained by setting the --logfile and --logpriority options.

My lxc config:

#WEBSERVER
arch: amd64
cores: 1
hostname: poseidon
memory: 2048
net0: name=eth0,bridge=vmbr0,gw=192.168.0.1,hwaddr=66:79:16:C7:C3:51,ip=192.168.0.12/24,type=veth
onboot: 1
ostype: debian
#rootfs: local-zfs:subvol-100-disk-1,size=30G
rootfs: local-zfs:subvol-100-disk-1,size=30G
searchdomain: 192.168.0.1
swap: 512

root@cronos:/etc/pve/lxc# pvesm list local-zfs --
local-zfs:subvol-100-disk-1 subvol 32212254720 100
local-zfs:subvol-101-disk-1 subvol 8589934592 101
local-zfs:vm-102-disk-1       raw 161061273600 102
local-zfs:vm-103-disk-1       raw 34359738368 103

root@cronos:/etc/pve/lxc# zfs list
NAME                           USED  AVAIL  REFER  MOUNTPOINT
rpool                         30.6G  3.48T   104K  /rpool
rpool/ROOT                    4.17G  3.48T    96K  /rpool/ROOT
rpool/ROOT/pve-1              4.17G  3.48T  4.17G  /
rpool/data                    17.9G  3.48T    96K  /rpool/data
rpool/data/subvol-100-disk-1  4.87G  25.1G  4.87G  /rpool/data/subvol-100-disk-1
rpool/data/subvol-101-disk-1   859M  7.16G   859M  /rpool/data/subvol-101-disk-1
rpool/data/vm-102-disk-1      5.68G  3.48T  5.68G  -
rpool/data/vm-103-disk-1      6.47G  3.48T  6.47G  -
rpool/swap                    8.50G  3.49T  3.99G  -

This situation occurred after my zpool disappeared, and I re-import it.

like image 269
0xdeface Avatar asked Jan 16 '18 04:01

0xdeface


People also ask

What is the Proxmox VE LXC container storage model?

The Proxmox VE LXC container storage model is more flexible than traditional container storage models. A container can have multiple mount points. This makes it possible to use the best suited storage for each application.

What is the Proxmox container toolkit?

Proxmox VE uses Linux Containers (LXC) as its underlying container technology. The “Proxmox Container Toolkit” ( pct) simplifies the usage and management of LXC, by providing an interface that abstracts complex tasks.

What can I do with the Proxmox VE?

You can also use the Proxmox VE firewall, or manage containers using the HA framework. Our primary goal is to offer an environment that provides the benefits of using a VM, but without the additional overhead.

How do I backup a Proxmox VE container with replication?

As of Proxmox VE 5.0, replication requires a storage of type zfspool. Adding a mount point to a different type of storage when the container has replication configured requires to have Skip replication enabled for that mount point. It is possible to use the vzdump tool for container backup.


1 Answers

This is an issue with AppArmor in stretch-proposed-updates. I fixed this by inserting this line into /etc/apt/sources.list:

deb http://download.proxmox.com/debian/pve stretch pve-no-subscription

Keep in mind that this is not the best fix for a production server. Proxmox states:

It can be used for testing and non-production use. It is not recommended to run on production servers, as these packages are not always heavily tested and validated.

like image 147
whitleystriber Avatar answered Oct 07 '22 11:10

whitleystriber