Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

app node vm on the bastion #107

Closed
rmkraus opened this issue Dec 3, 2020 · 4 comments
Closed

app node vm on the bastion #107

rmkraus opened this issue Dec 3, 2020 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@rmkraus
Copy link
Member

rmkraus commented Dec 3, 2020

No description provided.

@rmkraus rmkraus added the enhancement New feature or request label Dec 3, 2020
@rmkraus
Copy link
Member Author

rmkraus commented Jul 30, 2021

Preparing node for gpu pass through

lspci -n | grep ': 10de:' | awk '{ print $3; }'
grubby --args="intel_iommu=on iommu=pt" --update-kernel=ALL
grubby --arg "pci-stub.ids=10de:1eb8" --update-kernel ALL
grub2-mkconfig -o /etc/grub2.cfg
grub2-mkconfig -o /etc/grub2-efi.cfg

add gpu to existing vm

lspci -Dn | grep 10de | awk '{ print "pci_" $1 }' | tr ':' '_'
virsh nodedev-dumpxml pci_0000_b1_00_0 > nvidia.xml
virsh attach-device bebd743b-17b9-4fcb-a200-d5339858adec nvidia.xml --persistent

@rmkraus
Copy link
Member Author

rmkraus commented Jul 30, 2021

add nvmes to existing vm

virsh attach-disk bebd743b-17b9-4fcb-a200-d5339858adec /dev/nvme0n1 sda --persistent
virsh attach-disk bebd743b-17b9-4fcb-a200-d5339858adec /dev/nvme1n1 sdb --persistent
virsh attach-disk bebd743b-17b9-4fcb-a200-d5339858adec /dev/nvme2n1 sdc --persistent
virsh attach-disk bebd743b-17b9-4fcb-a200-d5339858adec /dev/nvme3n1 sdd --persistent

@rmkraus
Copy link
Member Author

rmkraus commented Jul 30, 2021

listing stubbed devices

lspci -kD -d 10de: | egrep '(^[0-9a-z]|Kernel driver in use:)' | grep -B 1 'Kernel driver in use: pci-stub' | egrep '^[0-9a-z]'

listing mounted disks

lsblk --tree | egrep '((\/\S*$|\[SWAP\])|^[a-z])' | egrep -B 1 '^[^a-z]' | grep disk | awk '{ print $1 }'

listing UNmounted disks

grep -v "$(lsblk --tree | egrep '((\/\S*$|\[SWAP\])|^[a-z])' | egrep -B 1 '^[^a-z]' | grep disk | awk '{ print $1 }')" <<< $(lsblk -nd -o NAME)

@rmkraus
Copy link
Member Author

rmkraus commented Aug 9, 2021

Configure all nvidia devices for passthrough

grubby --arg "intel_iommu=on iommu=pt pci-stub.ids=$(lspci -n | grep ': 10de:' | awk '{ print $3; }' | xargs echo | tr ' ' ',')" --update-kernel ALL; grub2-mkconfig -o /etc/grub2.cfg; grub2-mkconfig -o /etc/grub2-efi.cfg

reboot

@rmkraus rmkraus added this to the 4.7.4 milestone Aug 9, 2021
@rmkraus rmkraus closed this as completed Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant