As Vojtech Trefny mentioned above,
1) first convert your VDI -> IMG
VBoxManage clonehd --format RAW ubuntu.vdi ubuntu.img
2) Then mount the IMG
mount -t ext3 -o loop,rw ./ubuntu.img /mnt
3) However, as I got this error message:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
and dmesg said:
[3105578.013671] EXT4-fs (loop0): VFS: Can't find ext3 filesystem
you need to check out the partition structure of the .img:
fdisk -l ubuntu.img
Disk ubuntu.img: 21.0 GB, 20971520000 bytes
255 heads, 63 sectors/track, 2549 cylinders, total 40960000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf45bc910
Device Boot Start End Blocks Id System
ubuntu.img1 * 2048 12582911 6290432 83 Linux
ubuntu.img2 12584958 16775167 2095105 5 Extended
ubuntu.img3 16775168 40959999 12092416 83 Linux
ubuntu.img5 12584960 16775167 2095104 82 Linux swap / Solaris
4) As you can see, the main partition is starting at bytes 16775168. However, note that the sector size is 512 bytes, so you need to multiply the results 16775168 x 512 = 8588886016 so you need to offset the mount like this:
mount -t ext3 -o loop,rw,offset=8588886016 ./ubuntu.img /mnt
5) Actually this didn't work for me in case where the filesystem was dirty after resize. In this case I further did this:
dd if=ubuntu.img of=ubuntu.disk bs=512 skip=16775168 count=12092416
e2fsck ubuntu.disk
mount ubuntu.disk /mnt