在ubuntu10.04中开启Virtualbox的USB支持


我是一个 100%的 Ubuntu/Linux用户,但是迫于无奈,有时候必须使用 windows系统,比如 QQ,网银等。无奈呀。所以这个 100%应该说是 80%更确切一点。但是想要在虚拟 xp系统中的 QQ中视频聊天,必须启动虚拟机的 USB支持。下面我将介绍如何在虚拟 xp中开启 QQ的视频聊天支持。摄像头是连接在机器的 usb接口上面的,所以必须开启 Virtualbox的 USB支持。一切才能继续。

1,安装

Ubuntu/Linux下安装 Virtualbox的方法很简单,在 http://www.oracle.com/technetwork/server-storage/virtualbox/overview/index.html上面下载对应的 linux版本即可安装。

注意:对于 Ubuntu系统来说,最好先安装 dkms包,命令为: sudo apt-get install dkms。这在 virtualbox的 wiki上有描述( http://www.virtualbox.org/wiki/Linux_Downloads):

Note: Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv , vboxnetflt and vboxnetadp ) are properly updated if the linux kernel version changes during the next apt-get upgrade . For Debian it is available in Lenny backports and in the normal repository for Squeeze and later. The dkms package can be installed through the Synaptic Package manager or through the following command:

sudo apt-get install dkms

2,新建虚拟
xp系统

之后新建一个
windows xp系统,比如我的系统
xp硬盘空间设置为
10G,动态分配,注意安装的时候必须选择纯净的
xp安装盘,现在的
ghost xp安装盘我没有测试成功过。下载包含
xp的
iso文件,之后选择新建的
xp主机,点击
settings-》
storage-》
ide controller,把
iso文件加载到虚拟机的光驱。我的
xp为英文的,文件名称为
en_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73974.iso。安装完毕如下图。

 

\
3,开启 USB支持

第一步:下载 Oracle VM VirtualBox Extension Pack。这个安装包在 html#extpack">http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html#extpack这里找到,选择 all platforms,下载。下载完毕之后,打开 Virtualbox, File->preferences->extension,添加刚才下载的 extension pack。安装之后重启 Virtualbox即可。这样就开启了 Virtualbox的 usb支持。

第二步:虚拟机的设置里面选择 USB设备— >启用 USB控制器 -》 enable usb 2.0 controller 。然后添加 USB filter,把要挂载到虚拟机的 USB设备选上,这里我选择的是摄像头。

 \

第三步:添加了 USB设备之后,再启动虚拟机,正当我要给虚拟机分配 USB设备时,发现点击设备– >分配 USB设备虽然列出了我电脑上的 USB设备,但是全都是灰色的,无法分配。这是什么原因呢?原因是 Virtualbox对 USB设备没有获得访问权限。最后还是在 https://help.ubuntu.com/community/VirtualBox/USB 上找到了解决方案,原来对于 Ubuntu 10.04已经有更简单的在 VirtualBox中使用 USB的方案了:

For Lucid
Add yourself to the user group vboxusers , then log out and back in, to make use of available USB devices. To do this via the graphical interface, click in the menu System/Administration/ Users and Groups.

原来 VirtualBox在运行时不是以当前用户身份运行的,而是单独创建了一个叫做 vboxusers的用户组,而默认情况下你的当前用户是不在这个用户组里面的, VirtualBox也就没有访问 USB设备的权限了。在用户管理里面把当前用户添加到 vboxusers用户组中,重新登录后再次打开 VirtualBox 。启动虚拟机,您将会看到,您现在可以访问 USB设备了!就能顺利使用 USB设备了!效果如下:

 \

 

相关内容

    暂无相关文章