kubevirt: VM crash with network passt mode

What happened: Once I create a VM with Passt mode, it crashed. It’s very strange, I tested it in 3 env. (both dual stack)

  1. PC with standard kubernetes cluter (it works well)

kubernetes version v1.25.4 Linux virtnest-rook-ceph-1 4.18.0-193.el8.x86_64 #1 SMP Fri May 8 10:59:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

  1. Kind A (it works well)

kubernetes version: v1.27.1 kind version: kind v0.19.0 go1.20.4 linux/amd64 kind node kernel: Linux spider-worker 6.5.5-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Sep 23 14:20:35 EDT 2023 x86_64 GNU/Linux

  1. Kind B (crash)

kubernetes version: v1.27.1 kind version: kind v0.16.0 go1.19.1 linux/amd64 kind node kernel: Linux spider-control-plane 6.4.0-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 26 18:48:41 EDT 2023 x86_64 GNU/Linux

What you expected to happen: work well

How to reproduce it (as minimally and precisely as possible): In my Kind B environment can reprocuded it 100%.

Steps:

1. kind version: kind v0.16.0 go1.19.1 linux/amd64 to set up a cluster
2. In one node, create VLAN sub-interfaces just like I have `eth0` in the node, create `eth0.30` as the sub-interface
5. use the following yaml to create a VM with Passt network mode and spiderpool macvlan underlay solution (create vlan sub-interface, macvlan, veth-pair and router to let Node reaches Pod):

apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: kubevirt-macvlan-vlan30
  namespace: kube-system
spec:
  config: '{"cniVersion":"0.3.1","name":"kubevirt-macvlan-vlan30","plugins":[{"vlanID":30,"type":"ifacer","interfaces":["eth0"]},{"type":"macvlan","master":"eth0.30","mode":"bridge","ipam":{"type":"spiderpool","default_ipv4_ippool":["default-v4-ippool"],"default_ipv6_ippool":["default-v6-ippool"]}},{"mode":"auto","type":"coordinator"}]}'
---
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  labels:
    kubevirt.io/vm: vm-passt
  name: vm-passt
spec:
  runStrategy: Always
  template:
    metadata:
      annotations:
        v1.multus-cni.io/default-network: kube-system/kubevirt-macvlan-vlan30
      labels:
        kubevirt.io/vm: vm-passt
    spec:
      domain:
        devices:
          disks:
          - disk:
              bus: virtio
            name: containerdisk
          interfaces:
          - name: default
            passt: {}
        resources:
          requests:
            memory: 1024M
      networks:
      - name: default
        pod: {}
      terminationGracePeriodSeconds: 0
      volumes:
      - containerDisk:
          image: kubevirt/cirros-container-disk-demo:latest
        name: containerdisk

Additional context:

The key is: virt-launcher pod panic, and the corresponding virt-handler lost connections with it and restart it again and again.

“dial unix //pods/cb7ee872-0e9c-443f-8959-965412db385b/volumes/kubernetes.io~empty-dir/sockets/launcher-sock: connect: connection refused”

launcher error is :

{“component”:“virt-launcher”,“level”:“fatal”,“msg”:“failed to create libvirt configuration”,“pos”:“podnic.go:214”,“reason”:“exit status 1”,“timestamp”:“2023-10-18T01:44:10.204283Z”} panic: failed to create libvirt configuration {“component”:“virt-launcher”,“level”:“info”,“msg”:“passt: No external routable interface for IPv4”,“pos”:“generators.go:295”,“timestamp”:“2023-10-18T01:44:10.203649Z”} {“component”:“virt-launcher”,“level”:“info”,“msg”:“passt: No external routable interface for IPv6”,“pos”:“generators.go:295”,“timestamp”:“2023-10-18T01:44:10.203672Z”}

error logs: I got virt-launcher logs and virt-handler logs: virt-launcher.log

virt-handler.log

Environment:

  • KubeVirt version (use virtctl version): v1.1.0-alpha.0
  • Kubernetes version (use kubectl version): N/A
  • Kernel (e.g. uname -a): N/A

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Hi @ormergi , I update the description and add kubernetes version. And you can notice the virt-launcher.log I uploaded is the full logs.

Yeah, I used our CNI or other else CNIs in Kind cluster. I would like to update the Kind version and test it again,Thanks for your reminder.