-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reconfigure GPU passthrough on the test cluster
We need to demo GPU passthrough so this reconfigures the test cluster to pass through GPUs for VMs. Note that this will trigger a machineconfig update on the test cluster.
- Loading branch information
Showing
8 changed files
with
87 additions
and
0 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
12 changes: 12 additions & 0 deletions
12
cluster-scope/overlays/nerc-ocp-test/machineconfigs/pci-passthrough/100-worker-iommu.yaml
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,12 @@ | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
name: 100-worker-iommu | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
kernelArguments: | ||
- intel_iommu=on |
25 changes: 25 additions & 0 deletions
25
cluster-scope/overlays/nerc-ocp-test/machineconfigs/pci-passthrough/100-worker-vfiopci.yaml
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,25 @@ | ||
# Generated by Butane; do not edit | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
name: 100-worker-vfiopci | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.4.0 | ||
storage: | ||
files: | ||
- contents: | ||
compression: "" | ||
source: data:,options%20vfio-pci%20ids%3D10de%3A1db6%2C10de%3A20b0%0A | ||
mode: 420 | ||
overwrite: true | ||
path: /etc/modprobe.d/vfio.conf | ||
- contents: | ||
compression: "" | ||
source: data:,vfio-pci | ||
mode: 420 | ||
overwrite: true | ||
path: /etc/modules-load.d/vfio-pci.conf |
10 changes: 10 additions & 0 deletions
10
cluster-scope/overlays/nerc-ocp-test/machineconfigs/pci-passthrough/Makefile
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,10 @@ | ||
MACHINECONFIGS = \ | ||
100-worker-vfiopci.yaml | ||
|
||
%.yaml: src/%.bu | ||
butane -o $@ -d src $< | ||
|
||
all: $(MACHINECONFIGS) | ||
|
||
clean: | ||
rm -f $(MACHINECONFIGS) |
5 changes: 5 additions & 0 deletions
5
cluster-scope/overlays/nerc-ocp-test/machineconfigs/pci-passthrough/kustomization.yaml
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,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- 100-worker-iommu.yaml | ||
- 100-worker-vfiopci.yaml |
19 changes: 19 additions & 0 deletions
19
...ter-scope/overlays/nerc-ocp-test/machineconfigs/pci-passthrough/src/100-worker-vfiopci.bu
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,19 @@ | ||
variant: openshift | ||
version: 4.15.0 | ||
metadata: | ||
name: 100-worker-vfiopci | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
storage: | ||
files: | ||
- path: /etc/modprobe.d/vfio.conf | ||
mode: 0644 | ||
overwrite: true | ||
contents: | ||
inline: | | ||
options vfio-pci ids=10de:1db6,10de:20b0 | ||
- path: /etc/modules-load.d/vfio-pci.conf | ||
mode: 0644 | ||
overwrite: true | ||
contents: | ||
inline: vfio-pci |
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,12 @@ | ||
apiVersion: hco.kubevirt.io/v1beta1 | ||
kind: HyperConverged | ||
metadata: | ||
name: kubevirt-hyperconverged | ||
namespace: openshift-cnv | ||
spec: | ||
permittedHostDevices: | ||
pciHostDevices: | ||
- pciDeviceSelector: "10DE:1DB6" | ||
resourceName: "nvidia.com/GV100GL_Tesla_V100" | ||
- pciDeviceSelector: "10DE:20B0" | ||
resourceName: "nvidia.com/A100_SXM4_40GB" |
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 |
---|---|---|
|
@@ -3,3 +3,6 @@ kind: Kustomization | |
namespace: openshift-cnv | ||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- path: hyperconverged.yaml |