containers / virtcontainers

A Go package for building hardware virtualized container runtimes
Apache License 2.0
139 stars 43 forks source link

vhost-user network link cannot be put to up state #668

Closed egernst closed 6 years ago

egernst commented 6 years ago

When testing vhost-user network interfaces with latest Kata and Clear Containers 3.0 runtime, I see that the link is not put into the up state inside the container. Further, when starting container with net admin capabilities, I cannot succeed in setting it up via: -ifconfig eth0 up -ip link set eth0 up

I see in dmesg in the guest: root@0539898df227:/# dmesg | grep eth0 [ 1.115661] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

When running a VM by hand, I see the link setup as expected (following directions @ https://wiki.fd.io/view/VPP/Use_VPP_to_connect_VMs_Using_Vhost-User_Interface)

egernst commented 6 years ago

@mcastelino -- any suggestions on where to look? During boot I had seen this as well before, but when trying to fix it after-the-fact in the container, the interface is still marked as not ready.

/cc @amshinde

egernst commented 6 years ago

I see the issue now -- need to ensure that hugepages/prealloc is enabled in the configuration.

Link behaves as expected.

mcastelino commented 6 years ago

@egernst can you clarify. hugepages/prealloc enabled on the host side right