LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   VirtualBox: Use a host block device in the virtual machine (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/virtualbox-use-a-host-block-device-in-the-virtual-machine-845406/)

Kenny_Strawn 11-19-2010 05:53 PM

VirtualBox: Use a host block device in the virtual machine
 
After rummaging through the VirtualBox Virtual Machine Settings -- trying to find out how to use a host device (in this case a USB flash drive) in a VirtualBox SAS controller -- in an endless loop, I feel hopeless.

Here's my reason for the use of a system block device in a virtual machine:

You see, this VM is a 64-bit VM designed to emulate a 64-bit system on a 32-bit processor. Why? Google Chrome OS won't build on 32-bit processors, so I decided to cross-virtualize to be able to support this.

I obviously cannot write an image to a USB flash drive without access to the entire disk (/dev/sdc), not just the mount point. So I am wondering just how this is ever done! It is driving me nuts. Are there any "plugins" for VirtualBox that I have to install to be able to support real devices? If so, what?

Kenny_Strawn 11-19-2010 11:04 PM

So all you 52 people who viewed this thread couldn't reply?! Why, for the love of God?

catkin 11-20-2010 12:12 AM

Probably because very few of us (maybe none) have used SAS controllers with VirtualBox and I for one do not understand why a SAS controller is necessary to make the Chrome OS build available wherever you want it to be available or why you can't copy it to a partition on a USB flash drive and copy the MBR and any partition BR separately. Or why it is not possible to give the VM access to the entire USB flash drive as described (for hard disks which may or may not include USB flash drives) in the VirtualBox User Manual 9.7.1 "Using a raw host hard disk from a guest".

In short you have identified a solution which may be neither practicable nor optimal and have asked us to make it work. It might be more effective to ask how to implement your actual requirement, "Build Chrome on 32 bit system".

Kenny_Strawn 11-20-2010 10:17 AM

Quote:

Originally Posted by catkin (Post 4165060)
Probably because very few of us (maybe none) have used SAS controllers with VirtualBox and I for one do not understand why a SAS controller is necessary to make the Chrome OS build available wherever you want it to be available or why you can't copy it to a partition on a USB flash drive and copy the MBR and any partition BR separately. Or why it is not possible to give the VM access to the entire USB flash drive as described (for hard disks which may or may not include USB flash drives) in the VirtualBox User Manual 9.7.1 "Using a raw host hard disk from a guest".

In short you have identified a solution which may be neither practicable nor optimal and have asked us to make it work. It might be more effective to ask how to implement your actual requirement, "Build Chrome on 32 bit system".

Yes, I should remove the SAS controller. What I really want to know is what controller I need to connect a host USB flash drive -- and even then, any controllers I have tried already don't work.

You do realize that the Chromium build scripts are sort of "hard wired" for 64-bit systems, right? On top of that, the Build Instructions tell me that one of the requirements is a 64-bit system. That wasn't the case when I started building Chrome back in November 2009 -- it recently was edited into the scripts this spring.

phil.d.g 11-21-2010 05:00 PM

Not sure if I'm understanding you right but I think you're after something like this:

Code:

VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/HardDisks/sdc.vmdk -rawdisk /dev/sdc
Then you add it in VirtualBox's media manager, use whatever controller you want for your vm and attach it like any other drive


All times are GMT -5. The time now is 08:01 PM.