Skip to content

WIP mac POC#55

Draft
oshoval wants to merge 1 commit intok8snetworkplumbingwg:mainfrom
oshoval:mac
Draft

WIP mac POC#55
oshoval wants to merge 1 commit intok8snetworkplumbingwg:mainfrom
oshoval:mac

Conversation

@oshoval
Copy link
Member

@oshoval oshoval commented Dec 18, 2025

Quick and dirty POC

not reviewable, just for discussion please

If pod has this annotation
kubevirt.io/dra-network-macs: '{"sriov/vf":"de:ad:00:00:be:ef"}'
driver will pass the MAC to the CNI

Kubevirt side
kubevirt/kubevirt@8123de4

Didn't check what happens if the ResourceClaim.spec itself has a MAC.

Signed-off-by: Or Shoval <oshoval@redhat.com>
@coderabbitai
Copy link

coderabbitai bot commented Dec 18, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@oshoval
Copy link
Member Author

oshoval commented Dec 18, 2025

cc @SchSeba
lets discuss it please once you are back

Thanks

@oshoval
Copy link
Member Author

oshoval commented Dec 18, 2025

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: testvmi
  namespace: vf-test2
spec:
  runStrategy: Always
  template:
    metadata:
      labels:
        kubevirt.io/domain: testvmi
    spec:
      architecture: amd64
      domain:
        cpu:
          cores: 1
          maxSockets: 4
          model: host-model
          sockets: 1
          threads: 1
        devices:
          autoattachGraphicsDevice: false
          disks:
          - disk:
              bus: virtio
            name: disk0
          - disk:
              bus: virtio
            name: cloudinitdisk
          interfaces:
          - masquerade: {}
            name: default
          - sriov: {}
            name: red
            macAddress: "de:ad:00:00:be:ef"
          rng: {}
        features:
          acpi:
            enabled: true
        firmware:
          uuid: d7873366-c2b0-4a56-bfc2-1e1bee0a88db
        machine:
          type: q35
        memory:
          guest: 1Gi
        resources:
          requests:
            memory: 1Gi
      evictionStrategy: None
      networks:
      - name: default
        pod: {}
      - name: red
        resourceClaim:
          claimName: sriov
          requestName: vf
      terminationGracePeriodSeconds: 0
      resourceClaims:
      - name: sriov
        resourceClaimTemplateName: single-vf
      volumes:
      - containerDisk:
          image: quay.io/kubevirt/fedora-with-test-tooling-container-disk:devel
          imagePullPolicy: IfNotPresent
        name: disk0
      - cloudInitNoCloud:
          networkData: |
            ethernets:
              eth0:
                addresses:
                - fd10:0:2::2/120
                dhcp4: true
                gateway6: fd10:0:2::1
                match: {}
                nameservers:
                  addresses:
                  - 10.96.0.10
                  search:
                  - default.svc.cluster.local
                  - svc.cluster.local
                  - cluster.local
            version: 2
        name: cloudinitdisk

@oshoval
Copy link
Member Author

oshoval commented Dec 23, 2025

/cc @alaypatel07 @aojea

we didn't discuss it yet, but it is required
added it to the VEP as well
with this, all non migration related tests are passing on CI
https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/16381/pull-kubevirt-e2e-kind-sriov/2002654915230437376
no need to review yet, just adding you to the loop if desired, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant