Changes

Jump to: navigation, search

VirtualBox Shared Folders

1,967 bytes added, 15:40, 20 March 2009
Creating Shared Folders for a Running Virtual Machine
If the share is to be transient (in other words it will not be restored when the virtual machine is restarted) leave the ''Permanent'' check box unselected before clicking the ''OK'' button to create the share.
 
== Creating Shared Folders from the Command Prompt ==
 
VirtualBox shared folders can be created from the command prompt using the ''VBoxManage'' command-line tool on the host. VBoxManage is installed by default on Windows hosts in C:\Program Files\Sun\xVM VirtualBox and in /opt/VirtualBox on Linux.
 
The syntax to create a shared folder using VBoxManage is as follows:
 
VBoxManage sharedfolder add "<virtual machine>" -name "<share name>" -hostpath "<host path>"
 
where ''<virtual machine>'' is the name of the virtual machine to which the shared folder is to made available, ''<share name>'' is the name to be assigned to the share and ''<host path>'' is the path to the folder on the host file system. For example to make ''C:\Temp'' on the host system a shared folder named ''MyShare'' available to a virtual machine named ''Fedora 10'', the following command would need to be executed:
 
<pre>
vboxmanage sharedfolder add "WinVista64" -name "MyShare" -hostpath "C:\Temp"
 
VirtualBox Command Line Management Interface Version 2.1.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
</pre>
 
Note that the target virtual machine must be power off before the command is executed. Failure to meet this requirement will result in output similar to the following:
 
<pre>
[!] FAILED calling a->virtualBox->OpenSession(a->session, uuid) at line 4233!
[!] Primary RC = VBOX_E_INVALID_OBJECT_STATE (0x80BB0007) - Current object stat
e prohibits operation
[!] Full error info present: true , basic error info present: true
[!] Result Code = VBOX_E_INVALID_OBJECT_STATE (0x80BB0007) - Current object stat
e prohibits operation
[!] Text = A session for the machine 'Fedora 10' is currently open (or be
ing closed)
[!] Component = Machine, Interface: IMachine, {ea6fb7ea-1993-4642-b113-f29eb39
e0df0}
[!] Callee = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
</pre>
 
To resolve this problem, power off the virtual machine and repeat the command.
== Accessing a Shared Folder from a Windows Guest ==
1,798
edits

Navigation menu