<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dylan Taft on Medium]]></title>
        <description><![CDATA[Stories by Dylan Taft on Medium]]></description>
        <link>https://medium.com/@dylantaft?source=rss-6151c022b6ab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QAuzBAqmui_rs979.</url>
            <title>Stories by Dylan Taft on Medium</title>
            <link>https://medium.com/@dylantaft?source=rss-6151c022b6ab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 03:09:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dylantaft/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[An Ex-Sysadmin’s Guide to RDMA backed storage]]></title>
            <link>https://medium.com/@dylantaft/an-ex-sysadmins-guide-to-rdma-backed-storage-89498816cc02?source=rss-6151c022b6ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/89498816cc02</guid>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[rdma]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[virtualization]]></category>
            <dc:creator><![CDATA[Dylan Taft]]></dc:creator>
            <pubDate>Wed, 26 Nov 2025 17:44:08 GMT</pubDate>
            <atom:updated>2025-11-27T06:12:52.361Z</atom:updated>
            <content:encoded><![CDATA[<p>This article hopes to serve as a high level outline of ROCE setup that is repeatable. <strong>The purpose of this guide is to help you build confidence with RDMA/ROCE in a small lab environment</strong>, so that the concepts make sense before you apply them in a production environment or work with your vendor’s professional services team to set this up.</p><p>This guide is heavily focused on Linux, but Windows SMBDirect on Server 2025 was also tested. Some of the configuration is similar between Windows and Linux — particularly “Data Center Bridging” configuration.</p><p>Background: I have worked for healthcare IT for around 20 years in various roles, starting as a systems operator, into tier III support, and then systems engineering. My syseng role involved installing and maintaining several IBM Power systems — a 750 and a pair of 770s at the time, as well as administrating a handful of windows systems in VmWare ESX and various middleware — RightFax, Progress\IPSwitch MoveIt products, Microsoft Configuration Manager, App-V\MDOP, Citrix, and several other systems. I have worked some with SAN equipment — brocade switches, EMC Unisphere, VNX, XTremIO. I am generalist. My current role involves SQL report writing, extracts, dataflow, and ETL.</p><p><strong>What is RDMA, why should you care?</strong></p><p>RDMA stands for remote direct memory access. It is supported over various networking protocols, including ROCE — RDMA over Converged Ethernet, and IWARP. This article will be focused on RDMA. RDMA allows for accelerated access to lots of hardware, including storage or GPUs for AI work. RDMA lets the NIC handle data movement directly into application memory, bypassing the CPU and OS kernel for transfers.</p><p><strong>What can it replace?</strong></p><p>For storage, it can replace Fibre Channel (FC) infrastructure — where you have a separate fabric in tandem to your regular networking fabric. ROCE operates as a layer 2 or 3 networking protocol over standard networking equipment. Hypothetically, on paper, converged fabric stands to be cheaper — you can spend all your money on data center switches, standard transceivers. On paper, latency also looks great, and throughput can be amazing as Ethernet fabrics are up to 800gbit or more these days.</p><p><strong>Why build this in a lab?</strong></p><p>While I am in an different professional role now, I do keep a lab environment to try and keep prior skills up to date. With all the changes with VmWare and Broadcom, plus my last professional experience is with FC, I felt time to re-up in case I ever have to fulfill this role again. I also wanted to gain an understanding — can this save costs, is it better than FC, is it faster? Is it stable? Without a sales team pushing a product, can I personally say it is good architecture?</p><p><strong>Challenges</strong></p><p>The documentation available on the internet references a lot of older methodology, proprietary scripts, tools, and or drivers. One goal of mine is to do this sort of in a reproducible way across generations of cards, and maybe even different branding, with standard open tooling.</p><p><strong>Braindump of relevant terminology</strong></p><p>Target-Generally represents the serving side of storage</p><p>Initiator-Generally represents the client side of storage access</p><p>NVMEoF - NVME over Fabrics — It is a standard protocol that allows for access to NVME drives over the wire. In practice, it also allows for access to any kind of block storage. This is implemented by the nvmet module in Linux to establish the server side “target”, and the nvme + nvme-fabrics modules for client, “initiator” access. Various “software defined SAN” middleware and initiator software exists as well for Windows and Linux, and likely even some storage arrays directly support this.</p><p>iSCSI\ISER- An older block level storage access protocol, which is also natively supported in linux — both establishing targets — targetcli — as well as connecting as an initiator — iscsiadm.</p><p>Lossless Fabric- TCP provides reliability, retransmits, SYN\ACK. ROCE v1 operates over raw ethernet frames, ROCE V2 operates over UDP. PFC allows for 8 “buckets” or traffic classes. When a switch buffer on a port for egress or ingress begins to fill, “pause” frames can be sent, which instructs a network endpoint to queue or hold sending data for a specific COS. Class of service(COS) id, or priority code point(PCP), commonly refer to the same field inside of the VLAN tag that classifies layer 2 traffic over ethernet frames. These identifiers are by custom 0–7 in order of highest to lowest priority. ROCE traffic is often delegated to COS code 3.</p><p><strong>Lab Hardware</strong></p><p>This was set up over a pair of Intel N150 hosts, a Cisco Nexus C3132Q-40GX switch, a combination of Mellanox\Nvidia ConnectX 3 and 4 cards, and an Ampere Altra ARM system acting as a SAN hosting storage with the open source Linux NVMEoF target. Any switch that supports QOS, at least layer 2 PFC QOS, and VLANs should do. Network cards that support ROCE are key as well. ConnectX 3 only supports ROCE v1, ROCE V2 is recommended these days. The hardware platform should support SRIOV — think server grade, or industrial grade hardware. Sometimes SRIOV is broken in consumer hardware, caveat emptor. Everything is running Linux, a mix of Arch and Ubuntu Server.</p><p><strong>High level setup tasks</strong></p><ul><li>Configure switch</li><li>Configure nics</li><li>Test networking setup</li><li>Setup target software</li><li>Setup initiator software</li></ul><p><strong>Configure Switch</strong></p><p>We’ll want to use jumbo frames for performance, setup a vlan for storage, setup PFC QOS.</p><p>On Cisco Nexus, this can look like setting up a network-qos policy map, with MTUs configured, and no drop for class</p><pre>class-map type qos match-any cm_qos_roce<br>  match cos 3<br>policy-map type qos pm_nq_roce<br>  class cm_qos_roce<br>  class class-default<br>policy-map type qos pm_qos_roce<br>  class cm_qos_roce<br>    set qos-group 3<br>  class class-default<br>policy-map type queuing pm_que_roce<br>  class type queuing class-default<br>    priority level 3<br>    pause priority-group 3<br>class-map type network-qos c_nq_roce<br>  match qos-group 3<br>policy-map type network-qos pm_nq_roce<br>  class type network-qos c_nq_roce<br>    mtu 9216<br>    pause no-drop<br>  class type network-qos class-default<br>    mtu 9216<br>system qos<br>  service-policy type network-qos pm_nq_roce</pre><p>This is effectively saying, cos tagged 3 traffic will have an MTU of 9216, and will not drop frames even if we’re busy. Pause frames will be sent to prevent buffer overflow. MTU on this older switch is set in the system qos policy oddly. Don’t just paste this into your switch, it may only apply to 3000 series exactly as stated but the end goal is the same.</p><p>We will want to create a vlan traffic. Nic firmware can be inconsistent about using no vlan, vlan 0, or 1, as the COS id is set in the vlan tag.</p><pre>vlan 10<br>  name prio-vlan</pre><p>We will want to configure any ports with storage traffic with the vlan, making sure PFC is on, making sure we’re using the queuing and cos policies. Using trunk mode or not will depend on other traffic on the port.</p><pre>interface Ethernet1/3<br>  switchport mode trunk<br>  switchport trunk allowed vlan 1,10<br>  priority-flow-control mode on<br>  priority-flow-control watch-dog-interval on<br>  service-policy type qos output pm_qos_roce<br>  service-policy type qos input pm_qos_roce<br>  service-policy type queuing input pm_que_roce<br>  no shutdown</pre><p><strong>Configure NICs</strong></p><p>I am covering layer 2 QOS only. It is also recommended to do layer 3 QOS, for example ECN with DSCP tagging for ROCE v2, but layer 2 QOS is often still a baseline below layer 3 QOS. Nvidia does provide documentation for Windows on how to do nic driver level QOS, where the driver has a back off mechanism when it starts detecting issues — I think it is a last resort, however.</p><p>Unfortunately, there is a lot of conflicting documentation on the internet for this, use of proprietary tools, and AI will give a lot of bad information.</p><p>You will likely want to use SRIOV if you wish to use a single port for multiple types of traffic — converged fabric.</p><p>To turn on SRIOV, on ConnectX 4, you write values to devices in /sys.<br>“Probe” gives you a device bound to mlx5_core which you can use as a regular nic. It is not needed if you are using the VFs as SRIOV virtual machine passthrough but we want to use a VF for hardware VLAN and COS tagging. There is a newer configuration as well — called switchdev mode, which replaces the probe devices with “representor” devices. This article does not cover that, and it seems to disable ROCE v1 backwards compatibility. It offers better flexibility for open vswitch software. There are lots of guides for this and it provides a standard interface.</p><p>The PCI addresses below are determined by lspci -v, the rdma devices are determined by the command “rdma link”</p><pre><br>echo 1 &gt; /sys/devices/pci0000:00/0000:00:1d.0/0000:06:00.0/sriov_drivers_autoprobe<br>echo 0 &gt; /sys/devices/pci0000:00/0000:00:1d.0/0000:06:00.1/sriov_drivers_autoprobe<br>echo 4 &gt; /sys/devices/pci0000:00/0000:00:1d.0/0000:06:00.0/sriov_numvfs<br>echo 0 &gt; /sys/devices/pci0000:00/0000:00:1d.0/0000:06:00.1/sriov_numvfs<br><br>#only do this below if you need Roce V1 mode.<br>for dev in rocep6s0f0v0 rocep6s0f0v1 rocep6s0f0; do<br>  mkdir -p /sys/kernel/config/rdma_cm/$dev<br>  if [ -d /sys/kernel/config/rdma_cm/$dev/ports/1 ]; then<br>    echo &#39;IB/RoCE v1&#39; &gt; /sys/kernel/config/rdma_cm/$dev/ports/1/default_roce_mode<br>  fi<br>done</pre><p>ip link set enp6s0f0np0 help<br>On ConnectX 4 and newer, you can configure a VF in SRIOV mode for VLAN and COS tagging.</p><p>The method to do this is ip link set device X vf # vlan ID# qos # trust on. Trust allows a VF of a nic in SRIOV higher level hw controls, and the ability to accept packets in promiscuous mode for bridging. In my case, I am using VLAN 10, and COS 3 — per the class map cm_qos_roce — this causes the QOS policies to be applied!</p><p>There are many ways to skin this cat — systemd networkctl can do complete control of this as well with an “[SR-IOV]” section in the config files. <br>Check out the man page</p><p><a href="https://manpages.debian.org/bullseye/systemd/systemd.network.5.en.html">systemd.network(5) — systemd — Debian bullseye — Debian Manpages</a></p><p>VirtualFunction, VLANId, QualityOfService, Trust are of interest. It is case sensitive.</p><p>The end goal, you want a VF to tag your storage vlan and cos id.</p><p>Note:<br>On Windows — this can be done with DCBQos Datacenter Bridging powershell commands. You can turn on QOS by application .exe. <br>On Linux, there is also dcb app, dcb pfc, dcb rewr. dcb app seems to be better supported on ConnectX 3, you can flag outbound traffic by ethertype. dcb app by ethertype does not work on ConnectX 4, though other options may work.</p><p>There are also firmware settings — this tool below can help you get at them</p><p><a href="https://github.com/Mellanox/mstflint">Mellanox/mstflint: Mstflint — an open source version of MFT (Mellanox Firmware Tools)</a></p><p>lspci -v shows the address of the device in your system</p><p>[root@tiny01 mstflint]# mstconfig -d 06:00.0 q</p><p>Some settings of interest — SRIOV_EN, NUM_OF_VFS,ROCE_CC_PRIO_MASK_P1, ROCE_CC_PRIO_MASK_P2. Different model cards are different, but you want to have SRIOV capabilities, and mask is usually set to 255 which allows any COS value to be used for pause frames. Nvidia’s site has more information on this.</p><p>For ConnectX 3, module parameters are used.</p><p>Ie enable COS 3, 2 VFs, 2 probe devices — normally done in modprobe.d. This is NOT an option on newer cards, newer cards use dcb, firmware, or /sys config variables.</p><pre>options mlx4_en pfctx=3 pfcrx=3 <br>options mlx4_core debug_level=1 probe_vf=2 num_vfs=2</pre><p>As every flavor of Linux uses it’s own network configuration stuff — Ubuntu’s netplan, Systemd’s networkctl and config files, networkmanager, etc, I can only really document the gist of what we want to do — have a dedicated vlan that QOS tags.</p><p>ConnectX 3 is also limited to what VFs can do. I don’t recommend using those cards. In my experience the VFs cannot be added to a software bridge either. Newer cards are fine. On ConnectX 3, qos tagging seems to be limited to using dcb app, which will do tagging on vlan 0. ConnectX 4 cards seem to refuse to do this. The switch can rewrite the vlan. Unfortunately, it’s messy to combine traffic on ConnectX 3, and tooling seems to be more consistent for CX4, and newer cards I am sure.</p><p>TC flower is sometimes also used for QOS tagging; it is not always hardware offloaded so be cautious and confirm.</p><p>A couple final notes and thoughts -</p><p>Some switches support DCBX — this is a configuration where the switch informs the nics how to self configure QOS settings. On windows, participating in that is a driver setting. There is also a firmware setting to turn it on\off.</p><p>Microsoft Windows —it is pretty consistent with how datacenter bridging configuration works with powershell and vlan tagging in the nic. It’s not as flexible, but it also just works. SMBDirect seems to be broken on Windows 11 at the time of this writing which is one of the few use cases for it on Windows, but it works on Server 2025. Starwind also makes an NVMEoF initiator for Windows that supports ROCE, I tested it, it seems to work well. The guides for this on google are fine, simply search Microsoft Data Center Bridging PFC QOS setup.</p><p><strong>Test networking setup</strong></p><p>Check out your QOS groups on your switch while generating traffic with iperf3 — ie on one QOS configured system do iperf3 -s, and on the other do iperf3 -c .<br>If the switch is showing QOS Group 3 traffic, that’s great. You should see no dropped frames. Try oversubscribing a port, 2:1, flooding one of the ports with two clients burying the listening side. You should the COS groups go in and out of pause, and still no dropping. This means it’s working; you set up lossless fabric.</p><pre>show queuing interface ethernet 1/32<br>+-------------------------------------------------------------------+<br>|                              QOS GROUP 3                          |<br>+-------------------------------------------------------------------+<br>|                |  Unicast       | OOBFC Unicast  |  Multicast     |<br>+-------------------------------------------------------------------+<br>|        Tx Pkts |       358342354|               0|              97|<br>|        Tx Byts |    835683823668|               0|            8618|<br>|   Dropped Pkts |               0|               0|               0|<br>|   Dropped Byts |               0|               0|               0|<br>|   Q Depth Byts |               0|               0|               0|<br>+-------------------------------------------------------------------+</pre><p>If you want to go further, now may be a good time to set up bandwidth guarantees by traffic class, if your switch supports this, giving you an exit strategy if the port gets very busy. This is just a thought for building a robust solution with some tunable levers if your fabric ever becomes oversubscribed.</p><p><strong>Setup Target</strong></p><p>The nvmet target for Linux is a bit obtuse with Kernel ConfigFS, however it works and works well, and is documented well enough that I don’t have to go over it again here.</p><p>See, as an example — Redhat Documentation</p><p><a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/managing_storage_devices/configuring-nvme-over-fabrics-using-nvme-rdma">Chapter 10. Configuring NVMe over fabrics using NVMe/RDMA | Managing storage devices | Red Hat Enterprise Linux | 10 | Red Hat Documentation</a></p><p>There is also nvmetcli which uses python, and I did stumble upon nvmetcfg written in rust.</p><p><a href="https://github.com/vifino/nvmetcfg">vifino/nvmetcfg: NVMe-oF Target Configuration Utility for Linux</a></p><p>I am using nvmetcfg, my config file looks something like this — I am not passing raw NVME devices but LVM LVs, over both RDMA and TCP, allowing all devices to connect on the vlan. For security, you may wish to control access via various methods, port vlan controls, nvmet allowed hosts, etc. It’s not too different from FC or iSCSI though. Effectively zone it, map it, and initiators have access….there does appear to be ways to do TLS but I am not sure that is an industry norm for storage fabrics, maybe for the data itself sometimes — data at rest.</p><pre>version: 0<br>subsystems:<br>  test:<br>    model: Linux<br>    serial: e8a1ec4de534086dc46f<br>    allowed_hosts: []<br>    namespaces:<br>      10:<br>        enabled: true<br>        device_path: /dev/datavg00/sanlocklv<br>      11:<br>        enabled: true<br>        device_path: /dev/datavg00/vmlv00<br>      12:<br>        enabled: true<br>        device_path: /dev/datavg00/vmlv01<br>ports:<br>  1:<br>    port_type: Rdma<br>    port_addr: 192.168.1.1:4420<br>    subsystems:<br>    - test<br>  2:<br>    port_type: Rdma<br>    port_addr: 192.168.2.1:4420<br>    subsystems:<br>    - test<br>  3:<br>    port_type: Tcp<br>    port_addr: 192.168.1.1:4421<br>    subsystems:<br>    - test<br>  4:<br>    port_type: Tcp<br>    port_addr: 192.168.2.1:4421<br>    subsystems:<br>    - test</pre><p><strong>Setup initiator</strong></p><p>Even easier.</p><pre>modprobe nvme_fabrics.<br>nvme connect -t rdma -n test -a 192.168.2.1 -s 4420</pre><p>Starwind’s NVMEoF initiator on windows isn’t complicated to use either.</p><p><strong>Tuning</strong></p><p>Tuning for RDMA and storage performance is not well documented for the inbox Mellanox/NVIDIA drivers shipped with most Linux distributions. The out-of-tree MLNX_OFED drivers expose more tunables, but in practice the defaults for the inbox drivers work well.</p><p>One impactful tunable stands out —</p><p>/sys/block/nvmeXnX/queue</p><p>max_sectors_kb — This value defines the maximum size (in KB) of a single I/O request the kernel will issue to the device. For NVMe, the theoretical limits are large, but in real RDMA-based stacks (NVMe-oF, shared LVM over RDMA, etc.) very large I/O requests can overwhelm hardware queues — especially on older ConnectX cards.</p><p>A quick way to test how your underlying storage behaves at different request sizes is with a simple read test:</p><pre>dd if=/dev/&lt;yourdev&gt; of=/dev/null bs=1M count=10000</pre><p>Try varying the bs= value. You’ll often see:</p><ul><li>Good throughput at moderate sizes (32K–512K)</li><li>Severe falloff at very large block sizes (1M–4M+)</li></ul><p>As an example, this can impact use of tools like pvmove on LVM storage — it might read\write to disk by physical extent size, which defaults to 4 megs.</p><p>Definitely test your workload.</p><p><strong>Putting it all together — Example use case — Incus shared storage for VMs</strong></p><p>Incus has an LVMCluster driver. <br>As an example — if you have a NVMEoF block device exposed to two systems over ROCE</p><pre>incus storage create vmvg00 lvmcluster source=/dev/nvmeXnX --target yourhost1<br>incus storage create vmvg00 lvmcluster source=/dev/nvmeXnX --target yourhost2<br>incus storage create vmvg00 lvmcluster source=/dev/nvmeXnX</pre><p>Behind the scenes, this is doing vgcreate — shared vmvg00 /dev/nvmeXnX, vgchange — lockstart vmvg00</p><p>Using shared storage over fabrics allows you to quickly move VM guests between hosts</p><p><strong>Performance</strong></p><p>I did not heavily test performance, intentionally, with this setup. My lab systems have the NICs in PCI 3.0 x4 slots, the cards are built for x8. I have done lightweight testing on a much faster system with Starwind’s initiator, and it was fast, a couple GB/sec. IOPS were falling off around 100k, but I think it is more of a matter of tuning parallelization and queues. This is a mixture of consumer and older enterprise gear, and my VM hosts are Intel N150, so probably not worth doing a deep dive here. I have full confidence however that NVMEoF over ROCE is performant, properly configured.</p><p><strong>Final thoughts</strong></p><p>FC over separate fabrics is well entrenched in storage networks, especially in medium sized shops. Converging storage and network fabrics to Ethernet absolutely has cost benefits, which can result in performance benefits. You can focus capital investments on shared network infrastructure. There are “soft” non technical pitfalls; using ROCE crosses multiple knowledge domains. Your systems admins need to be aware of NIC configuration and networking specifics in regards to QOS. Your network team will have to contend with another heavy bandwidth demand. Your storage team will need more than shallow knowledge about switch and system configuration. FC mostly “just works” — you zone some WWNs, map some disks — perhaps there is some vendor provided tuning for queue depths, and the disks spin. Or maybe they don’t spin anymore but you understand. ;)</p><p>Converging fabrics may also require convergence of your IT teams, as the setup severely crosses multiple domains. It does work, and can save costs on hardware, and it does perform very well, bringing these new challenges to the table. I would be comfortable using RDMA backed storage in a production environment; teams involved will need cross-training and a sense of universal ownership to be successful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89498816cc02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing VFIO GPU passthrough on Ampere Altra]]></title>
            <link>https://medium.com/@dylantaft/testing-vfio-gpu-passthrough-on-ampere-altra-37796fd0b6ff?source=rss-6151c022b6ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/37796fd0b6ff</guid>
            <dc:creator><![CDATA[Dylan Taft]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 17:32:09 GMT</pubDate>
            <atom:updated>2025-08-27T17:44:15.146Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been the owner of an ALTRAD8UD-1L2T + Ampere Altra Q64–22 setup for a while. It works fantastic as a homelab system, and for CPU AI inference with slightly larger models than typical to run at home, like Meta’s Llama Scout.</p><p>Two common open source virtualization solutions on Linux based platforms are libvirt, and LXC\LXD(<a href="https://canonical.com/lxd">Canonical LXD</a>). This article will cover use of LXC, however libvirt is fantastic as well (<a href="https://libvirt.org/">libvirt: The virtualization API</a>) and the process is similar.</p><p>LXD has also been forked, Incus (<a href="https://linuxcontainers.org/incus/">Linux Containers — Incus — Introduction</a>)</p><p>The short of it —</p><p>Install LXD — You can find instructions for this here <a href="https://canonical.com/lxd/install">Install LXD</a><br>You may wish to install the management web console — instructions for which can be found here — <a href="https://canonical.com/lxd/manage">LXD — Manage</a></p><p>There is a really cool utility — driverctl — which will allow you to set driver overrides that persist on reboot without modifying things like grub config files.<br>It is installed by default on Ubuntu — <a href="https://gitlab.com/driverctl/driverctl">driverctl / driverctl · GitLab</a></p><p>You will want to grab the PCI bus, device, and function numbers of your Nvidia GPU on the VM host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*6pVvvH7_qkDfjk9Xw47h6w.png" /></figure><p>For each device you will want to set the override to vfio-pci which acts as a placeholder module to prevent other drivers from taking control of your GPU. <br>In my case,</p><p>driverctl set-override 0001:01:00.0 vfio-pci</p><p>driverctl set-override 0001:01:00.1 vfio-pci<br>Etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*-BGR6y55bHiUxXfr_g_26A.png" /></figure><p>Reboot your machine if the device has been initialized.</p><p>Once rebooted, when you are creating a new VM — this is for whole virtual machines, not containers — <br>Add the PCI device from the webconsole or other the CLI utility when setting up or configuring an existing VM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*1jUoAm9FeP4WFK7ZGDHE5w.png" /></figure><p>From there, everything should “just work” — you may use the open source Nvidia or proprietary drivers in your VM — you may want to plug a monitor into your card.</p><p>I have not run into any stability or performance issues with this; it is pretty straightforward.</p><p>There are other ways to do this — an open source LXC passthrough method exists that appears primarily for CUDA based workloads.</p><p>Nvidia has some limited what looks like open-source SR-IOV support for enterprise cards, and possibly the 20 and 40 series cards.<br><a href="https://www.phoronix.com/news/NVIDIA-Open-GPU-Virtualization">NVIDIA Publishes Open-Source Linux Driver Code For GPU Virtualization “vGPU” Support — Phoronix</a></p><p>vGPU may otherwise require proprietary drivers and licenses. You may want to go this avenue if you want to share a GPU with acceleration across several VMs for actual rendering, not just CUDA.</p><p>VFIO\PCI passthrough is mature on the Ampere platform, and works with common setups like ConnectX Infiniband\Ethernet devices — to split a high performance physical device across multiple VMs without emulated NICs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37796fd0b6ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>