forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The type extracts PCI IDs from SRIOV-VF-PCI-ADDR environment variable set by SR-IOV CNI plugin; and configures hostdev libvirt devices that corresponds to the extracted IDs. The change mounts additional host mounts for /sys and /dev to allow containerized libvirt / qemu to plug pci devices using vfio kernel interface. Note that at this moment, SR-IOV enabled VMIs run their virt-launcher pods privileged to allow qemu open /dev/vfio/NN devices. We don't know in advance the name of the device until we create and start the pod, at which point SR-IOV DP allocates a PCI ID to the pod that can be mapped to its IOMMU group number and hence /dev/vfio/NN device. In the future, SR-IOV DP will register the /dev/vfio/NN device with device cgroup, at which point we will be able to drop the privileged mode. (Additional capabilities like SYS_RESOURCE and SYS_RAWIO are still needed.) This work is tracked in: k8snetworkplumbingwg/sriov-network-device-plugin#26
- Loading branch information
Showing
16 changed files
with
501 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apiVersion: kubevirt.io/v1alpha2 | ||
kind: VirtualMachineInstance | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
special: vmi-sriov | ||
name: vmi-sriov | ||
spec: | ||
domain: | ||
devices: | ||
disks: | ||
- disk: | ||
bus: virtio | ||
name: registrydisk | ||
volumeName: registryvolume | ||
- disk: | ||
bus: virtio | ||
name: cloudinitdisk | ||
volumeName: cloudinitvolume | ||
interfaces: | ||
- bridge: {} | ||
name: default | ||
- name: sriov-net | ||
sriov: {} | ||
machine: | ||
type: "" | ||
resources: | ||
limits: | ||
intel.com/sriov: "1" | ||
requests: | ||
intel.com/sriov: "1" | ||
memory: 1024M | ||
networks: | ||
- name: default | ||
pod: {} | ||
- multus: | ||
networkName: sriov-net | ||
name: sriov-net | ||
terminationGracePeriodSeconds: 0 | ||
volumes: | ||
- name: registryvolume | ||
registryDisk: | ||
image: registry:5000/kubevirt/fedora-cloud-registry-disk-demo:devel | ||
- cloudInitNoCloud: | ||
userData: | | ||
#!/bin/bash | ||
echo "fedora" |passwd fedora --stdin | ||
dhclient eth1 | ||
name: cloudinitvolume | ||
status: {} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.