SDN cant delete vnet

jsterr

Renowned Member
Jul 24, 2020
857
245
88
33
1679580290915.png
cant delete vnet or subnet, backup vmbridge not in use on a ressource. It this a bug, shouldnt it be possible to delete it when its not it use?
 
it's a known bug, you need to delete the gateway first, editing the subnet
Thanks worked! Is there a list of known issues or something like that? Own subcategory on bugzilla?
 
What can be done if you cannot delete the subnet even after removing the gateway; and receiving the following error:
"delete sdn subnet object failed: cannot delete subnet '10.0.20.1/24', not empty (500)"
 
I was able to resolve the issue by deleting the virtual machine that was using this network. The issue may be resolved if you move your virtual machine to another network first. Afterwards, navigate to Datacenter > SDN > VNets, delete the Subnet, and then delete the VNet. Following these steps, you should be able to delete the SDN. Please don't forget to apply the changes in Datacenter > SDN.
 
I was able to resolve the issue by deleting the virtual machine that was using this network. The issue may be resolved if you move your virtual machine to another network first. Afterwards, navigate to Datacenter > SDN > VNets, delete the Subnet, and then delete the VNet. Following these steps, you should be able to delete the SDN. Please don't forget to apply the changes in Datacenter > SDN.
I did end up removing the VMs also. Ultimately, I just re-installed the latest version.
 
I ended up on this due to the same error and didn't feel like rebuilding my test environment..
found chatgpt had a good answer...

backup node config:


Code:
mkdir -p /root/pve-backups/configs
cp -r /etc/pve /root/pve-backups/configs/
cp /etc/network/interfaces /root/pve-backups/configs/
cp /etc/hosts /root/pve-backups/configs/
cp -r /etc/corosync /root/pve-backups/configs/
#Ceph if using
cp -r /etc/ceph /root/pve-backups/configs/
#tar and compress backups
tar -czvf pve-config-backup.tar.gz /root/pve-backups/configs/
#copy these out

#to edit / remove SDN parts via CLI
cd /etc/pve/sdn
ls
#check each cfg and delete specific parts as needed
#cat <name>.cfg to check before deleting
rm <vnet>.cfg
rm <subnet>.cfg
rm <zone>.cfg

#Once Deleted below can take some time 1-2 minutes depending on your setup
systemctl restart pveproxy.service
#then
systemctl restart pve-cluster

with that, I was able to clean up and get back to a good starting point for my configs.
 
  • Like
Reactions: rudydevolder
I had this today again, without having a left ip on the ipam or anything else. I ended up deleting the part in /etc/pve/sdn/subnets.cfg for that simple-zones-vnet-subnet.