Creating vmdk for Windows partition fails on OpenHardDisk2

Discussions related to using VirtualBox on Linux hosts.
Post Reply
adamsmasher
Posts: 2
Joined: 2. Jan 2009, 02:54

Creating vmdk for Windows partition fails on OpenHardDisk2

Post by adamsmasher »

Hi,

I am trying to create a virtual disk of my physicall windows partition so I can boot the windows partition on my linux side. To do this, I have been trying to use the VBoxManage application and follow the instructions I found elsewhere on this site.

Here is the command and its arguments:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename WinXP.vmdk -rawdisk /dev/sda -relative -register -partitions 2
And the output:

Code: Select all

VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

RAW host disk access VMDK file WinXP.vmdk created successfully.
[!] FAILED calling aVirtualBox->OpenHardDisk2(filename, hardDisk.asOutParam()) at line 1250!
[!] Primary RC  = VBOX_E_IPRT_ERROR (0x80BB0005) - Runtime subsystem error
[!] Full error info present: true , basic error info present: true 
[!] Result Code = VBOX_E_IPRT_ERROR (0x80BB0005) - Runtime subsystem error
[!] Text        = Could not get the storage format of the hard disk '/home/aviv/.VirtualBox/HardDisks/WinXP.vmdk' (VERR_FILE_NOT_FOUND)
[!] Component   = HardDisk2, Interface: IHardDisk2, {ed6e2525-c2fd-42a4-917a-7a9045ac9e15}
[!] Callee      = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
I also tried to create the virtual disk of just the windows partiont, but I got the same error as above.

I run Fedora 10, and my Windows partition is /dev/sda2, and this is also the partition I boot from. I understand that I may need to mess with the boot sector of the virtual disk when I am done, but I can't even create the virtual disk. I have the privledge to read the disk, I am a member of the disk group. I have even tried to run it in super user mode just to experiment. I am flat out of ideas, and I have looked through almost all the options for VBoxManager. I am not sure if this is even possible, but it seems like it should. Anyway help would be greatly appreciated.

thanks,

adam
ZenGuy
Posts: 11
Joined: 27. Mar 2008, 05:36

Post by ZenGuy »

I've been playing with this a bit myself and found something that may help.

I've had some success getting past this if I explicitly state the path to the VMDK and MBR filenames. Using relative paths or not specifying one has been problematic for me in the past. So you may want to modify it like so:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename (INSERT PATH HERE)/WinXP.vmdk -rawdisk /dev/sda -relative -register -partitions 2 
Also, make sure you understand the ramifications of getting the MBR right initially. It sounds like you can wipe out your host partition just by booting the guest if it is setup incorrectly.
adamsmasher
Posts: 2
Joined: 2. Jan 2009, 02:54

Post by adamsmasher »

That worked, once, but when I tried to do another partition, it failed the same way. I think I am going to give up for now and wait for the newer releases. I wish there was a utility where you can boot directly from a partition on the hardrive like you can in vmware. Perhaps in the next release.
mowchap
Posts: 1
Joined: 8. Jan 2009, 09:36

Post by mowchap »

adamsmasher wrote:That worked, once, but when I tried to do another partition, it failed the same way. I think I am going to give up for now and wait for the newer releases. I wish there was a utility where you can boot directly from a partition on the hardrive like you can in vmware. Perhaps in the next release.
I got the same problem,no matter what kind of OS i install,it shows me the same information,i can not use it successfully like i can do in vmware, :oops:
Post Reply