#!/bin/bash # # This script takes one argument, which is the mountpoint where the VHDX image was mounted. # Note: this is the second argument used when executing mount_vhdx.sh MOUNT_POINT="$1" #unmount & remove nbd module sudo umount "$MOUNT_POINT" && sudo qemu-nbd -d /dev/nbd0 && sudo rmmod nbd