Building a 100G InfiniBand Home Lab with ConnectX-4 and ESXi

I’m working towards NVIDIA’s AI networking certifications, NCP-AIN (AI Networking). For years I’ve done BGP, EVPN and leaf-spine fabrics. What’s new to me is the AI side: RDMA, InfiniBand, lossless Ethernet and NVIDIA’s tooling.

You can read about InfiniBand for weeks, but nothing beats watching a port go from Initializing to Active on your own hardware. So I built a small, real RDMA lab at home. This post covers why, what I bought, how it’s put together, the exact commands I used, and what the first tests showed, including a result that surprised me.

Why a physical lab?

InfiniBand is different. Its subnet manager, LIDs, partitions and the ib* diagnostic tools need real host adapters to be meaningful. I wanted the commands in my fingers, not just in my notes.

The goal was simple: two hosts, two 100G cards, one cable, and no switch. Two adapters connected back to back form the smallest InfiniBand fabric there is. One host runs the subnet manager, and everything else follows from that.

The hardware

PartWhat I usedWhy
ServerHPE ProLiant DL380 Gen9: 2 × Xeon (28 cores / 56 threads), 320 GB RAM, VMware ESXi 7.0 Update 3Already in my rack. Plenty of PCIe slots and memory for lab VMs.
Adapters2 × Mellanox ConnectX-4 MCX455A-ECAT: single-port 100G VPI (EDR InfiniBand or 100GbE), HPE-compatible versionCheap on the second-hand market, and they do real RDMA over both InfiniBand and RoCE
CableMellanox MCP1600 QSFP28 passive copper DAC, EDR 100GA direct-attach copper cable is the cheapest reliable way to connect two cards a short distance apart
SwitchNone: the cards connect back to backThe subnet manager runs on one of the hosts
Two Mellanox ConnectX-4 MCX455A 100G cards in their trays with a Mellanox MCP1600 QSFP28 DAC cable
The whole fabric: two ConnectX-4 MCX455A cards and one MCP1600 DAC cable.

Why HPE-compatible cards matter

HPE servers watch what’s plugged into their PCIe slots. A third-party card the server doesn’t recognise can make iLO assume the worst about cooling and run the fans much faster. In a home office, that’s the difference between a quiet server and a jet engine. So I asked the vendor for HPE-compatible cards. The firmware confirms it: both report an HP board ID (PSID HP_2180110032) on firmware 12.24.1000.

Where the cards went: primary x8 riser and secondary x16 riser

The DL380 Gen9 has two PCIe riser cages at the back. I put one card in each, mainly to spread the heat: these cards have passive heatsinks and run warm, relying on the server’s airflow.

  • Primary riser: slots 1–3, wired to CPU 1. The slots are x16-sized, but every one is wired x8.
  • Secondary riser: slots 4–6, wired to CPU 2. Slots 4 and 5 are true x16; slot 6 is x8.

That difference turned out to matter. More on that in the results.

HPE ProLiant DL380 Gen9 with the lid off, showing the two PCIe riser cages at the rear above the CPUs and memory
DL380 Gen9 with the lid off. The two riser cages sit at the back, with one ConnectX-4 in each.

The virtual side

Each card is handed straight to its own Ubuntu virtual machine with ESXi’s PCI passthrough (DirectPath I/O). The VM gets the real adapter, not a virtual copy.

Diagram: HPE DL380 Gen9 running ESXi with two Ubuntu VMs; each VM gets one ConnectX-4 through PCI passthrough, one from the primary x8 riser and one from the secondary x16 riser, and the cards are connected back to back with an MCP1600 DAC
The lab at a glance: two VMs, two passthrough cards, one cable. Click to enlarge.
  • Two VMs, ib-node1 and ib-node2: Ubuntu 24.04, 4 vCPU, 16 GB RAM, 60 GB disk
  • Memory fully reserved: passthrough requires it, because the card must be able to write into guest memory at any time
  • One management NIC each on my lab network, for SSH
  • Built from Ubuntu’s cloud image with cloud-init: no installer to click through. A small config disk sets the hostname, user, SSH key and static IP on first boot.

A note on how I built it: I used Claude Code to do the ESXi plumbing over SSH. That covered creating the VMs, the passthrough settings and the cloud-init files. I set one rule: it had to show me the plan and get my approval before changing anything on the host, and log every command in a runbook. The InfiniBand work itself I do by hand, because that’s what I wanted to learn.

The commands

1. Build the VMs

On the laptop, convert Ubuntu’s cloud image and make a cloud-init “seed” CD for each VM:

# convert the Ubuntu 24.04 cloud image to a VMDK that ESXi can import
qemu-img convert -O vmdk -o subformat=monolithicSparse \
  ubuntu-24.04-server-cloudimg-amd64.img base.vmdk

# cloud-init seed CD: hostname, user, SSH key, static IP
hdiutil makehybrid -iso -joliet -default-volume-name cidata \
  -o seed-ib-node1.iso seed-ib-node1/

On the ESXi host, over SSH:

# native thin disk, grown to 60 GB
vmkfstools -i base.vmdk -d thin ib-node1.vmdk
vmkfstools -X 60G ib-node1.vmdk

# register the VM and start it
vim-cmd solo/registervm /vmfs/volumes/<datastore>/ib-node1/ib-node1.vmx ib-node1
vim-cmd vmsvc/power.on <vmid>

The important lines in the VM’s .vmx file are the reserved memory, the passed-through card and a fixed MAC address:

numvcpus = "4"
memSize = "16384"
sched.mem.min = "16384"              # passthrough needs all memory reserved
sched.mem.pin = "TRUE"
pciPassthru0.present = "TRUE"
pciPassthru0.id = "00000:005:00.0"   # host PCI 05:00.0 (node2: 00000:136:00.0)
pciPassthru0.vendorId = "0x15b3"     # Mellanox
pciPassthru0.deviceId = "0x1013"     # ConnectX-4
ethernet0.addressType = "static"
ethernet0.address = "00:50:56:08:00:41"

The cloud-init network config matches the management NIC by MAC address (see the lessons below for why):

version: 2
ethernets:
  mgmt0:
    match:
      macaddress: "00:50:56:08:00:41"
    set-name: mgmt0
    addresses: [192.168.x.41/24]

2. Install the InfiniBand tools (both VMs)

sudo apt install -y rdma-core infiniband-diags ibverbs-utils perftest opensm mstflint

# the cloud image's kernel lacks the RDMA half of the driver
sudo apt install -y linux-modules-extra-$(uname -r)
sudo modprobe mlx5_ib ib_umad ib_ipoib

3. Test the link

# physical link, before any subnet manager runs
ibstat

# bring the fabric up and check it
sudo systemctl start opensm
sminfo
iblinkinfo

# InfiniBand-level ping (no IP involved)
ibping -S                       # on node2
ibping -c 5 <node2-LID>         # on node1

# RDMA bandwidth and latency: server on node2, client on node1
ib_write_bw  -d ibp3s0 --report_gbits -F               # node2
ib_write_bw  -d ibp3s0 --report_gbits -F <node2-ip>    # node1
ib_write_lat -d ibp3s0 -F                              # node2
ib_write_lat -d ibp3s0 -F <node2-ip>                   # node1

# what PCIe link did the card actually get?
sudo mstlink -d 03:00.0 --port_type PCIE

First light: is the link up?

With the drivers loaded and no subnet manager running yet, ibstat on either node showed this:

Port 1:
    State: Initializing
    Physical state: LinkUp
    Rate: 100
    Base lid: 65535
    SM lid: 0
    Link layer: InfiniBand

This is the classic InfiniBand lesson in one screen. Physical state LinkUp at rate 100 means the cards, the cable and the link training are all fine. State Initializing with no SM LID means nobody has configured the port yet. InfiniBand switches and adapters don’t decide anything themselves; a subnet manager discovers the fabric, assigns addresses (LIDs) and programs every path.

Starting OpenSM changed that within seconds:

$ sminfo
sminfo: sm lid 2 ... priority 0 state 3 SMINFO_MASTER

$ iblinkinfo
CA: ib-node2 ibp3s0:
  2  1[ ] ==( 4X 25.78125 Gbps Active/ LinkUp)==> 1  1[ ] "ib-node1 ibp3s0"

Both ports went Active and got LIDs 1 and 2. The link trained at 4X × 25.78 Gb/s, which is EDR (100G), on all four lanes.

Traffic tests

TestToolResult
InfiniBand-layer ping (no IP)ibping0% loss, ~46 µs round trip
RDMA write latencyib_write_lat0.84 µs typical
RDMA write bandwidthib_write_bw~47 Gb/s, with 1 or 8 queue pairs

Sub-microsecond latency between two VMs is exactly what RDMA promises. But 47 Gb/s on a 100G link? Getting the same number with one queue pair or eight told me this wasn’t a tuning issue. Something fixed was capping it.

The cable was fine. The slot wasn’t.

NVIDIA’s firmware tools can ask the card what PCIe link it actually negotiated. That’s more reliable than asking the VM, which only sees a virtual PCIe bus:

$ sudo mstlink -d 03:00.0 --port_type PCIE
ib-node1 (primary riser):    Link Width Active (Enabled): 8X (16X)
ib-node2 (secondary riser):  Link Width Active (Enabled): 16X (16X)

There it is. The card in the primary riser runs at PCIe Gen3 x8 although it supports x16, while the one in the secondary riser gets the full x16. HPE’s QuickSpecs confirm the primary riser’s slots are x16-sized but wired x8. Gen3 x8 carries about 63 Gb/s raw, which works out to roughly 45–50 Gb/s of real RDMA traffic. A link runs at the speed of its slowest end, so that one slot sets the ceiling.

I chose to leave it. Moving the card would put both warm cards in the same riser, and for a learning lab the subnet manager, partitions, failover and diagnostics behave exactly the same at 47 Gb/s.

Rule of thumb: when RDMA bandwidth is low but latency is perfect and adding queue pairs changes nothing, check the PCIe link before you touch the fabric.

Lessons from the build

  1. ESXi rejected my SSH key. ESXi 7 runs its SSH server in FIPS mode, which doesn’t accept ed25519 keys. An RSA key worked first time.
  2. The VMs booted with no network. My first netplan config matched the NIC by driver name (vmxnet3). That never applied at boot, and the interface stayed down. A fixed MAC address with a MAC-based match fixed it straight away.
  3. ibstat printed nothing. The NIC driver had loaded and even logged “Cable plugged”, but no RDMA device appeared. The Ubuntu cloud image ships a slimmed-down kernel package without the InfiniBand half of the driver (mlx5_ib). Installing linux-modules-extra fixed it.
  4. Ubuntu enables OpenSM on install. Both VMs ended up running a subnet manager at every boot. With equal priority, the one with the lowest GUID becomes master, exactly as the textbook says. Free subnet manager redundancy, which I’ll test on purpose next.
  5. Misleading names. lspci on ESXi still labelled the passthrough cards vmnic4/vmnic5. The authoritative check is the “Current Owner” field (VM Passthru).
  6. Opening the server can upset it. After I opened the chassis to check the risers, POST stopped with “X64 Exception Type 02 – NMI Detected”. Reseating the risers and cards fixed it. If you ever see that screen, check iLO’s Integrated Management Log first: it names the slot that faulted.

Leave a Comment

Your email address will not be published. Required fields are marked *