[SOLVED] LXC Container Networking Broken from Hyper-V Configuration Trouble

verulian

Well-Known Member
Feb 18, 2019
179
21
58
44
I've been struggling with a networking issue with LXC containers. Networking works fine on my main Proxmox console, but when I create an LXC container (I've tried making multiple containers with static and DHCP) I can't get it to communicate with the network. I have a very simple configuration, PVE:
pve.jpg

And for the Ubuntu 20.04 Container network configuration I have:
lxc.jpg

When I'm in Ubuntu, `ip addr` shows that the IP is assigned and I can ping PVE via `ping 192.168.1.240`:
ping.jpg

But pinging the gateway and 1.1.1.1 fails:
failure.jpg

What would be causing containers to not get past the PVE host in this case (I also tried turning off the firewall in case that was interfering)?
 

Attachments

  • failure.jpg
    failure.jpg
    139.8 KB · Views: 7
hi,

can you please post the contents of /etc/network/interfaces on your PVE host?

also ip r inside the container for the routing info
 
are you using nested virtualization? (running PVE in another virtual environment)

see this thread[0] for example. symptoms appear to be the same. if you're using another virtuallization software it could be interfering and you may need to allow mac address spoofing on the guest network interface (could be called 'promiscous' or just mac spoofing)

[0]: https://forum.proxmox.com/threads/no-connection-to-the-network-from-lxc.70330/
 
Oh, thank you. Yes, I too am running on Hyper-V like that poster is noting. Unfortunately I'm not seeing a clear way to change this. I see they are running on Windows 10, but I'm running on Windows Server. Do you have a "Hyper-V Suggested Settings" page somewhere that gives details for each OS version and screenshots?
 
I found it! It took a little digging, but after going to the "Hyper-V Manager" right clicking on the virtual machine guest ("Proxmox"), click on "Settings", go to "Network Adapter", expand the "+" beside "Network Adapter", click on "Advanced Features", check "Enable MAC Address Spoofing", "Apply" or "OK" out of all of that and test again - AND IT WORKED!

Please consider adding a Proxmox Hyper-V Nesting FAQ or Tutorial. I think it would help a lot since so many people would like to run it on Windows laptops or servers for different reasons.
 

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!