Giter VIP home page Giter VIP logo

Comments (5)

mythi avatar mythi commented on August 23, 2024

You should be able to experiment with https://github.com/intel/sriov-network-device-plugin where the resourceList is be configured to expose your graphics card to a vfio device.

I've not tried with kubevirt but I'm using a similar mechanism to isolate (QAT) devices to Kata Containers backed pods.

from intel-device-plugins-for-kubernetes.

qmfrederik avatar qmfrederik commented on August 23, 2024

Thanks! I gave it a try, but I'm not entirely sure whether this is to work with virtualized GPUs, or would allow me to pass through an individual (physical) GPU?

I have created two vGPUs, which show up as /dev/vfio/9 and /dev/vfio/10.
When I deploy the daemonset for the sriov-network-device-plugin, only one device is listed.
Creating a pod which uses this device fails: Error: failed to start container "appcntr1": Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/vfio/1": no such file or directory.

Here's the configuration file:

{
    "resourceList":
    [
        {
            "resourceName": "gpu",
            "rootDevices": [ "00:02.0" ],
            "sriovMode": false,
            "deviceType": "vfio"
        }
    ]
}

And the output from describe pod:

I1205 13:36:09.720121      15 server.go:85] Allocate() called with &AllocateRequest{ContainerRequests:[&ContainerAllocateRequest{DevicesIDs:[0000:00:02.0],}],}
I1205 13:36:09.720239      15 vfioPool.go:76] vfio GetDeviceSpecs() called
I1205 13:36:09.720255      15 vfioPool.go:54] vfio GetEnvs() called
I1205 13:36:09.720272      15 vfioPool.go:70] vfio GetMounts() called
I1205 13:36:09.720279      15 server.go:94] AllocateResponse send: &AllocateResponse{ContainerResponses:[&ContainerAllocateResponse{Envs:map[string]string{PCIDEVICE_INTEL_COM_GPU: 0000:00:02.0,},Mounts:[],Devices:[&DeviceSpec{ContainerPath:/dev/vfio/vfio,HostPath:/dev/vfio/vfio,Permissions:mrw,} &DeviceSpec{ContainerPath:/dev/vfio/1,HostPath:/dev/vfio/1,Permissions:mrw,}],Annotations:map[string]string{},}],}

Let me know if missed something.

from intel-device-plugins-for-kubernetes.

mythi avatar mythi commented on August 23, 2024

@qmfrederik I was thinking about GVT-d so my idea won't work, sorry.

The link to your implementation points to GVT-g wiki.

from intel-device-plugins-for-kubernetes.

qmfrederik avatar qmfrederik commented on August 23, 2024

@mythi Makes sense, thanks.

The link should point to https://github.com/kubedroid/intel-device-plugins-for-kubernetes/blob/vgpu/cmd/vgpu_plugin/vgpu_plugin.go, I've updated the comment.

from intel-device-plugins-for-kubernetes.

msivosuo avatar msivosuo commented on August 23, 2024

Inactive for several years, if still valid please reopen.

from intel-device-plugins-for-kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.