kata-containers / runtime

Kata Containers version 1.x runtime (for version 2.x see https://github.com/kata-containers/kata-containers).
https://katacontainers.io/
Apache License 2.0
2.1k stars 374 forks source link

Network:the network added via hotplug is not available when machine=q35 #861

Closed miaoyq closed 6 years ago

miaoyq commented 6 years ago

Description of problem

I set machine_type = q35, and created a kata container. When I attached a veth to the container, found the veth was unavailable,

@sboeuf


(replace this text with the output of the kata-collect-data.sh script, after you have reviewed its content to ensure it does not contain any private information).

grahamwhaley commented 6 years ago

I believe there are different PCI(e) hotplug features between q35 and 'pc' - iirc, q35 maybe PCI, not PCIe, and thus not have hotplug. /cc @devimc who did the original looking into this iirc.

sboeuf commented 6 years ago

@miaoyq you should be able (relying on latest agent and latest runtime) to hotplug some additional interfaces when using q35. But in case of q35, the root bus is not directly hotpluggable, which means that if you use hotplug_vfio_on_root_bus = true from configuration.toml, this won't work.

devimc commented 6 years ago

@miaoyq also please update kata kernel, SHPC must be enabled

miaoyq commented 6 years ago

@sboeuf Sorry for my delay, you're right :+1: I set hotplug_vfio_on_root_bus = true and machine_type = q35, it works well. Thanks.

@devimc Yes, SHPC have been enabled. Thanks for reminder. :-)

miaoyq commented 6 years ago

I will close this issue.

grahamwhaley commented 6 years ago

Glad this is now working - it makes me wonder though, are we missing some documentation here, or should it be in a better/clearer/easier-to-find place etc.?

miaoyq commented 6 years ago

@grahamwhaley There are instructions actually in configuration.toml. It would be better to have an explanation in the document I think. :-)