Mounting a VirtualBox Hard Drive image in Linux

I was looking for a way to access files on a Virtual Box hard drive. As usual StackExchange came to the rescue. Here is how I mounted a FreeDos virtual hard drive and gained access to the files that were on it:

sudo modprobe nbd
sudo qemu-nbd -r -c /dev/nbd1 /home/peter/VirtualBox\ VMs/Knoppix/FreeDos/NewVirtualDisk1.vmdk
sudo mount /dev/nbd1p1 /media/peter/vmdk/

Now the hard drive files are available on /media/peter/vmdk/

When done:
sudo umount /media/peter/vmdk