mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-10 04:18:26 +00:00
runtime: enable vhost-net for rootless hypervisor
vhost-net is disabled in the rootless kata runtime feature, which has been abandoned since kata 2.0.
I reused the rootless flag for nonroot hypervisor and would like to enable vhost-net.
Fixes #3182
Signed-off-by: Feng Wang <feng.wang@databricks.com>
(cherry picked from commit b3bcb7b251
)
This commit is contained in:
parent
f068057073
commit
18bb9a5d9b
@ -27,7 +27,6 @@ import (
|
||||
|
||||
"github.com/kata-containers/kata-containers/src/runtime/pkg/katautils/katatrace"
|
||||
pbTypes "github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/agent/protocols"
|
||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/rootless"
|
||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/uuid"
|
||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/utils"
|
||||
)
|
||||
@ -440,12 +439,7 @@ func xConnectVMNetwork(ctx context.Context, endpoint Endpoint, h Hypervisor) err
|
||||
queues = int(h.HypervisorConfig().NumVCPUs)
|
||||
}
|
||||
|
||||
var disableVhostNet bool
|
||||
if rootless.IsRootless() {
|
||||
disableVhostNet = true
|
||||
} else {
|
||||
disableVhostNet = h.HypervisorConfig().DisableVhostNet
|
||||
}
|
||||
disableVhostNet := h.HypervisorConfig().DisableVhostNet
|
||||
|
||||
if netPair.NetInterworkingModel == NetXConnectDefaultModel {
|
||||
netPair.NetInterworkingModel = DefaultNetInterworkingModel
|
||||
|
Loading…
Reference in New Issue
Block a user