I've an *.img file, that can't be converted to *.iso, because its a multi-session disk. So I simply changed the file ending to .iso.

Now, I am able to mount it using the following command: mount -o loop dvd.iso /media/iso

BUT: When I try to use this iso in VirtualBox, it fails! Is there a way to mount the iso file as a drive, and then use it in VirtualBox?

link|improve this question
What OS are you running in vb, or is this a boot disk? – Paul Oct 6 '11 at 23:04
There is no OS at the moment. It´s a Win7 DVD-image, so I want to install Win7. – FlashFan Oct 7 '11 at 6:23
When you do mount -o loop it creates a loopback device that represents the ISO, and then mounts the loopback. Given that you can mount the iso in linux, I guess vb is using a different method. Try mounting in linux, then do losetup -a to find out which /dev/loop it created (/dev/loop0 for example). Then when adding the cdrom device to your vm, use the /dev/loop device instead of the iso directly. – Paul Oct 7 '11 at 7:03
@Paul Thanks for this tip, but this does not seem to work. "The medium '/dev/loop0' can't be used as the requested device type". I've also tested it with a normal ISO, but it didn't work. Do you have another idea? – FlashFan Oct 8 '11 at 18:00
What was the requested device type? It should be added as a physical device. – Paul Oct 9 '11 at 3:03
show 4 more comments
feedback

2 Answers

Try to use losetup command.

losetup /dev/loop0 yourfile.iso

It link your iso file to a loopdevice.

link|improve this answer
feedback

Have you tried using dd, with an output as .iso from the mounted image... ie

dd if=/where/you/have/.img/mounted of=/~/image/.iso

then use the new .iso image with virtualbox

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.