Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mounting a VirtualBox VDI disk on linux
- I just had an “Unsupported version 13 of data unit 'pgm' (instance #1, pass 0xffffffff) (VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION).” error on a Windows VirtualBox machine where I had some important python scripts.
- I couldn't boot the machine at all, so in order to recover those files I had to search on how to mount a VDI disk file and here is the how-to:
- First of all you will need the qemu-nbd binary, so look up how is packaged in your distro, in my case (openSUSE 11.4) it is within virt-utils, in (openSUSE 12.2) it is within qemu-tools.
- After you installed the package, execute these commands as root:
- Mounting
- # Load the nbd kernel module
- modprobe nbd max_part=16
- # Link a block device named /dev/nbd0 to the vdi file
- # Partitions will appear as /dev/nbd0p1 and so on
- qemu-nbd -c /dev/nbd0 <vdi-file>
- # Mount the first partition within /mnt/tmp
- mount /dev/nbd0p1 /mnt/tmp
- Now you can copy your files to the local filesystem
- Un-mounting
- # Unmount the partition
- umount /mnt/tmp/
- # Unlink the vdi file
- qemu-nbd -d /dev/nbd0
- # Remove the kernel module
- rmmod nbd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement