Do you mean a new ubuntu 24.04 or a newly created older version like (20.04??) ?
Best way to start is to say what you are exactly trying, what you are expecting and what instead you are getting (the error) ...
If you do a privileged lxc nesting option is not given but as your answer looks like you create an unprivileged one.
But anyway if it helps to the problem why not ?!
It's so weird as I have another cluster and DHCP on the untagged VLAN works just fine. They're all using the same switches and same basic hardware. I've compared the interfaces files as well and cloned them but an untagged VLAN just won't work on the LXC's on one cluster. It works fine with VM's though.
Ubuntu likes it special (zfs developers are angry again and again about ubuntu developers special patches which broke zfs) ... you could use rocky or debian lxc ... but you are right, why easy if complicated is possible too ?
I'm completely at a loss. I guess I'll go through the switch configurations again and see if there's something different between the 2 clusters that I missed before, however, I can't imagine what that'd be when I can set a static IP and it works.
I'm at a loss as to where to go from here as I even took it off of the vmbr that is VLAN aware and put it on the main management interface and it still won't grab an IP through DHCP.
It seems like untagged traffic isn't being passed for some reason and I don't know why.
I've determined it's something weird that's going on even after I moved to Debian 12 with the same issue, however, there's a new twist.
I can't connect (ping or otherwise) to this LXC from any other machine on the network until I ping the machine's IP from the LXC at which point everything works just fine.
I know that I'd tried putting the native VLAN (1) into the VLAN Tag box before and it didn't work, however, I tried it today and now it grabs a DHCP address.