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

This is for discussing general topics about how to use VirtualBox.
Post Reply
pabzum
Posts: 9
Joined: 8. Aug 2015, 02:34

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

Post 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?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

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

Post 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?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
pabzum
Posts: 9
Joined: 8. Aug 2015, 02:34

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

Post 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?
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: vbox asks for non-existing folder while creating vmdk?

Post 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>" ?
pabzum
Posts: 9
Joined: 8. Aug 2015, 02:34

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

Post 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. :?
pabzum
Posts: 9
Joined: 8. Aug 2015, 02:34

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

Post 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.
pabzum
Posts: 9
Joined: 8. Aug 2015, 02:34

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

Post 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.
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: vbox asks for non-existing folder while creating vmdk?

Post by mpack »

Thanks for keeping us informed.
Post Reply