Closed networkop closed 3 years ago
When running with CLH as the VMM, the error log looks like this:
May 03 11:00:48 xps kata-runtime[307307]: time="2021-05-03T11:00:48.402362277+01:00" level=error msg="add interface failed" arch=amd64 command=kata-network container=dc15d5bb0e3a3d9274227d329e818d2039a3f4c4f07d26a8c0d4b294e595ea72 error="cannot hotplug device: unsupported device type '2'" name=kata-runtime pid=307307 resulting-interface="<nil>" sandbox=dc15d5bb0e3a3d9274227d329e818d2039a3f4c4f07d26a8c0d4b294e595ea72 source=runtime
May 03 11:00:48 xps kata-runtime[307307]: time="2021-05-03T11:00:48.402420499+01:00" level=error msg="cannot hotplug device: unsupported device type '2'" arch=amd64 command=kata-network container=dc15d5bb0e3a3d9274227d329e818d2039a3f4c4f07d26a8c0d4b294e595ea72 name=kata-runtime pid=307307 sandbox=dc15d5bb0e3a3d9274227d329e818d2039a3f4c4f07d26a8c0d4b294e595ea72 source=runtime
May 03 11:00:48 xps kata-netmon[306894]: time="2021-05-03T11:00:48.404259786+01:00" level=fatal msg="handleEvents()" error="exit status 1" name=kata-netmon pid=306894 sandbox=dc15d5bb0e3a3d9274227d329e818d2039a3f4c4f07d26a8c0d4b294e595ea72 source=netmon
Looks like CLH doesn't support hotplugging of network devices: https://github.com/kata-containers/runtime/blob/59e227336903383fcb04e0075e0b55cbd98c42bb/virtcontainers/clh.go#L471
Ha, looks like FC doesn't support it either https://github.com/kata-containers/runtime/blob/59e227336903383fcb04e0075e0b55cbd98c42bb/virtcontainers/fc.go#L1042
So, I guess this is by design, so feel free to close this issue. I'm just curious if it's possible to avoid hotplugging and connect multiple network interfaces before FC VM starts.. Is this possible?
It’s been a while… but I believe you can create a runc container, add a second interface to it, and then create a kata container that uses the net of the first runc container. This’ll result in a kata container running with two interfaces at boot, rather than relying in hotplug.
yep, perfect, just as I was hoping. thanks again @egernst :+1:
I'm trying to test the network hotplug functionality with
kata-fc
with netmon enabled. When adding a new interface to the container's namespace, it's not showing up inside the VM. At the same time the following can be observed in the logs:Inside the conainer's namespace, I can see both the new interface (eth1) and that corresponding tap interface (tap1_kata)
The same functionality works with QEMU VMM just fine. Is this supposed to work with FC and/or CLH?