Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

docs: Add some documentation details for VFIO #1080

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/Passing-Devices-with-Clear-Containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ to `vfio-pci` driver and then pass the IOMMU group that the device belongs to on
the docker command line.
For detailed steps to bind and unbind devices, see https://github.com/containers/virtcontainers#how-to-pass-a-device-using-vfio-passthrough

You can verify that the device is passed to the Clear Containers container by running
`lspci` command inside the container.

For the device to be visible inside the container under /dev, you need to pass /dev
while starting a container as shown below:

```
$ sudo docker run -it -v /dev:/dev --device=/dev/vfio/16 centos/tools bash
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be combined with the initial CLI example, and then perhaps explained as you did above.

There's no usefulness in passing it into the VM, but not the container, after all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amshinde per OCI spec, the devices are container specific resources. So this approach will work fine for docker containers. How do we plan to handle this for kubernetes PODs, where the devices may be spread across containers (i.e. each device belongs to a different container for example)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcastelino Containers in a k8 pod should share the same mount namespace eventually.

```

## Block Devices

Expand Down