LXC containers do not start when disk is installed on NAS

hitymca

New Member
Jan 1, 2025
8
0
1
Hello, I am having an issue where lxc containers do not start when i choose my NAS as the storage. VM's work just fine with the same storage configuration. That tells me (at least i'm pretty sure) that this is not a network or permissions problem but something to do with the LXC. The .raw file is being created on the NAS so the node is able to write to the NAS with no issues

This is the error when trying to start.

Code:
run_buffer: 571 Script exited with status 255
lxc_init: 845 Failed to run lxc.hook.pre-start for container "102"
__lxc_start: 2034 Failed to initialize container "102"
TASK ERROR: startup for container '102' failed
 
Code:
root@pve2:~# cat /etc/pve/storage.cfg
dir: local
        path /var/lib/vz
        content vztmpl,iso,backup

zfspool: local-zfs
        pool rpool/data
        content rootdir,images
        sparse 1

cifs: nas
        path /mnt/pve/nas
        server 192.168.0.178
        share nick
        content images,vztmpl,snippets,rootdir,iso,import,backup
        prune-backups keep-all=1
        username nick

root@pve2:~# pct config 102
arch: amd64
cores: 1
features: nesting=1
hostname: test
memory: 512
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:53:70:F0,type=veth
ostype: debian
rootfs: nas:102/vm-102-disk-0.raw,size=8G
swap: 512
unprivileged: 1
 
I don't see anything outstanding with your config.

Has this container ever been built? I'm guessing not. I'm thinking that maybe it is not managing to handle the creation due to the template location. (Is that template on the same nas or is it in that storage local?)

Have you managed successfully to spin up that same LXC but on a different storage location? What happens if you then try & move the LXC's disk to that nas storage.
 
So far i have only tried it with the template on the same nas storage but yes if I do template and disk on local storage it builds and starts just fine. I did just try to move it to the nas storage but then it would not start and I cannot move it back now.
 
I did just try to move it to the nas storage but then it would not start and I cannot move it back now.
How did you move it? Stopped the LXC & then GUI; CT Resources, Root disk, Volume Action & Move Storage? It seems strange you could move it to the NAS but not back again. (I assume you don't have any snapshots for that LXC). Something on the NAS side may not be right.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!