Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View fasmide's full-sized avatar

Kristian Mide fasmide

  • Aalborg, Denmark
View GitHub Profile
@r15ch13
r15ch13 / iommu.sh
Last active April 11, 2024 09:23
List IOMMU Groups and the connected USB Devices
#!/usr/bin/env bash
shopt -s nullglob
lastgroup=""
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
for d in $g/devices/*; do
if [ "${g##*/}" != "$lastgroup" ]; then
echo -en "Group ${g##*/}:\t"
else
echo -en "\t\t"
@shamil
shamil / mount_qcow2.md
Last active April 22, 2024 00:38
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8