# apt-get install qemu-utils
# modprobe nbd max_part=16
# qemu-nbd -c /dev/nbd0 /home/username/VirtualBox\ VMs/Windows\ 8.1/Windows\ 8.1.vdi
# fdisk -l /dev/nbd0
# kpartx -a /dev/nbd0
# mkdir /mnt/nbd0p2
# mount /dev/mapper/nbd0p2 /mnt/nbd0p2
# ls /mnt/nbd0p2
# umount /mnt/nbd0p2
# kpartx -d /dev/nbd0
# qemu-nbd -d /dev/nbd0
# modprobe -r nbd
Advertisements