[SOLVED] pct create

SuperManni72

New Member
Mar 29, 2025
7
1
3
Hello,

I am new to proxmox and I'm running a fresh standard-installation of proxmox (with local and local-lvm).
When I try to create a CT from the pve-shell,
Code:
pct create 999 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst --rootfs local-lvm:8 --storage local-lvm

I got the following error:
Bash:
command '/sbin/vgs --separator : --noheadings --units b --unbuffered --nosuffix --options vg_name,vg_size,vg_free,lv_count' failed: Insecure $ENV{CDPATH} while running with -T switch at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 176.
command '/sbin/vgscan --ignorelockingfailure --mknodes' failed: Insecure $ENV{CDPATH} while running with -T switch at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 176.
command '/sbin/lvs --separator : --noheadings --units b --unbuffered --nosuffix --config 'report/time_format="%s"' --options vg_name,lv_name,lv_size,lv_attr,pool_lv,data_percent,metadata_percent,snap_percent,uuid,tags,metadata_size,time' failed: Insecure $ENV{CDPATH} while running with -T switch at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 176.

And env | grep CDPATH will give CDPATH=.:/mnt/Daten:/var/log:/mnt/btrfs/data:/usr/local/bin:/mnt/Backup_System:/mnt/Backup_Clients
The /mnt/ are bindmounts for other VMs, but I haven't set the CDPATH env variable explicitly. And also export env= will have no effect.

When I create a CT from GUI, it works.

Thanks, Markus
 
Hello,

the values in it are used by cd to evaluate them additionally if relative paths are used.
The variable is usually set in files like
.bashrc
.bash_profile
so have a look there and remove the declaration.
Creating a CT from GUI doesn't invoke your shell, which is why it is working.
 
  • Like
Reactions: SuperManni72
Hello,

the values in it are used by cd to evaluate them additionally if relative paths are used.
The variable is usually set in files like
.bashrc
.bash_profile
so have a look there and remove the declaration.
Creating a CT from GUI doesn't invoke your shell, which is why it is working.
Thank you very much, that solved my problem. In my .bashrc there was the CDPATH=... statement. After removing this, the container was created.