deleted storage in the wrong order, can't remove LXC container

ehcorn

New Member
Sep 29, 2021
2
0
1
34
pretty much as the message goes, I was taking some temporary flash storage out of my storage configuration, I had setup a test container in the storage but accidentally deleted the wrong disk image in the container and now I can't delete the container because it can't find the main disk image.

I've tried re-creating the diretory with the same name and copying over another container's disk but that didn't work, now I get errors that says it can't prase the directory.
 
Have you tried

pct destroy vmid --destroy-unreferenced-disks 0 --force 1

just a guess, since you neither posted the config : pct config vmid
nor did you provide exact commands that you run and errors that you receive

man pct:
Code:
pct destroy <vmid> [OPTIONS]

       Destroy the container (also delete all uses files).

       <vmid>: <integer> (1 - N)
           The (unique) ID of the VM.

       --destroy-unreferenced-disks <boolean>
           If set, destroy additionally all disks with the VMID from all enabled storages which are not referenced in the config.

       --force <boolean> (default = 0)
           Force destroy, even if running.

       --purge <boolean> (default = 0)
           Remove container from all related configurations. For example, backup jobs, replication jobs or HA. Related ACLs and Firewall entries will always be removed.



Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
pretty much as the message goes, I was taking some temporary flash storage out of my storage configuration, I had setup a test container in the storage but accidentally deleted the wrong disk image in the container and now I can't delete the container because it can't find the main disk image.

I've tried re-creating the diretory with the same name and copying over another container's disk but that didn't work, now I get errors that says it can't prase the directory.
gives me the error "unable to parse directory volume name 'vm-109-disk-0'" and I get the same error with all the related commands there.

lets see what I can add to help here, sorry about that.
  1. tried removing from the GUI but that's giving me the same error as before
  2. it's a turnkeylinux "fileserver" running in VM109

config is:
Code:
arch: amd64
cores: 4
features: nesting=1
hostname: fileserver
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.1.254,hwaddr=56:6D:8B:E7:D2:3D,ip=192.168.1.110/24,type=veth
ostype: debian
rootfs: WDblack:vm-109-disk-0,size=8G
swap: 513
unprivileged: 1

what if I just delete the conf file? the main disk is long gone so I think that's the only thing left that makes proxmox think there's a container there, 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!