Welcome, Guest
Please Login or Register.    Lost Password?

Using VBOOT/VMLite parts to mount VHDs in Linux?
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Using VBOOT/VMLite parts to mount VHDs in Linux?
#7866
Using VBOOT/VMLite parts to mount VHDs in Linux? 6 Years, 8 Months ago Karma: 0
Despite the pervasiveness of VHDs these days, there's still no easy way to mount them in Linux. It can be done by installing VirtualBox OSE, and using a tool it provides, but that's often not possible.

However VBOOT has a kernel module (VHD.mod) which is used by grub, presumably to mount a VHD for booting into.

Can this (or anything else that VBOOT/vMLite provides) be used standalone inside Linux (32 or 64 bit) , to mount VHDs?

If so, how?
Melville
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#7867
Re: Using VBOOT/VMLite parts to mount VHDs in Linux? 6 Years, 8 Months ago Karma: 1
vlosetup /dev/vloop1 /path/your.vhd
mount /dev/vloop1p1 /mnt

you can mount .vmdk, .vhd and .vdi disks

--by admin.
skkkpeek
Junior Boarder
Posts: 35
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#7878
Re:Using VBOOT/VMLite parts to mount VHDs in Linux? 6 Years, 8 Months ago Karma: 0
Thanks, that worked fine once I realised the above are 32-bit but my host is 64 bit, so I switched to a 32-bit Ubuntu to test, it then worked fine.

I have to say, I already thought VBOOT was excellent, but this capability moves it to another level altogether - fantastic stuff!. Together with Windows 7's first class support for VHDs creation, mounting and manipulation, VHDs are now (imho) the imaging format of choice, usable everywhere - Linux hosts, Windows hosts and virtual machines. This is a first!

What an excellent product, well done again.

PS - is there a 64-bit version of vlosetup and vloop.ko?
Melville
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#7880
Re:Using VBOOT/VMLite parts to mount VHDs in Linux? 6 Years, 8 Months ago Karma: 0
I've now done a few qualification tests, and have observed something curious.

The test was to VBOOT from a USB stick (your Ubuntu 10.10 appliance), image a hard drive direct to VHD, mount the VHD, and compare the 3rd partition (a 17gb root FS) with the original.

The physical drive is:



The finally mounted VHD is:



The "curiosity" is that you can see few billion terabytes (or <0, depending on which number you read) of free space at the end of the disk on the second picture (hilighted).

Now, I didn't image the whole disk, just the first three partitions and a few blocks of the fourth (which is large and not needed), using:

dd if=/dev/sda bs=1M count=26700 | VBoxManage convertfromraw stdin --format VHD /P/disk.vhd 27996979200

That's 1M x 26700 = 27996979200 bytes = 54681600 sectors, which is 153600 sectors into the 4th partition.

Of course, you'd expect errors trying to actually access the fourth partition in the image, if it wasn't all there, but you wouldn't expected the above strange free space in Disk Utility. However fdisk showed exactly the same output for both /dev/sda (the source hard drive) and /dev/vloop1 (the mounted VHD image).

The VHD was mounted in immutable mode, in case that makes any difference.

Comments? Is this a bug? If so, in what?
Melville
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/05/10 07:11 By Melville.
The administrator has disabled public write access.
 
#7904
Re:Using VBOOT/VMLite parts to mount VHDs in Linux? 6 Years, 8 Months ago Karma: 52
We are looking at this issue. thanks for the report.

We have an internal tool that can mount vhd/vmdk/vdi files, and it does not depend on Linux kernels. We may release the binary.

vloop has a 64-bit version that you can find inside the Ubuntu 64-bit setup files.
admin
Moderator
Posts: 2350
graph
User Offline
Gender: Male
The administrator has disabled public write access.
 
#7943
Re:Using VBOOT/VMLite parts to mount VHDs in Linux? 6 Years, 8 Months ago Karma: 0
Great - let me know if you need any further info. I've kept the image files just in case.

That tool sound useful, it would be great if you would release it. Or if you want me to try it on the above problem and see what happens, then you can send me a private copy.
Melville
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/05/19 09:05 By Melville.
The administrator has disabled public write access.
 
Go to topPage: 12