VMDK mount

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Ashar
Posts: 2
Joined: 28. Sep 2013, 15:25

VMDK mount

Post by Ashar »

Hi,

I am new to virtualization concepts and my requirement is to export a vmdk file (metadata file) using VBoxManager and see the list of files/folders inside the actual vmdk exported drive by virtual mounting (I believe, we have to directly access the harddisk disk to see the list of files and folders. Since we only have the rawdisk drive and vmdk metadata file)

To test this, in my system (Windows7 64 bit), I have installed another OS in my F:/ Drive (win7 32 bit) and created rawvmdk file from the F: drive partition using the command, VBoxManager internalcommands createvmdk -filename "E:\mywin7.vmdk" -rawdisk \\.\PhysicalDrive0 -partitions 6

Then, in VBox, I try to create new vm using the vmdk, it says "missing operating system" error. If I try to mount the vmdk metadata file using vmware-mount exe, it mount successfully, but if I try to access the new drive in command line, it says, "The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupted".

Can anyone update me, whether I am doing it correctly or let me know the steps to achieve this.

Thanks,
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: VMDK mount

Post by mpack »

You have listed a requirement which I suspect is really just a means which you assume must be necessary. What end result are you really trying to achieve?

Rawdisks are an expert level feature with the potential to corrupt your host hard disk: you should not be considering that unless all else fails, and since the feature is so dangerous you'll find very few people around here willing to help a newbie shoot himself in the foot.
Ashar
Posts: 2
Joined: 28. Sep 2013, 15:25

Re: VMDK mount

Post by Ashar »

My requirement is as below,

Hope, I will read & store the actual raw hard disk in a storage location and will also construct the vmdk meta data from the rawdisk and store it in the same storage location. So, in the storage, I will have the vmdk metadata file and the actual raw hard disk data. In my own application UI/console, I have to provide option to browse the files present in the rawdisk and allow the users to download the files. For that, instead of accessing the direct hard disk, I should read the data from my own storage and will give it to the tool / api. So, I believe, it wont affect the actual hard disk as I am reading from my own storage.

I have to find out a open source tool / api to parse the vmdk meta data file and input as the raw disk data from my own storage.

Is it possible or anyone give me some suggestions or help on that.

Thanks in advance,
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: VMDK mount

Post by mpack »

Nope, I'm still not getting it. You seem to be saying that you want to be able to use a VMDK wrapper around a drive you can already access directly. That doesn't make much sense unless the host doesn't understand the drive filesystem: which is what I would hope you would clarify. Shared folders is usually enough for all other scenarios, and it much safer.

Incidentally, if you want VMDK background info then the "metadata file" is just a textfile. You can look at it with any decent text editor, and its quite understandable. Also the VMDK specification is freely available online.
jansdejager
Posts: 1
Joined: 18. Nov 2013, 16:32

Re: VMDK mount

Post by jansdejager »

I have successfully used this feature to load existing Ubuntu installations (mainly to save space and avoid maintaining more than one version) which is robust, but I haven't tried successfully with Windows or OSX. Came across a strange error using the createvmdk -rawdisk command on Windows 7 PRO (UEFI) which I suspect is because my GPT disk has more than 4 partitions:

Code: Select all

VBoxManage.exe: error: Two partitions start at the same place
VBoxManage.exe: error: Cannot read the partition information from '\\.\PhysicalD
rive0'
VBoxManage.exe: error: The raw disk vmdk file was not created
I did not have this problem on my hackintosh OSX instance of virtualbox which I boot off the same harddrive using EFI (so long as launching with root privileges in the command line and gui). I suspect the vmdk files I created in OSX won't work in Windows UEFI since the access layer is different, even though they boot off the same drive on a standard Intel motherboard (ie not Mac).
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: VMDK mount

Post by mpack »

The OP is asking (I believe) about mounting a guest disk in the host - not the other way round (raw disk).

Also, please don't discuss "Hackintosh" or other warez on these forums.
Post Reply