https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
VirtualBox
From ArchWiki VirtualBox is a virtual PC emulator like VMware. It is in constant development and new features are implemented all the time. e.g. version 2.2 introduced OpenGL 3D acceleration support for Linux and Solaris guests. It has a Qt GUI interface, as well as headless and SDL command line tools for managing and running virtual machines. It includes guest additions for some guest operating systems, which integrate functions of the guest and host systems, including sharing les, the clipboard, video acceleration and a seamless window integration mode. See the Wikipedia article on this subject for more information: VirtualBox Summary This article is about basic usage of VirtualBox, including running the VirtualBox software within an Arch host, and running an Arch guest inside a VirtualBox virtual machine. Required software VirtualBox (https://www.virtualbox.org) Related VirtualBox Extras PhpVirtualBox VirtualBox Arch Linux Guest On Physical Drive Advanced VirtualBox Networking Installing Arch Linux from VirtualBox Moving an existing install into (or out of) a virtual machine
Contents
1 Installation on host 1.1 Hosts running a custom kernel 1.1.1 Automatic re-compilation of the virtualbox modules with every update of any kernel 2 Setup 2.1 Loading Kernel Modules 2.2 Guest additions disc 2.3 Booting a live disc 2.4 Advanced setup 3 Arch Linux guests 3.1 Install the Guest Additions 3.2 Start the sharing services 3.3 Using USB webcam / microphone 3.4 Using Arch under Virtualbox EFI mode 4 Shared Folders as Arch Linux Guest 4.1 Synchronise guest date with host 5 Troubleshooting 5.1 USB subsystem is not working on the host or guest 5.1.1 fstab method 5.1.2 USB subsystem method 5.2 Failed to create the host-only network
1 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
interface 5.3 WinXP: Bit-depth cannot be greater than 16 5.4 Mounting .vdi Images 5.5 Startup problems because of mount failures 5.6 Copy&Paste not working on Arch Linux Guest 5.7 Mouse is resetting to (0,0) randomly and frequently 6 External links
Installation on host
The basic GPL-licensed VirtualBox suite can be installed with the virtualbox (https://www.archlinux.org/packages/?name=virtualbox) package, found in the ocial repositories. You will need to install virtualbox-host-modules (https://www.archlinux.org /packages/?name=virtualbox-host-modules) separately, if it is not installed with the the virtualbox (https://www.archlinux.org/packages/?name=virtualbox) package, which contains the precompiled modules for the stock archlinux kernel. For custom kernels, read the section below. In order to use the graphical interface, based on Qt ( VirtualBox command), you will also need to install the qt (https://www.archlinux.org/packages/?name=qt) package. This is not required for the simpler SDL-only GUI ( VBoxSDL command) nor for the VBoxHeadless command. If you are using the linux-lts (https://www.archlinux.org/packages/?name=linux-lts) kernel you should install also the virtualbox-host-modules-lts (https://www.archlinux.org/packages /?name=virtualbox-host-modules-lts) package.
2 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
Note: (Not working currently) To load/compile virtualbox modules automatically at startup you can install and add dkms (https://www.archlinux.org/packages/?name=dkms) in your DAEMONS array. Automatic re-compilation of the virtualbox modules with every update of any kernel This is possible thanks to virtualbox-hook (https://aur.archlinux.org/packages/virtualbox-hook/) from the AUR. In virtualbox-hook, the 'automatic re-compilation' functionality is done by a vbox hook on mkinitcpio after forcing to update the linux-headers package. You will need to add 'vbox' to the HOOKS array in /etc/mkinitcpio.conf, as well as 'linuxheaders' and your custom kernel(s) headers to the SyncFirst array in /etc/pacman.conf for this to work. The hook will call the dkms command to update the virtualbox modules for the version of your new kernel. Note: If you are using this functionality it's important to look at the installation process of the linux (or any other kernel) package. vbox hook will tell you if anything goes wrong.
Setup
Add the desired username to the vboxusers group. Everything may work ne without this step but shared folders and possibly some other optional stu require it to work. The new group does not automatically apply to existing sessions; the user has to log in again or start a new environment with a command like newgrp or sudo -u username -s .
# gpasswd -a username vboxusers
3 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
To load the VirtualBox driver at startup, add a le with the *.conf sux in the /etc/modules-load.d directory (e.g. virtualbox.conf) that reads "vboxdrv":
# tee /etc/modules-load.d/virtualbox.conf <<< "vboxdrv"
Note: You may need to update the kernel modules db in order to avoid 'no such le or directory' error when loading vboxdrv. Run: depmod -a . To load the module manually:
# modprobe vboxdrv
virtualbox-guest-iso
on the host (Arch Linux) running VirtualBox. It is a disc image that can be used to install the guest additions onto guest systems. Make it available to the (running) guest by going to Devices and clicking "Install Guest Additions... Host+D". Then run the guest additions installation from inside the guest.
(https://www.archlinux.org/packages/?name=virtualbox-guest-iso)
Advanced setup
See VirtualBox Extras for advanced conguration.
4 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
(https://www.archlinux.org/packages/?name=virtualbox-guest-
Create a
*.conf
le (e.g.
virtualbox.conf )
in
/etc/modules-load.d/
5 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
If you wish, a symbolic link may be made to another folder in your home directory for easy access. As an example, if a shared folder named "Dropbox" was created in the VirtualBox program on the host machine, then /media/sf_Dropbox is automatically created in the guest so this could be done:
$ ln -s /media/sf_Dropbox/* ~/dropbox
The .run script provided in the Guest Additions iso does this for you, however, Arch does not recommend using that script so this step must be done manually. The instructions for it were found here: (pastebin: [1] (http://pastebin.com/6cUE3kjF) ) . If shared folders are not auto-mounted, try manually mount (https://bbs.archlinux.org /viewtopic.php?id=70780) or read the next section.
6 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
To prevent startup problems when you're using systemd, you should add comment=systemd.automount to your /etc/fstab . This way, they are mounted only when you access those mountpoints and not during startup. Otherwise your system might become unusable after a kernel upgrade (if you install your guest additions manually).
desktop /media/desktop vboxsf uid=user,gid=group,rw,dmode=700,fmode=600,comment=systemd.automount 0 0
nofail
option.
mount.vboxsf
uid=user,gid=group,rw,dmode=700,fmode=600,nofail 0 0
virtualbox-guest-utils
(https://www.archlinux.org/packages/?name=virtualbox-guest-utils)
You also need run this daemon in order to use auto-mounting feature of shared folders that are mentioned above.
Troubleshooting
USB subsystem is not working on the host or guest
Sometimes the usb subsystem is not auto-detected resulting in an error or in a not visible USB drive on the host, even when the user is in the vboxusers group. See this topic [2] (https://bbs.archlinux.org/viewtopic.php?id=125785) for details. Note: In linux 3.5 and later usbfs was dropped. The /etc/fstab method is no longer working. Please use the USB subsystem method fstab method Adding an entry in
none /proc/bus/usb
/etc/fstab
usbfs
auto,busgid=108,busmode=0775,devgid=108,devmode=664
7 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
to
~/.bashrc
To load them automatically at boot, add a new line for each module to /etc/modules-load.d/virtualbox.conf :
vboxdrv vboxnetadp vboxnetflt
MODULES
array in
/etc/rc.conf .
This is now
Then update the color depth in the desktop properties window. If nothing happens, force the screen to redraw through some method (i.e. Host+F to redraw/enter full screen).
8 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
offData
Change /etc/fstab according to VirtualBox#Shared Folders as Arch Linux Guest. Then exec systemd with in the bash shell:
# exec /bin/systemd
visudo
to edit the sudoers le. This will check for syntax errors when
9 de 10
17/12/12 01:09
VirtualBox - ArchWiki
https://wiki.archlinux.org/index.php/VirtualBox#USB_su...
to the upper left corner of the screen. The workaround suggested in the bug discussion can be applied by adding a script to /etc/X11/xinit/xinitrc.d with:
for Z in $(xinput list | sed '/\(master\|slave \) \<pointer\>/!d;s/.*id=\([0-9]\+\).*/\1/'); do xinput set-prop $Z "Coordinate Transformation Matrix" 0.500000, 0.000000, 0.000000, 0.000000, 0.500000, 0.000000, 0.0 xinput set-prop $Z "Coordinate Transformation Matrix" 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.0 done
By changing the matrix's value and changing it back to its original value, the internal condition that triggers this bug is avoided.
External links
VirtualBox User Manual (http://www.virtualbox.org/manual/UserManual.html) Retrieved from "https://wiki.archlinux.org/index.php?title=VirtualBox&oldid=240322" Categories: Emulators Virtualization This page was last modied on 14 December 2012, at 19:56. Content is available under GNU Free Documentation License 1.3 or later.
10 de 10
17/12/12 01:09