LXC container fails to start on iSCSI-LVM storage in PVE 9.1.5 - "symlink encountered" in prestart hook

hamashin

New Member
Mar 14, 2026
1
0
1
Environment:
proxmox-ve: 9.1.5
pve-manager: 9.1.5
lxc-pve: (latest as of 2026-03-14)
Storage: iSCSI LUN from NetGear NAS with LVM on top (vm-iscsi-lvm)

Problem:
When creating a new LXC container directly on an iSCSI-LVM storage, the container fails to start with the following error:
---------
sync_wait: 34 An error occurred in another process (expected sequence number 7)
__lxc_start: 2126 Failed to spawn container "109"
startup for container '109' failed
---------
The container creation task completes with TASK OK, but the rootfs is not populated — only dev, proc, and sys directories exist after creation.

Root Cause:
Running the prestart hook manually reveals the actual error:
Bash:
LXC_ROOTFS_MOUNT=/var/lib/lxc/109/rootfs \
LXC_ROOTFS_PATH=/dev/vm-iscsi-lvmg/vm-109-disk-0 \
LXC_NAME=109 \
LXC_CONFIG_FILE=/etc/pve/lxc/109.conf \
perl /usr/share/lxc/hooks/lxc-pve-prestart-hook 109 lxc pre-start 2>&1

symlink encountered at: //dev/vm-iscsi-lvmg/vm-109-disk-0
```

The `walk_tree_nofollow` function in `/usr/share/perl5/PVE/LXC.pm` uses `openat()` with `O_NOFOLLOW | O_DIRECTORY`, which fails with `ENOTDIR` because the iSCSI-LVM device path is a symlink:
```
/dev/vm-iscsi-lvmg/vm-109-disk-0 -> ../dm-9
```

This causes the prestart hook to abort before mounting the rootfs, leaving it empty.

**Storage configuration:**
```
iscsi: vm-iscsi
        portal 192.168.100.10
        target iqn.xxxx:vm-iscsi-g
        content none
lvm: vm-iscsi-lvm
        vgname vm-iscsi-lvmg
        base vm-iscsi:0.0.0.scsi-xxxxxxxx
        content rootdir,images
        saferemove 0
        shared 0


Additional observations:
  • Existing LXC containers that were created on local storage and then migrated to iSCSI-LVM storage (before this bug was introduced) continue to work normally.
  • KVM virtual machines on the same iSCSI-LVM storage are not affected.
  • Creating the container on local storage works correctly.

Workaround:
Create the LXC container on local storage instead of iSCSI-LVM storage.


Steps to reproduce:
  1. Configure iSCSI storage with LVM on top in Proxmox VE
  2. Create a new LXC container with the iSCSI-LVM storage selected as rootfs storage
  3. Attempt to start the container — it will fail with the above error

Bash:
# pveversion -v

proxmox-ve: 9.1.0 (running kernel: 6.17.13-2-pve)
pve-manager: 9.1.6 (running version: 9.1.6/71482d1833ded40a)
proxmox-kernel-helper: 9.0.4
proxmox-kernel-6.17: 6.17.13-2
proxmox-kernel-6.17.13-2-pve-signed: 6.17.13-2
proxmox-kernel-6.17.13-1-pve-signed: 6.17.13-1
proxmox-kernel-6.17.2-1-pve-signed: 6.17.2-1
ceph-fuse: 19.2.3-pve4
corosync: 3.1.10-pve1
criu: 4.1.1-1
frr-pythontools: 10.4.1-1+pve1
ifupdown2: 3.3.0-1+pmx12
intel-microcode: 3.20251111.1~deb13u1
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-5
libproxmox-acme-perl: 1.7.0
libproxmox-backup-qemu0: 2.0.2
libproxmox-rs-perl: 0.4.1
libpve-access-control: 9.0.5
libpve-apiclient-perl: 3.4.2
libpve-cluster-api-perl: 9.0.7
libpve-cluster-perl: 9.0.7
libpve-common-perl: 9.1.7
libpve-guest-common-perl: 6.0.2
libpve-http-server-perl: 6.0.5
libpve-network-perl: 1.2.5
libpve-rs-perl: 0.11.4
libpve-storage-perl: 9.1.0
libspice-server1: 0.15.2-1+b1
lvm2: 2.03.31-2+pmx1
lxc-pve: 6.0.5-4
lxcfs: 6.0.4-pve1
novnc-pve: 1.6.0-3
proxmox-backup-client: 4.1.4-1
proxmox-backup-file-restore: 4.1.4-1
proxmox-backup-restore-image: 1.0.0
proxmox-firewall: 1.2.1
proxmox-kernel-helper: 9.0.4
proxmox-mail-forward: 1.0.2
proxmox-mini-journalreader: 1.6
proxmox-offline-mirror-helper: 0.7.3
proxmox-widget-toolkit: 5.1.8
pve-cluster: 9.0.7
pve-container: 6.1.2
pve-docs: 9.1.2
pve-edk2-firmware: 4.2025.05-2
pve-esxi-import-tools: 1.0.1
pve-firewall: 6.0.4
pve-firmware: 3.18-1
pve-ha-manager: 5.1.1
pve-i18n: 3.6.6
pve-qemu-kvm: 10.1.2-7
pve-xtermjs: 5.5.0-3
qemu-server: 9.1.4
smartmontools: 7.4-pve1
spiceterm: 3.4.1
swtpm: 0.8.0+pve3
vncterm: 1.9.1
zfsutils-linux: 2.4.0-pve1