Skip to content

Instantly share code, notes, and snippets.

@claudiok
claudiok / OpenStack_consumer_GPU_passthrough.md
Last active March 26, 2023 08:20
Consumer-grade GPU passthrough in an OpenStack system (NVIDIA GPUs)

Consumer-grade GPUs in an OpenStack system (NVIDIA GPUs)

Assumptions

This assumes you have GTX980 cards in your system (PCI id 10de:13c0 & 10de:0fbb per card). Just add more IDs for other cards in order to make this more generic. This also assumes nova uses qemu-kvm as the virtualization hypervisor (qemu-system-x86_64). This seems to be the default on OpenStack Newton when installed using openstack-ansible.

We assume OpenStack Newton is pre-installed and that we are working on a Nova compute node. This has been tested on an Ubuntu 16.04 system where I installed OpenStack AIO version 14.0.0 (different from the git tag used in the instructions!): http://docs.openstack.org/developer/openstack-ansible/developer-docs/quickstart-aio.html

Prepare the system for GPU passthrough (set up IOMMU/vfio/...)

Note: This is heavily based on information from https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Enabling_IOMMU adapted for Ubuntu 16.04

@DennisLfromGA
DennisLfromGA / chrootbu
Last active May 8, 2021 23:21
Perfroms a chroot backup ensuring enough space is available.
#!/bin/sh
ANSWER=''
APPLICATION="${0##*/}"
AVAIL=''
AVAILGB=''
BACKTAG=''
BACKUP=''
CHROOT=''
CHROOTS=''
@hnyman
hnyman / 950-add-cake-to-tc.patch
Last active May 29, 2016 01:04
Cake support for tc in iproute2 v.4.4
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -877,4 +877,79 @@ struct tc_pie_xstats {
__u32 maxq; /* maximum queue size */
__u32 ecn_mark; /* packets marked with ecn*/
};
+
+/* CAKE */
+enum {
+ TCA_CAKE_UNSPEC,
@egel
egel / auto-remove-sublime-license-popup
Last active January 28, 2024 18:31
Auto-remove Sublime's license popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)