VirtualBox 3.0 makes simple data exchange between host and guest systems possible through so-called shared folders. This article will show how to access such shared folders.
In Windows XP guest, use the following formula command: net use x: vboxsvr sharename While vboxsvr is a fixed name, replace “x:“ with the drive letter that you want to use for the share, and sharename with the share name specified before. Fajn, a proc googlis neco co mas napsany v manualu? Net use x: vboxsvr sharename. 在命令提示字元上輸入 net use x: vboxsvr sharename其中『x'代表網路磁碟機的代號,你可以自選,『sharename'為你自己所設定的分享資料夾的名字。 範例:net use x: vboxsvr Download。 (2) 客端作業系統為Linux時:.
Prerequisites
The shared folders feature is supported by the following guest operating systems:
- Windows (2000 or later)
- Linux
- Solaris
So that shared folders can be used, the respective guest extensions must be installed (such as: Guest Additions for the Windows XP Guest System or Guest Additions for the Debian 5.0 Lenny Guest System).
Shared Folders in the Windows Guest System
The following steps show how shared folders are setup (VirtualBox OSE 3.0.6 will be used in the example):
Step 1: Select from Machine -> Shared Folders from the menu
Step 2: List of shared folders (still empty in this image)
Step 3: Adding a folder
Step 4: List of shared folders
Step 5: Connecting to the drive via
net use
When using net use
, the desired drive letter must be specified first (e: in the example) and then the name of the share (composed of 'vboxsrv' and the name of the folder).
Shared Folders in the Linux Guest System
The steps for creating shared folders are the same as for Windows guests. The connection is subsequently made using the following command:
Additional Information
- Sun VirtualBox User Manual (Shared Folders section)
This article or section needs to be translated.
VirtualBox egy virtuális PC emulátor, mint a VMVare. Sok funkciója a VMware-ből ismert, de van néhány saját is. Ez állandó fejlesztésben van és új funkciókat valósítanak meg egész idő alatt. Pl. 2.2-es verzióban bevezetett OpenGL 3D gyorsítás támogatása a Linux és Solaris vendégeknek. Szép GUI felülete (Qt-t és / vagy SDL) vagy parancssori eszköztára van a virtuális gépek kezeléséhez. A felügyelet nélküli működés is támogatott. iTunes futtatása VirtualBox alatt az egyetlen módja (jelenleg), hogy szinkronizáld iPod Touch / iPhone firmware 3.0+.
Kiadások
VirtualBox két kiadásban áll rendelkezésre : VirtualBox OSE (Open Source Edition - nyílt forrású kiadás) és a VirtualBox PUEL (Personal Use and Evaluation License - személyes használat és kipróbálási licenc)
VirtualBox (OSE)
VirtualBox (OSE) a VirtualBox nyílt forrású változata, amely megtalálható a közösségi adattárban. Hiányoznak belőle bizonyos funkciók, mint például az USB eszközök támogatása, valamint a beépített RDP szerver.
VirtualBox (PUEL)
VirtualBox PUEL is a binary-only version (egyéni felhasználásra ingyenes). There are several available from the AUR, but the most popular PKGBUILD was written and is maintained by thotypous. You can download it from the AUR at this link or directly from the VirtualBox website. The PUEL edition offers the following advantages:
- Remote Display Protocol (RDP) Server - a complete RDP server on top of the virtual hardware, allowing users to connect to a virtual machine remotely using any RDP compatible client
- USB support - a virtual USB controller which allows USB 1.1 and USB 2.0 devices to be passed through to virtual machines
- USB over RDP - a combination of the RDP server and USB support, allowing users to make USB devices available to virtual machines running remotely
- iSCSI initiator - a builtin iSCSI initiator making it possible to use iSCSI targets as virtual disks without the guest requiring support for iSCSI
Telepítés
VirtualBox (OSE)
VirtualBox (OSE) elérhető a közösségi tárolóból:
This will select by default virtualbox-ose and virtualbox-modules packages. Once installed, a desktop entry can be located in Applications → System Tools → VirtualBox OSE
Now, add the desired username to the vboxusers group:
Lastly, edit /etc/rc.conf
as root and add vboxdrv to the MODULES array in order to load the VirtualBox drivers at startup. For example:
To load the module manually, run the following in a terminal as root:
VirtualBox PUEL (virtualbox_bin)
VirtualBox PUEL is available from the AUR: virtualbox_bin.
Download the tarball from the above page. As a normal user, unpack, change directory, and makepkg
:
This will create a .pkg.tar.gz file in the virtualbox_bin directory.Then, as root:
This will compile the vboxdrv kernel modules and install VirtualBox in /opt/VirtualBox
, and add the vboxusers group.
Now, add the desired username to the vboxusers group:
Lastly, edit /etc/rc.conf
as root and add vboxdrv to the MODULES array in order to load the VirtualBox drivers at startup. For example:
To load the module manually, run the following in a terminal as root:
Szükséges QT lib-ek
Currently, VirtualBox relies on QT4 for its graphical interface. If you require a GUI, ensure you have QT4 installed:
VirtualBox 2.1 (másik alternatíva)
VirtualBox.run install can be done using the All Distributions package from the Linux section of the VirtualBox Website.
Make sure the Qt 4.3.0 and SDL 1.2.7 or higher packages are installed:
Download the appropriate architecture file i386/AMD64. In a terminal window, browse to the download folder and as root run:
This will install the package to the /opt/VirtualBox-2.XXX folder.
After installation, a desktop entry can be located in Applications → System Tools → Sun xVM VirtualBox
Now, add the desired username to the vboxusers group:
Lastly, edit /etc/rc.conf
as root and add vboxdrv to the MODULES array in order to load the VirtualBox drivers at startup.
Start the VirtualBox GUI either with the command:
or using the Applications desktop entry. In version 2.1.x, an installation wizard should start and take you through the process of setting up a virtual machine. Otherwise, use the help menu to get started. Continue reading to see the more advanced options and setups...
Konfigurálás
After having installed VirtualBox on our system and added ourselves in the vboxusers group, you can start configuring our system in order to make all the features of VirtualBox available to us. Create a new virtual machine using the wizard provided by the GUI and then click settings in order to edit the virtual machine settings.
Billentyű és egér a kiszolgáló és vendég között
- To capture the keyboard and mouse, click the mouse inside the Virtual Machine display.
- To uncapture, press Ctrl-Alt-Delete.
If Xorg freezes mouse and keyboard you will have to disable the new hot plugging feature of Xorg 1.5[broken link: invalid section] by adding in /etc/X11/xorg.conf
:
This is needed for Linux guests in a Mac OS X or Windows host. Also needed for Linux hosts (tested with Arch64 host and Arch64 guest).
Also, mouse pointer integration does not work out of the box. To fix it, make sure you have the following sections in your xorg.conf
:
When generating your xorg.conf
with 'X -configure'
, you will end up with an InputDevice section that uses the mouse
driver. After installing the Guest Additions, you should replace mouse
with vboxmouse
and then restart X or reboot your VM.
Getting network in the guest machine to work
First, get network working in the guest machine. Click the network tab. The not attached option means you will have 'Network cable unplugged' or similar error in the guest computer.
NAT hálózat használata
This is the simplest way to get network. Select NAT network and it should be ready to use. Then, the guest operating system can be automatically configured by using DHCP.
The NAT IP address on the first card is 10.0.2.0, 10.0.3.0 on the second and so on.
Also in VirtualBox 2.2.0+ NAT network DHCP clients will not configure your nameserver (DNS server for windows guests) you will have to manually configure the nameserver(DNS server)
Kiszolgálói csatoló hálózat használata (VirtualBox módra)
Since VirtuaBox 2.1.0 it has a native support for host interface networking. Just add vboxnetflt to your MODULES section in rc.conf
and choose Host Interface Networking (or Bridged adapter in 2.2) in the virtual machine configuration.
Note: DHCP broadcasting does not seem to work properly under this way. Set up your guest networking with static IP assignment.
Kiszolgálói csatoló hálózat használata(Arch módra)
You are going to just edit these files and reboot:
/etc/conf.d/bridges
/etc/rc.conf
/etc/vbox/interfaces
Edit:/etc/conf.d/bridges
/etc/rc.conf
First add the bridge module to your MODULES line
Then, in your NETWORKING section, make the following changes:
Note by gpan:
/etc/rc.conf
First add the vboxdrv (and vboxnetflt in case of 2.1.0 version) module to your MODULES line:
Note by vit:
/etc/rc.conf
In my case it did not work untill adding vboxnetadp to modules.
Next, you should edit your /etc/udev/rules.d/60-vboxdrv.rules
and type:
Save it and exit.
Then open terminal and type:
Create a new bridge with this command:
/etc/vbox/interfaces
(You can set up more interfaces if you want. Sky is the limit!):
Reboot.

Kiszolgálói csatoló hálózat használata (általános)
This way is a bit harder, but it allows you to see the VirtualMachine as a 'real' computer on your local network. You need to get bridge-utils
Note by Sp1d3rmxn:
- You also need to have the TUN module loaded... in
rc.conf
add'tun'
(without the quotes) to your MODULES section. For testing this out right now without rebooting you can load the module from the command line by'modprobe tun'
. - Then you MUST set these permissions otherwise you will never get VBox to init the interface. The command is
'chmod 666 /dev/net/tun'
(without the quotes).
- Now proceed with the rest as it is written below.
Note
- As said by Sp1d3rmxn, set these permissions, but, instead of using the command, set them in
/etc/udev/rules.d/60-vboxdrv.rules
, which will apply them on boot:
1. Create a new bridge with this command:
2. If you are not using DHCP, run ifconfig and note down the network configuration of your existing network interface (e.g. eth0), which will need to be copied to the bridge.
3. Switch your physical network adapter to 'promiscuous' mode so that it will accept Ethernet frames for MAC addresses other than its own (replace eth0
with your network interface):
4. Add your network adapter to the bridge:
Net Use Share Name
5. Transfer the network configuration previously used with your physical ethernet adapter to the new bridge. If you are using DHCP, this should work:
Note by Sp1d3rmxn:
- Use
'dhcpcd -t 30 -h yourhostname br0 &'
instead of the above
Otherwise, run 'ifconfig br0 x.x.x.x netmask x.x.x.x'
and use the values that you noted down previously.
6. To create a permanent host interface called vbox0 (all host interfaces created in this way must be called vbox followed by a number) and add it to the network bridge created above, use the following command:
Replace vboxuser
with the name of the user who is supposed to be able to use the new interface.
Alternatively, you can setup VirtualBox networking through your /etc/rc.conf
to enable a bridged connection.
Kiszolgálói csatoló hálózat használata vezetéknálküli eszközzele
Bridging as described above will not work with a wireless device. Using parprouted however it can be accomplished.
- Install parprouted and iproute
# ln -s /usr/sbin/ip /sbin/ip
- Make sure IP fowarding is enabled:
# sysctl net.ipv4.ip_forward=1
, and/or edit/etc/sysctl.d/40-ip-forward.conf
. # VBoxTunctl -b -u <user>
, to create the tap device# ip link set tap0 up; ip addr add 192.168.0.X/24 dev tap0
, needs to be a manually set IP on the same network your wireless device is.# parprouted wlan0 tap0
Getting USB to work in the guest machine
(csak a PUEL kiadásban elérhető)

First in order to make USB available for use to the virtual machine you must add this line to your /etc/fstab
:
Then tell mount to reread /etc/fstab
:
108
is is the id of the group which should be allowed to access USB-devices. Change it to the id of your vboxusers group. You can get the id by running:
Restart Virtualbox and click the USB tab in the settings of the virtual machine and select which devices are available to your pc on boot. If you wish your virtual machine to use device that you have just plugged in (assuming the virtual machine has booted already), go to the VirtualMachine screen go to Devices → USB Devices and select the device you wish to plug in the virtual PC.
Note by bjimba:
Recent versions of VirtualBox, as noted above, do not require usbfs, however you will need the HAL daemon running if you do not use usbfs. See the HAL wiki page for details.
Guest Additions telepítése
The Guest Additions make the shared folders feature available, as well as better video (3D available in version 2.1+) and mouse drivers. You will have mouse integration, thus no need to release the mouse after using it in the guest and one can also enable a bidirectional clipboard.
After you booted the virtual machine, go to menu Devices → Install Guest Additions... Once you have clicked it, VirtualBox loads an ISO into the current CD-ROM, so you will not see anything happen yet ;).
You will require gcc and make if you do not already have them so install them typing the following as root:
If you are running arch in VirtualBox install the kernel headers
Then do the following as root:
for i686 systems (32 bit):
for x86-64 systems (64 bit):
It will build and install the kernel modules, install the Xorg drivers and create init scripts. It will most probably print out errors about init scripts and run levels and what not. Ignore them. You will find rc.vboxadd
in /etc/rc.d which will load them on demand. To have the Guest Additions loaded at boot time, just add those to the DAEMONS array in /etc/rc.conf
eg.:
Another option is to install one of these packages:
or
You will then have an ISO to mount as a loop device. Remember to load the loop kernel module before:
Then execute VBoxLinuxAdditions.run
as before. Before adding rc.vboxadd
to DAEMONS check /etc/rc.local
for commands to load the vboxadd daemons put by the installation script.
Windows vendégek
After installing Windows (XP etc.) on your virtual machine, simply select Devices → Install Guest Additions...
This will mount the iso image and windows should then automatically launch the guest additions installer. Follow the instructions to the end.
Megosztott mappák a kiszolgáló és vendég között
In the settings of the virtual machine go to shared folders tab and add the folders you want to share.
- NOTE: You need to install Guest Additions in order to use this feature.
In a Linux host, create one folder for sharing files.
In a Windows guest, starting with VirtualBox 1.5.0, shared folders are browseable and are therefore visible in Windows Explorer. Open Windows Explorer and look for it under My Networking Places → Entire Network → VirtualBox Shared Folders.
Alternatively, on the Windows command line, you can also use the following:
While VBOXSVR
is a fixed name, replace x:
with the drive letter that you want to use for the share, and sharename with the share name specified with VBoxManage.
In a Windows guest, to improve loading and saving files (e.g. MS Office) by VirtualBox Shared Folders edit c:windowssystem32driversetchosts as below:
In a Linux guest, use the following command:
Replace sharename
with the share name specified with VBoxManage, and mountpoint with the path where you want the share to be mounted (e.g. /mnt/share). The usual mount rules apply, that is, create this directory first if it does not exist yet.
Beyond the standard options supplied by the mount command, the following are available:
to set the character set used for I/O operations (utf8 by default) and
to specify the character set used for the shared folder name (utf8 by default).
Getting audio to work in the guest machine
In the machine settings, go to the audio tab and select the correct driver according to your sound system (ALSA, OSS or PulseAudio).
RAM és Video Memoria beállítása a virtuális PC-hez
You can change the default values by going to Settings → General.
CD-ROM beállítása a virtuális PC-hez
You can change the default values by going to Settings → CD/DVD-ROM.
Check mount CD/DVD drive and select one of the following options.
Note: If no CD-ROM drive is detected, make sure the HAL daemon is running. To start it, run the following command as root:
OpenGL gyorsítás engedélyezése Arch Linux vendégeken
Due to a bug in the VirtualBox guest addition setup scripts (as of VBox 3.1.2), simply ticking the '3D acceleration' checkbox in the virtual machine settings and installing the guest additions won't enable 3D acceleration for OpenGL applications under X for Arch Linux guests (and possibly others). In order to still get OpenGL acceleration, a bit of manual intervention is necessary after installing the guest additions. As root, run:
Also make sure the user starting X in the guest is in the video group.
D3D gyorsítás engedélyezése Windows vendégeken
Recent versions of Virtualbox have support for accelerating OpenGL inside guests. This can be enabled with a simple checkbox in the machine's settings, right below where video ram is set, and installing the Virtualbox guest additions. However, most Windows games use Direct3D (part of DirectX), not OpenGL, and are thus not helped by this method. However, it is possible to gain accelerated Direct3D in your Windows guests by borrowing the d3d libraries from Wine, which translate d3d calls into OpenGL, which is then accelerated.

After enabling OpenGL acceleration as described above, go to http://www.nongnu.org/wined3d/ in your Windows guest and grab the 'Latest version (Installer):'. Reboot the guest into safe mode (press F8 before the Windows screen appears but after the Virtualbox screen disappears), and install wined3d, accepting the defaults during the install. (You may check the box for DirectX 10 support if you like, dont touch anything else.) Reboot back to normal mode and you should have accelerated Direct3D.
VirtualBox indítása
To start Virtualbox, run the following command in a terminal:
Or in KDE menu, select: <System><Sun Virtualbox>
Virtualizált OS beállítása
Virtualbox needs to be setup to virtualize another operating system.
Egy LiveCD/DVD tesztelése
Click the 'New' button to create a new virtual environment. Name it appropriately and select Operating System type and version. Select base memory size (note: most operating systems will need at least 512MB to function properly). Create a new hard disk image (a hard disk image is a file that will contain the operating system's filesystem and files).
When the new image has been created, click 'Settings', then CD/DVD-ROM, check 'Mount CD/DVD Drive' then select an ISO image.
Karbantartás
A vboxdrv modul újraépítése
Note that any time your kernel version changes (due to upgrade, recompile, etc.) you must also rebuild the VirtualBox kernel.
Depending of your version :
On version 3.1.2 and possibly later /etc/rc.d/rc.vboxdrv does not exist.
Install kernel26-headers. This is difference than the kernel-headers package
As root, run:
On virtualbox_bin from AURor on versions 2.1 to 3.1.1, run the following command:
This binary will be located in one of the following locations: /sbin, /bin, or /usr/bin.
On versions before 2.1, update the kernel module by running the following command:
After rebuilding the module, do not forget to load it with
vboxdrv and vboxnetflt should be in the MODULES=() section of your /etc/rc.conf
Compact a Disk Image
See How to compact a VirtualBox virtual disk image (VDI)
Windows Xp és Nokia telefonok
To get working Windows XP and Nokia phones with Pc Suite mode, Virtualbox needs two simple steps:
1. Add a rule to udev with /etc/udev/rules.d/40-permissions.rules
:
2. Create the group usbfs and add its user to it
After a logout, connect a Nokia phone with PC Suite mode and start Windows XP to test new rule.
Migrating From Another VM
The qemu-img
program can be used to convert images from one format to another, or add compression or encryption to an image.
Converting from QEMU images
To convert a QEMU image for use with VirtualBox, first convert it to raw format, then use VirtualBox's conversion utility to convert and compact it in its native format.
VMware image-ok konvertálása
Do
This may not be needed anymore with recent virtualbox versions (to be confirmed)
Tippek és Trükkök
CTRL+ALT+F1 küldése a vendégnek
If your guest O/S is a Linux distro, and you want to open a new tty text shell or exit X via typing Ctrl
+Alt
+F1
, you can easily send this command to the guest O/S simply by hitting your 'Host Key' (usually the Ctrl
in the Right side of your keyboard) + F1
or F2
, etc.
Speeding up HDD Access for the Guest
Enabling the SATA(AHCI) controller within Virtualbox can speed up Host disk operations. This is available though Settings>Hard Disks in current versions of Virtual Box.
VMs indítása rendszerinduláskor Felügyelet-nélküli szerveren
Where PREFERRED_USER is the user profile that contains the VM definitions and .vdi files. This will start the VM with a RDP server running on port 3389.To determine the available VMs for a user:
To suspend the VM:
Accessing Server on VM from Host
This article or section is out of date.
Net Use X Vboxsvr Sharename
To access apache on a VM from the Host machine ONLY, simply execute the following lines on the Host:
Where 8888 is the port the host should listen on and 80 is the port the VM will send Apache's signal on. To use a port lower than 1024 on the host machine changes need to be made to the firewall on the host machine. This can also be set up to work with SSH, etc.. by changing 'Apache' to whatever service and using different ports.
Note: 'pcnet' refers to the network card of the VM. If you use an Intel card in your VM settings change 'pcnet' to 'e1000'
- from [1]
It might also be necessary to allow connections from the outside to the server in your VM. E.g. if the guest OS is Arch, you may want to add the line
to your /etc/hosts.allow file.
Arch Linux futtatása vendégként
To install guest additions with support for Xorg follow these steps:
Külső hívatkozások
