https://0x41414141.de/blog/2021-12-31-vhdx-on-desinfect/
0
0
4
| 1 | #!/bin/bash |
| 2 | # |
| 3 | # This script takes one argument, which is the mountpoint where the VHDX image was mounted. |
| 4 | # Note: this is the second argument used when executing mount_vhdx.sh |
| 5 | |
| 6 | MOUNT_POINT="$1" |
| 7 | |
| 8 | #unmount & remove nbd module |
| 9 | sudo umount "$MOUNT_POINT" && sudo qemu-nbd -d /dev/nbd0 && sudo rmmod nbd |