Page 1 of 1

[Solved] vbox asks for non-existing folder while creating vmdk?

Posted: 9. May 2016, 05:14
by pabzum
I am trying to create a raw vmdk on an Ubuntu host, from an physical HD. When I run the command:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename /home/user/VirtualBox/whatever.vmdk -rawdisk /dev/sdb
on terminal, I get this VERY puzzling error message:

Code: Select all

VBoxManage: error: VMDK: could not create new file '/home/user/VirtualBox/whatever.vmdk'
VBoxManage: error: Error code VERR_FILE_NOT_FOUND at /home/vbox/vbox-5.0.20/src/VBox/Storage/VMDK.cpp(3384) in function int vmdkCreateRawImage(PVMDKIMAGE, PVBOXHDDRAW, uint64_t)
It looks like, in order to run the command, VBoxManage looks for instruction in a file called VMDK.cpp, which should be in a folder called "/home/vbox/vbox-5.0.20/src/VBox/Storage", and cannot find it. I’m not surprised, as there is NO folder or file with those names in my Ubuntu. I have looked everywhere in it, but cannot find it myself. WHY does VirtualBox look for that folder and file? And, more importantly, could anyone here tell me how to make VirtualBox create the raw vmdk file?

Re: vbox asks for non-existing folder while creating vmdk?

Posted: 9. May 2016, 08:17
by socratis
VBox is not asking for a non-existent folder, it points you to the exact line in the source code where the error occurred. In your case the error is "VERR_FILE_NOT_FOUND" which occurred when trying to call the function "vmdkCreateRawImage" in file "VMDK.cpp", line 3384, located in the original source tree at "/home/vbox/vbox-5.0.20/src/VBox/Storage". It is meant to help developers and/or source code understanding people pinpoint the source of the error. Does it make sense now?

Re: vbox asks for non-existing folder while creating vmdk?

Posted: 9. May 2016, 14:45
by pabzum
socratis wrote:Does it make sense now?
It does, thank you!

But if the folder/file is not supposed to be in my computer, it makes the error message not really helpful. It means that my problem is not immediately solvable, right?

Do you happen to know how I could report this do the VBox people?

And more: does VBox-5 have any workaround tactic to create a raw vmdk pointing to a physical HD?

Re: vbox asks for non-existing folder while creating vmdk?

Posted: 9. May 2016, 15:07
by mpack
pabzum wrote: But if the folder/file is not supposed to be in my computer, it makes the error message not really helpful.
It helps the developers pinpoint any bug when you report the error message, which you have done.

However VERR_FILE_NOT_FOUND is not a bug, it means exactly what it says: file not found. The fix is to provide a corrected file reference. I guess that in this case it's saying that "/dev/sdb" or "/home/user/VirtualBox" doesn't exist. I agree that the error message could be clearer about that.

Is "/home/user" what you literally typed? Not "/home/<your user name>" ?

Re: vbox asks for non-existing folder while creating vmdk?

Posted: 9. May 2016, 16:57
by pabzum
mpack wrote:Is "/home/user" what you literally typed? Not "/home/<your user name>" ?
Yes, I typed my username. BUT I see now there was a typo somewhere else. What an idiot. Sorry!!

The error message I get now is:

Code: Select all

VBoxManage: error: Cannot open the raw disk '/dev/sdb': VERR_ACCESS_DENIED
But now I think I can solve that. Thank you both, and sorry to have been such a dunce. :?

Re: vbox asks for non-existing folder while creating vmdk?

Posted: 9. May 2016, 21:06
by pabzum
Now I got it right, and the rawdisk.vmdk is there, with the right permissions. VirtualBox has accepted it, as it is
- listed in the VirtualMediaManager,
- attached to my WinXP VM,
- included as a SATA disk in the Storage section of the Settings,
- granted 777 permissions.

I wish to use it as an additional drive accessible from inside that VM. I had done it in VirtualBox 4, on a different computer, but now I can’t remember this:

HOW to make the WinXP VM access the hard drive? Inside the VM, it’s nowhere to be seen. I know there’s a tweak missing. Could you help me with this? I can’t find instructions on this in the VirtualBox manual.

Re: vbox asks for non-existing folder while creating vmdk?

Posted: 9. May 2016, 22:00
by pabzum
I have found what the problem was.

It seems that Windows XP can’t see SATA disks. As soon as I stored the vmdk as IDE, it came up in the WinXP VM.

Everything is fine and dandy now. Case closed.

Re: vbox asks for non-existing folder while creating vmdk?

Posted: 10. May 2016, 09:20
by mpack
Thanks for keeping us informed.