Windows laptop hosting Ubuntu VM that hosts LXD Windows VM container. Network connectivity doesn't work for container

Ok, I got a little conundrum here. I’m running some tests and research for our company’s future developments. I have a little bit convoluted setup and I would like to know if this scenario is supported, because I didn’t manage to get network connectivity to or from container.

I have physical laptop (Win10) with Hyper-V. Nested virtualization and MAC spoofing enabled. Guest VM on top of this Hyper-V is Ubuntu server 20.04. And on top of that Ubuntu server VM is LXD VM Windows Server 2022 container.
I’m using netplan for static ip and network bridge setup. I would like to enable communication with LAN from my container both directions. To host and from host as well as other devices on the network.

My network router is DNS and DHCP server, it’s a basic home router from ISP and it provides IP connectivity via DHCP.

I can provide additional information, but I was wondering if there is more to it. Is there a guide or some tip for this scenario? What is that I’m missing? My Windows VM in LXD doesn’t have network icon as monitor but as globe, meaning there is no connectivity whatsoever.

Thanks in advance,

Welcome Alen Vasiljevic to the community! Dobrodošli!

LXD support has moved to LXD - Ubuntu Community Hub , and this forum remains for LXC and all other related projects (like lxcfs, Incus, etc).

But just a curious, non-LXD related, question. What is your scenario and what makes nested virtualization necessary on it? Unless for a very specific reason, wouldn’t be simpler to just create all VMs directly on the host?

In a meantime I did managed to solve the problem. My netplan, network bridge and LXD settings were correct all along, but since this was on Ubuntu VM which as LXD host is also a VM on Hyper-V, I needed to setup my external Hyper-V switch with MAC address spoofing. Only after setting this, I did managed to retrieve IP address for container in both ways: via LXD or pure KVM QEMU VM. So, it appears the issue was of pure networking nature.

Scenario that I needed to set up: our development Ubuntu server is already installed within VM on Hyper-V. Don’t ask me why but I think it’s long before me, a years back before my development team needed containers and or virtualizations of any sorts. Upon that Hyper-V VM is Ubuntu server and within it we need to test Telerik Report server - but since only Windows is supported and our ongoing project don’t allow an additional server just for this reporting server, we need it inside our single dev server.

Thanks nevertheless. I learned a lot in meantime. Great product, by the way.