I have been experimenting with Windows VMs, and have succesfuly created a working Windows Server 19 instance. However, I noticed that after restarting the container the IPV4 information was gone even though the instance has internet connectivity with a LAN IP address. Though it is possible to fetch it through RDP access I needed the information displayed under lxc list for automation purposes.
To clarify both the IPV4 and IPV6 information were displayed under lxc list when I first created wserver19. They only stopped appearing after a restart.
For Linux VMs and containers we can reliably pull the address from within the instance.
For the others (like Windows) all we can do is parse DHCP lease files and hope that we have a matching record in there.
In recent LXD releases we also look at the ARP and NDP neighbour cache on the host’s bridge interface for IPs associated with the VM’s interface’s MAC address.
This means that even if you’re not using a managed LXD bridge with DHCP, if there has been some activity between the VM guest and the host (or the wider network), LXD should be able to display the IP information.