Discuss: Mount any VBox-compatible disk image on the host
-
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: PUEL
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
Re: (Loop) mount any VBox disk type (VDI,VMDK,VHD) on Host
Sorry, I'll do it tomorrow. I've been debugging some horrible utilities to automate a bunch of forum stuff. Alternately can't you just upload it as an attachment?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
-
- Posts: 8
- Joined: 27. Apr 2009, 19:50
- Primary OS: Ubuntu 8.10
- VBox Version: PUEL
- Guest OSses: WindowsXP
Re: (Loop) mount any VBox disk type (VDI,VMDK,VHD) on Host
I've installed nbd-client and run '' gcc vdimount.c -o vdimount -pthread -l:/usr/lib/virtualbox/VBoxDD.so -Wl,-rpath,/usr/lib/virtualbox -I/usr/bin '' (according to my installation of VirtualBox).h2o wrote:Update 2/12/09: Use this, it's better http://forums.virtualbox.org/viewtopic. ... 9678#59678
1) Get the package nbd:
On Ubuntu:2) Compile itCode: Select all
apt-get install nbd-client
Download it, compile it with:Code: Select all
gcc vdimount.c -o vdimount -pthread -l:/path/to/virtualbox/VBoxDD.so -Wl,-rpath,/path/to/virtualbox -I/path/to/includes/for/virtualbox
It ends with following error message: '' gcc: vdimount.c: No such file or directory ''
I allready expected this error message, because how should gcc know of any vdimount.c ? I don't know where I could find this vdimount.c (I searched all /usr for this file, no where).
Anybody an idea?
Thanks, Ulrich
-
- Posts: 5
- Joined: 31. Mar 2009, 00:15
- Primary OS: Ubuntu 8.10
- VBox Version: PUEL
- Guest OSses: Windows XP Ubuntu
Re: (Loop) mount any VBox disk type (VDI,VMDK,VHD) on Host
Is it possible to mount the VDI file automatically at the system startup?
for example using /etc/fstab, etc.?
Thanks
for example using /etc/fstab, etc.?
Thanks
Re: (Loop) mount any VBox disk type (VDI,VMDK,VHD) on Host
Sorry for making everyone wait; heres the next version!
-
- Volunteer
- Posts: 7639
- Joined: 7. Jun 2007, 21:53
Re: (Loop) mount any VBox disk type (VDI,VMDK,VHD) on Host
Works perfectly. Compile with no errors, mont XP and Windows 7 Images.
That *must* be a Feature of VBOX in the Original Version.
That *must* be a Feature of VBOX in the Original Version.
German Howto (Linux): http://www.linuxforen.de/forums/showthread.php?t=236444
User Manual / Download Section: http://www.virtualbox.de/wiki/Downloads
FAQ: http://www.virtualbox.de/wiki/User_FAQ http://forums.virtualbox.org/viewtopic.php?t=8669
User Manual / Download Section: http://www.virtualbox.de/wiki/Downloads
FAQ: http://www.virtualbox.de/wiki/User_FAQ http://forums.virtualbox.org/viewtopic.php?t=8669
-
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: PUEL
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
Re: (Loop) mount any VBox disk type (VDI,VMDK,VHD) on Host
Thanks h2o. The attachment idea is far better than relying on me. Sorry. A fantasic job. Well done
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
-
- Posts: 8
- Joined: 27. Apr 2009, 19:50
- Primary OS: Ubuntu 8.10
- VBox Version: PUEL
- Guest OSses: WindowsXP
Invalid arguments
I've compiled vdfuse50.c without errors.
In /etc/fuse.conf, I have uncomment 'user_allow_other'
/dev/fuse has chmod 20666
/mnt/loop/ is rw for any user.
When I try to mount the DVI with following command: vdfuse -t VDI -v -f /media/sda2/VirtualBox/HardDisks/WindowsXP.vdi /mnt/loop/
I receive as error:
. fusermount:
. failed to open /etc/fuse.conf: Permission denied
. fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
Which is strange, since I've uncomment it.
When I try to do this as root, I get error message:
. Partition Size Offset
. ========= ==== ======
. Partition1 32256 10725732864
. fuse: mount failed: Invalid argument
Strange, isn't it?
Furthermore: does some HOWTO exist, where everything is explained?
Thanks for any help.
In /etc/fuse.conf, I have uncomment 'user_allow_other'
/dev/fuse has chmod 20666
/mnt/loop/ is rw for any user.
When I try to mount the DVI with following command: vdfuse -t VDI -v -f /media/sda2/VirtualBox/HardDisks/WindowsXP.vdi /mnt/loop/
I receive as error:
. fusermount:
. failed to open /etc/fuse.conf: Permission denied
. fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
Which is strange, since I've uncomment it.
When I try to do this as root, I get error message:
. Partition Size Offset
. ========= ==== ======
. Partition1 32256 10725732864
. fuse: mount failed: Invalid argument
Strange, isn't it?
Furthermore: does some HOWTO exist, where everything is explained?
Thanks for any help.
Last edited by rainbow.hippie on 11. May 2009, 08:14, edited 1 time in total.
Re: Invalid arguments
Check the permissions on /etc/fuse.conf.rainbow.hippie wrote: . failed to open /etc/fuse.conf: Permission denied
-
- Posts: 8
- Joined: 27. Apr 2009, 19:50
- Primary OS: Ubuntu 8.10
- VBox Version: PUEL
- Guest OSses: WindowsXP
patch: **** malformed patch at line 16: @@ -104,7 +104,11 @@
I changed the permissions of /etc/fuse.conf.
Now I can use vdfuse, which gives me two files: EntireDisk and Partition1. I have to use the latter, but then I receive the error:
# mount -o loop /mnt/loop/Partition1 /mnt/iso/ -t ntfs
/mnt/loop/Partition1: No such file or directory
I read on this thread that vdfuse.c has to be patched, but that fails with the error:
patch: **** malformed patch at line 16: @@ -104,7 +104,11 @@ (as allready was mentioned)
I use Kubuntu 8.10 (Linux)
Now I can use vdfuse, which gives me two files: EntireDisk and Partition1. I have to use the latter, but then I receive the error:
# mount -o loop /mnt/loop/Partition1 /mnt/iso/ -t ntfs
/mnt/loop/Partition1: No such file or directory
I read on this thread that vdfuse.c has to be patched, but that fails with the error:
patch: **** malformed patch at line 16: @@ -104,7 +104,11 @@ (as allready was mentioned)
I use Kubuntu 8.10 (Linux)
-
- Posts: 8
- Joined: 27. Apr 2009, 19:50
- Primary OS: Ubuntu 8.10
- VBox Version: PUEL
- Guest OSses: WindowsXP
Re: Discuss: Mount any VBox-compatible disk image on the host
Yes, vdfuse50.c
-
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: PUEL
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
Re: Discuss: Mount any VBox-compatible disk image on the host
The latest version doesn't need patched. If you are mounting the VDI on /mnt/loop then what do you see when you do a
ls -l /mt/loop file /mnt/loop/Partition1
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
-
- Posts: 8
- Joined: 27. Apr 2009, 19:50
- Primary OS: Ubuntu 8.10
- VBox Version: PUEL
- Guest OSses: WindowsXP
Partition1: No such file or directory SOLVED ?
The problem seems to be solved (more or less).
I've vdfuse'd the VDI to another directory, and now I can mount Partition1.
The directory which fails AND the one which succedes are owned by the user (Ulrich) and have permissions set: dr-xr-xr-- (octal: 40554).
Partition1 in both directories has octal: 10644
ulrich@Phaedon:~$ ls -l /mnt/loop
insgesamt 20960109
-rw-r--r-- 1 ulrich ulrich 10737418240 2009-05-10 23:06 EntireDisk
-rw-r--r-- 1 ulrich ulrich 10725732864 2009-05-10 23:06 Partition1
ulrich@Phaedon:~$ file /mnt/loop/Partition1
/mnt/loop/Partition1: writable, regular file, no read permission
root@Phaedon:~# mount -o loop /mnt/loop/Partition1 /mnt/iso/ -t ntfs
/mnt/loop/Partition1: No such file or directory
Strange and important detail: when I try to open/read Partition1 with MC, I also receive a 'no such file or dierectory'.
Now I've vdfuse'd to /mnt/iso:
ulrich@Phaedon:~$ ls -l /mnt/iso
insgesamt 20960109
-rw-r--r-- 1 ulrich ulrich 10737418240 2009-05-11 12:58 EntireDisk
-rw-r--r-- 1 ulrich ulrich 10725732864 2009-05-11 12:58 Partition1
ulrich@Phaedon:~$ file /mnt/iso/Partition1
/mnt/iso/Partition1: x86 boot sector, Microsoft Windows XP Bootloader NTFS (german) (!!!!!!!!!!!!!!!!???!!!!!!!!!!!!!!!!!!!!!!)
Mounting as loop device works now.
Does vdfuse not like directories that are named 'loop'?
I've vdfuse'd the VDI to another directory, and now I can mount Partition1.
The directory which fails AND the one which succedes are owned by the user (Ulrich) and have permissions set: dr-xr-xr-- (octal: 40554).
Partition1 in both directories has octal: 10644
ulrich@Phaedon:~$ ls -l /mnt/loop
insgesamt 20960109
-rw-r--r-- 1 ulrich ulrich 10737418240 2009-05-10 23:06 EntireDisk
-rw-r--r-- 1 ulrich ulrich 10725732864 2009-05-10 23:06 Partition1
ulrich@Phaedon:~$ file /mnt/loop/Partition1
/mnt/loop/Partition1: writable, regular file, no read permission
root@Phaedon:~# mount -o loop /mnt/loop/Partition1 /mnt/iso/ -t ntfs
/mnt/loop/Partition1: No such file or directory
Strange and important detail: when I try to open/read Partition1 with MC, I also receive a 'no such file or dierectory'.
Now I've vdfuse'd to /mnt/iso:
ulrich@Phaedon:~$ ls -l /mnt/iso
insgesamt 20960109
-rw-r--r-- 1 ulrich ulrich 10737418240 2009-05-11 12:58 EntireDisk
-rw-r--r-- 1 ulrich ulrich 10725732864 2009-05-11 12:58 Partition1
ulrich@Phaedon:~$ file /mnt/iso/Partition1
/mnt/iso/Partition1: x86 boot sector, Microsoft Windows XP Bootloader NTFS (german) (!!!!!!!!!!!!!!!!???!!!!!!!!!!!!!!!!!!!!!!)
Mounting as loop device works now.
Does vdfuse not like directories that are named 'loop'?
-
- Posts: 8
- Joined: 27. Apr 2009, 19:50
- Primary OS: Ubuntu 8.10
- VBox Version: PUEL
- Guest OSses: WindowsXP
Mounting snapshots ?
Is it also possible to mount snapshots this way?
I have a corrupt virtual machine, and would like to retrieve information that must be stored inside a snapshot.
When I try to do so, I receive as error: ERROR: opening vbox image failed
I have a corrupt virtual machine, and would like to retrieve information that must be stored inside a snapshot.
When I try to do so, I receive as error: ERROR: opening vbox image failed
Re: Discuss: Mount any VBox-compatible disk image on the host
Unfortunately this version doesn't support snapshots. I have no idea why because I have no idea what a snapshot is composed of. Maybe Terry would know why...