Cannot remove any LXC or VM

Vittorio

Active Member
Jul 24, 2019
60
3
28
59
Hi all

I'm trying to remove a container and a VM that I don't need anymore, but I'm getting this error
TASK ERROR: mkdir /mnt/pve/nfs-ovm/template: Permission denied at /usr/share/perl5/PVE/Storage/Plugin.pm line 1374.

I've recently installed OVM in a container and followed this guide to have some space to share.

Then I've created, in Datacenter->Storage, an NFS share called nfs-ovm

Both container and VM has nothing to do with this share, but I keep getting the error and I cannot remove them.

This is the LXC config that I want to remove, for example:

Code:
## Docker LXC
#  ### https://tteck.github.io/Proxmox/
#  <a href='https://ko-fi.com/D1D7EP4GF'><img src='https://img.shields.io/badge/%E2%98%95-Buy me a coffee-red' /></a>
arch: amd64
cores: 2
features: keyctl=1,nesting=1
hostname: frigate
memory: 4096
net0: name=eth0,bridge=vmbr0,gw=192.168.1.10,hwaddr=42:C9:C9:55:0B:C7,ip=192.168.1.100/25,type=veth
onboot: 0
ostype: debian
rootfs: DATI:vm-119-disk-0,size=4G
swap: 512
tags: proxmox-helper-scripts
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/serial/by-id  dev/serial/by-id  none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0       dev/ttyUSB0       none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1       dev/ttyUSB1       none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM0       dev/ttyACM0       none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM1       dev/ttyACM1       none bind,optional,create=file

I see that I cannot remove any LXC or VM, not only the two that I need to remove

Why this NFS share impact all the LXCs and VMs?

What can I check and how can I remove the lxc and VM?
Thanks
 
Last edited:
Hi all

I'm trying to remove a container and a VM that I don't need anymore, but I'm getting this error
TASK ERROR: mkdir /mnt/pve/nfs-ovm/template: Permission denied at /usr/share/perl5/PVE/Storage/Plugin.pm line 1374.

I've recently installed OVM in a container and followed this guide to have some space to share.

Then I've created, in Datacenter->Storage, an NFS share called nfs-ovm

Both container and VM has nothing to do with this share, but I keep getting the error and I cannot remove them.

This is the LXC config that I want to remove, for example:

Code:
## Docker LXC
#  ### https://tteck.github.io/Proxmox/
#  <a href='https://ko-fi.com/D1D7EP4GF'><img src='https://img.shields.io/badge/%E2%98%95-Buy me a coffee-red' /></a>
arch: amd64
cores: 2
features: keyctl=1,nesting=1
hostname: frigate
memory: 4096
net0: name=eth0,bridge=vmbr0,gw=192.168.1.10,hwaddr=42:C9:C9:55:0B:C7,ip=192.168.1.100/25,type=veth
onboot: 0
ostype: debian
rootfs: DATI:vm-119-disk-0,size=4G
swap: 512
tags: proxmox-helper-scripts
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/serial/by-id  dev/serial/by-id  none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0       dev/ttyUSB0       none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1       dev/ttyUSB1       none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM0       dev/ttyACM0       none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM1       dev/ttyACM1       none bind,optional,create=file

I see that I cannot remove any LXC or VM, not only the two that I need to remove

Why this NFS share impact all the LXCs and VMs?

What can I check and how can I remove the lxc and VM?
Thanks
Hi,
seems like you did not set up the permissions for Proxmox VE to write on the NFS share. Therefore the creation of the default directory structure fails. I do not know which actual code path might lead to the error being triggered by the LXC/VM deletion, but I would suggest to fix the storage permission issue or deactivate the storage for now, if unused at the moment.
 
Thanks @Chris

How can I deactivate the storage?
Just removing from Datacenter->Storage?

What if I would like to fix the storage permission?





I just briefly explain what is my need

I have a minipc with an SSD to boot Proxmox and have lvm-thin and also an M.2 disk to have some more space

What I would like to have is some internal storage on the M.2 disk to share between some LXC

That's why, looking around, I chose to have an LXC with OpenMediaVault to load a part of the M.2 disk as File System to have the ability to share it via NFS

Is there any other simple and better way to do it?

Thanks!
 
Last edited:
How can I deactivate the storage?
Just removing from Datacenter->Storage?
There is the Enabled switch in Datacenter > Storage > <Storage Name> > Edit, which if unchecked disables the storage.

What if I would like to fix the storage permission?
This you will have to do in your LXC/NFS share, I assume this is what you are looking for https://docs.openmediavault.org/en/latest/administration/services/nfs.html#server-shares. You will have to allow the Proxmox VE host to have write access, not just read access.

Is there any other simple and better way to do it?
Sharing the storage via NFS/CIFS is the way to go, yes
 
There is the Enabled switch in Datacenter > Storage > <Storage Name> > Edit, which if unchecked disables the storage.
Thanks @Chris

Disabling the storage, has let me remove the LXC/VM I needed to delete!!


Strangely, the NFS permissions in OVM is RW as you can see here

Schermata 2023-09-27 alle 10.35.24.png
 
Last edited:

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!