Created attachment 1700836 [details] yaml_config_vm Description of problem: Interface name for sriov is found missing during vm setup. This is useful to track if vm is setup using which sriov or bridge basically to find the network backend. For vm with interfaces: interfaces: - masquerade: {} name: default - name: sriov-test-network sriov: {} rng: {} machine: type: '' resources: requests: memory: 1024Mi oc get vmi <> -o yaml shows: interfaces: - interfaceName: eth1 ipAddress: 10.129.2.104 ipAddresses: - 10.129.2.104 mac: 02:b1:38:00:00:08 name: default - interfaceName: eth0 ipAddress: 10.46.41.129/24 ipAddresses: - 10.46.41.129/24 - 2620:52:0:2e29:b1:38ff:fe00:9/64 - fe80::b1:38ff:fe00:9/64 mac: 02:b1:38:00:00:09 Version-Release number of selected component (if applicable): # oc get csv -n openshift-cnv | awk ' { print $4 } ' | tail -n1 2.4.0 How reproducible: always Steps to Reproduce: 1.Use the attached vm file to reproduce the issue. 2. 3. Actual results: interface name missing. Expected results: interface name should be displayed so that it's easy to understand the backend network. Additional info:
We are after the feature freeze. Since this bug affects only reporting, I'm deferring it to 2.6.
Fixed by https://github.com/kubevirt/kubevirt/pull/4335 Please see the known limitation in the Release notes of the PR: VMI status displays SRIOV interfaces with their network name only when they have originally been defined with an explicit MAC address in the VMI spec.
NOT FIXED ENVIRONMENT: ----------- (on BM with OCP 4.6 after CNV upgrade 2.5->2.6) CNV: 2.6.0 virt-launcher-container-v2.6.0-80 vmi config: ----------- interfaces: - masquerade: {} name: default - name: example-sriovnetwork sriov: {} macAddress: 02:01:00:00:00:00 vmi status: ----------- $ oc get vmi vmi-sriov -oyaml interfaces: - ipAddress: 10.128.2.143 ipAddresses: - 10.128.2.143 mac: 02:00:00:90:1b:8b name: default (sriov interface doesn't appear at all) from vmi console: ---------------- [fedora@vmi-sriov ~]$ ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 02:00:00:90:1b:8b brd ff:ff:ff:ff:ff:ff altname enp3s0 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 02:01:00:00:00:00 brd ff:ff:ff:ff:ff:ff altname enp2s1 altname ens1
Hi Yoav, Please post the whole vm/vmi yaml use used, including the cloud-init part and all the spec. Also please note that if you don't see the interface, it might be because you need to wait up to 2 minutes for the guest-agent to report the interfaces. Thanks
I see now that your VM doesnt have ip, this is what we must solve first by the right configuration. See please https://bugzilla.redhat.com/show_bug.cgi?id=1874812#c1 for how to config the cloud-init in the right way, it must use the right interface according MAC address, and the right nmcli commands.
Please use ip address command instead ip link.
Hi Or, after applying this yaml I still didnt see any other interfaces in vmi status, even after a few minutes: apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachineInstance metadata: labels: special: vmi-sriov name: vmi-sriov spec: domain: devices: disks: - disk: bus: virtio name: containerdisk - disk: bus: virtio name: cloudinitdisk interfaces: - masquerade: {} name: default - name: example-sriovnetwork sriov: {} macAddress: 02:01:00:00:00:00 rng: {} machine: type: "" resources: requests: memory: 1024M networks: - name: default pod: {} - multus: networkName: openshift-sriov-network-operator/example-sriovnetwork name: example-sriovnetwork terminationGracePeriodSeconds: 0 volumes: - containerDisk: image: kubevirt/fedora-cloud-container-disk-demo:latest name: containerdisk - cloudInitNoCloud: userData: | #cloud-config password: fedora chpasswd: { expire: False } bootcmd: - MAC=02:01:00:00:00:00 - IFACE=$(ip --brief l | grep $MAC | cut -f1 -d' ') - nmcli con add type ethernet con-name $IFACE ifname $IFACE - nmcli con mod $IFACE ipv4.addresses 10.200.3.1/24 ipv4.method manual connection.autoconnect-priority 1 ipv6.method ignore - nmcli con up $IFACE name: cloudinitdisk
Please make sure you have guest agent installed
ok bug is resolved because when you do see the sriov interface the name is shown. there is another bug though that secondary interface comes and goes in yaml status.guest os info.interfaces. Do we have a bug in bugzilla for it?
Not that i know of, maybe Geetika opened one about it, Can you please look if there is a bugzilla by Geetika, and if not open one please? Thanks
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Virtualization 2.6.0 security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:0799