How do I add a second nic to my incus container?

I tried this, and failed:

$ incus config device add mycont-d eth3 nic
Error: Invalid devices: Device validation failed for "eth3": Failed loading device "eth3": Unsupported device type

Am I doing something wrong? How should I do it? Which are the valid types for this command? Isn’t nic one of them?

(My app needs a second network interface to run.)

You probably need to add some more parameters.

Here is an example of adding (moving) a WiFi adapter from host and into a system container.

incus config device add mycontainer wifi nic nictype=physical parent=wlx000f007ce055 name=wlan0

You should specify the nictype=physical, which adapter name on the host you are moving (parent=wlx000f007ce055) and perhaps what interface name it should have in the system container (name=wlan0). For the last part, if you do name=eth0, you would be masking any other default network interface with the same name.

Thanks! There’s surprisingly little information about this in the docs, I have to say.