Mount Real Hard Drive
-
tatemononai
- Posts: 13
- Joined: 13. Jan 2009, 05:00
Mount Real Hard Drive
Ok, I'm running Ubuntu and want to setup a Vista Virtual Box. I'd like to use a second IDE hard drive for the file system. Rather than having everything inside a .vid virtual drive I'd like to use a real hard drive for the file system... can this be done?
-
tatemononai
- Posts: 13
- Joined: 13. Jan 2009, 05:00
New Problem NS_ERROR_FAILURE
Ok, that got me started in the right direction. Using the manual I setup a VMDK with raw disk access. Now I am unable to mount that disk to the virtual box.
Just so you can see, here are the results of the VMDK creation.
andrew@andrew-desktop:~/.VirtualBox/HardDisks$ sudo VBoxManage internalcommands createrawvmdk -filename /home/andrew/.VirtualBox/HardDisks/Vista.vmdk -rawdisk /dev/sda -register
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.
RAW host disk access VMDK file /home/andrew/.VirtualBox/HardDisks/Vista.vmdk created successfully.
--------------
Then when I try to mount the drive via the VirtualBox GUI interface I get the following error.
Could not open the hard disk '/home/andrew/.VirtualBox/HardDisks/Vista.vmdk'.
VD: error opening image file '/home/andrew/.VirtualBox/HardDisks/Vista.vmdk' (VERR_ACCESS_DENIED).
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
HardDisk2
Interface:
IHardDisk2 {ed6e2525-c2fd-42a4-917a-7a9045ac9e15}
Callee:
IVirtualBox {339abca2-f47a-4302-87f5-7bc324e6bbde}
Just so you can see, here are the results of the VMDK creation.
andrew@andrew-desktop:~/.VirtualBox/HardDisks$ sudo VBoxManage internalcommands createrawvmdk -filename /home/andrew/.VirtualBox/HardDisks/Vista.vmdk -rawdisk /dev/sda -register
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.
RAW host disk access VMDK file /home/andrew/.VirtualBox/HardDisks/Vista.vmdk created successfully.
--------------
Then when I try to mount the drive via the VirtualBox GUI interface I get the following error.
Could not open the hard disk '/home/andrew/.VirtualBox/HardDisks/Vista.vmdk'.
VD: error opening image file '/home/andrew/.VirtualBox/HardDisks/Vista.vmdk' (VERR_ACCESS_DENIED).
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
HardDisk2
Interface:
IHardDisk2 {ed6e2525-c2fd-42a4-917a-7a9045ac9e15}
Callee:
IVirtualBox {339abca2-f47a-4302-87f5-7bc324e6bbde}
-
tatemononai
- Posts: 13
- Joined: 13. Jan 2009, 05:00
FIXED
Ok, I fixed my problem. Just wanted to post the fix in case anybody has the same issue. It was purely a permissions problem as the error indicates.
I did two things. I had to grant full permissions to both the physical drive and the VMDK file.
So I did two commands.
sudo chmod 777 /dev/sda
sudo chmod 777 /home/andrew/,VirtualBox/HardDisks/Vista.vmdk
problem solved... it's working great now.
I did two things. I had to grant full permissions to both the physical drive and the VMDK file.
So I did two commands.
sudo chmod 777 /dev/sda
sudo chmod 777 /home/andrew/,VirtualBox/HardDisks/Vista.vmdk
problem solved... it's working great now.
-
tatemononai
- Posts: 13
- Joined: 13. Jan 2009, 05:00
Permissions Lost On Reboot
Ok new update. When I reboot the machine the system loses the chmod settings on Vista.vmdk. So I have to rerun chmod every time I boot, which sucks. How might I go about making the changes permanent?
Thanks
Thanks
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
You need to change the ownership on the VMDK file. If that doesn't solve it, which would be strange, you can always put the chmod line (666 should be enough, you don't need to execute the drive
) in your boot script, like /etc/rc.local on Debian based systems.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.