From c075fa6817c501eed106e77f07050e2633f1fd2c Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Tue, 7 Nov 2023 00:59:22 -0800 Subject: [PATCH] tests: Add test with nerdctl to verify macvlan support Add test to verify kata supports macvlan networks. Signed-off-by: Archana Shinde --- tests/integration/nerdctl/gha-run.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/integration/nerdctl/gha-run.sh b/tests/integration/nerdctl/gha-run.sh index 7a6c7ebaaf..e867d6c2e9 100644 --- a/tests/integration/nerdctl/gha-run.sh +++ b/tests/integration/nerdctl/gha-run.sh @@ -78,6 +78,15 @@ function run() { info "Running nerdctl with Kata Containers (${KATA_HYPERVISOR}) and ipvlan network" sudo nerdctl run --rm --net ${ipvlan_net_name} --runtime io.containerd.kata-${KATA_HYPERVISOR}.v2 alpine ip a | grep "eth0" + + # The following creates an ipvlan network with eth0 on host as parent. + macvlan_net_name="macvlan20" + info "Creating macvlan network with eth0 interface on host as parent" + sudo nerdctl network create ${macvlan_net_name=} --driver ipvlan --subnet=10.8.0.0/24 -o parent=${parent_interface} + + info "Running nerdctl with Kata Containers (${KATA_HYPERVISOR}) and macvlan network" + sudo nerdctl run --rm --net ${macvlan_net_name} --runtime io.containerd.kata-${KATA_HYPERVISOR}.v2 alpine ip a | grep "eth0" + } function main() {