`
tairgee
  • 浏览: 3669 次
文章分类
社区版块
存档分类
最新评论

Mac OSX Host 上修复VirtualBox Ubuntu Guest不能访问USB移动硬盘的方法

 
阅读更多
Virtualbox XP Guest等系统中也存在类似问题,主要原因是virtualbox的bug,配置的时候选择cpu数量为1 就可以了。

参考文章如下,(此文在.wordpress.com中,包括blogspot上都有好多优秀的技术文章,都得XX才能看,真是对天朝无语了……)

Ok, ladies and gents. If you are a Mac user, you will probably notice there isn’t much documentation on fixing USB access issues on Ubuntu guest operating system.  After spending hours… I mean literally a half a day traversing Mac OS, Ubuntu, and VirtualBox forums, I finally found the answer in the dead of night. Hope you found this solution faster than I did.  Another day in the life of me.

Environment:

Host OS-> MacOS 10.7.4 (OSX Lion) x86_64
VirtualBox 4.1.18 , ext: 4.1.18r78361
Guest OS-> Ubuntu 10.04 AMD 64-bit



Pre-configurations:

In order for your system to utilize the virtual USB 2.0 functionality you need to install two software packages (in order):

    Guest Addition: Start up the guest OS and select “Install Guest Additions”.  It will automatically mount a CD file on your desktop.  It may also automatically attempt to run and execute.  I would recommend executing the “open Autorun prompt” just for ease.  If you are unsure, there are plenty of tutorial including youtube videos online.  You will need to restart your VM for the changes to take effect, but for now just it shutdown.
    Now, download your respective extension pack for your version of VirtualBox here. As you can see in the Environment section, I downloaded VirtualBox 4.1.18 for OS X hosts extension pack (4.1.18r78361).Click on the “VirtualBox” home button and select Preferences.  Switch to the Extension tab.  Click the image of the blue diamond superimposed by an upside -down orange triangle to add the downloaded extension package.You may not need to restart VB, but better safe than sorry.

VirtualBox Configurations:

This is assuming you have your USB devices and/or external hard drives already attached to the host machine.

    Once you have opened the VirtualBox application, select the Ubuntu virtual machine. Make sure the guest OS is not currently running.  Then click on Settings.  Navigate to the Ports tab.  Switch to USB configuration window.
    Enable both USB Controller and USB 2.0 (EHCI) Controller.
    Under the USB Device Filter dialogue, you can either create general USB filter (blue circle) or a specified filter (green plus sign) for a currently attached USB device. I created an instance of both. There will be also integrated host devices, and you most likely have no interest in that.  It could also screw with your hardware peripherals’ functionality.
    IMPORTANT: Now here is one of the essential config options that had me stuck for 12 hours. For some odd reason, your external USB devices will not automatically mount or mount at all if you have more than 1 virtual CPU set for the Ubuntu guest OS.  Even if VB notifies you that the devices have been successfully captured by the VirtualBox, the guest OS will not mount it.  So it is imperative that you keep the vCPU at the minimum.
    [Edit]: Apparently the number of allocated virtual CPU has been an issue dating back to VirtualBox 3.2.10. Peruse this forum if you so desire.

Test Drive!!!

Its time to verify if your configurations has granted you USB access via the Ubuntu guest OS. *Cross fingers*

    First, remove the USB devices.  Run the guest OS, and once you have logged in to the VM, connect the devices.
    A couple things can occur after re-inserting the USB peripherals.Your Mac OS may capture the device first before the guest OS. In that case, in a Finder window, just eject the devices.  The guest OS will then automatically capture the devices. If not, a simple click on the VB’s Device -> USB Devices -> diskimage, where “diskimage” is the manufacture’s hardware name associated with your device, will allow you to select your attached device.  Automatically or manually attaching the device will lead to the external devices mounting on the Linux system.The second case is that maybe the host OS automatically directs the USB access to guest OS.  Again, if it does not automatically mount, you will have to manually perform that operation above.Congratulations, you have USB access now via Ubuntu 10.04 guest OS on a Mac OSX Lion host OS.

Notes:

    If you think you need the vboxuser group on your host machine, you DON’T! Let me reiterate that, vboxuser group is only for installing VirtualBox on Linux distributions (i.e. Ubuntu, Fedora, Solaris).  So move on from those Linux forums because they will not help.
    There are some possible errors that I did not cover because there are a plethora of online sources such as this that provide solutions.  Often, errors can be solved just by properly removing the VirtualBox app from the host OS using the uninstall tool and reinstalling it with both Guest_Addition and appropriate Extension pack.
    To verify if the host-attached USB devices are either “unavailable” or “captured” by VirtualBox, in the Mac terminal execute:
    $ VBoxManage list usbhost
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics