Error attempting to attach LXD VM NIC to host's physical network interface

So to clarify.

  • Yes, really the physical network type is only suitable for use with ovn networks (at this time). @ru-fu and I did discuss the pros and cons of adding support for using physical networks to the physical NIC type. The pros are consistency, and the cons are that, even if it did work, it would only work for a single running instance at a time (because the parent NIC is transferred/taken over by the instance).
  • To share a physical NIC with multiple instances you can use macvlan NIC type (Linux Containers - LXD - Has been moved to Canonical) (if you don’t mind not being able to communicate with the host) or setting up a manual bridge with the physical interface connected and then using bridged NIC type (Linux Containers - LXD - Has been moved to Canonical) with the parent set to the bridge interface.

But when we were discussing this with @ru-fu we did add some notes to the physical NIC documentation (Linux Containers - LXD - Has been moved to Canonical):

A physical NIC provides straight physical device pass-through from the host. The targeted device will vanish from the host and appear in the instance (which means that you can have only one physical NIC for each targeted device).

The specific error you got suggests that the physical NIC is missing a udev slot name.
Perhaps its something to do with the type of NIC that hyperv is supplying in the guest.

1 Like