#!/bin/bash

VHDX_IMG="$1"
MOUNT_POINT="$2"

sudo rmmod nbd;sudo modprobe nbd max_part=16
sudo qemu-nbd -c /dev/nbd0 "$VHDX_IMG"
sudo partprobe /dev/nbd0
sudo mount -o rw,nouser /dev/nbd0p1 "$MOUNT_POINT"
