VirtualBox

source: vbox/trunk/doc/manual/en_US/dita/topics/sharedfolders.dita

Last change on this file was 109090, checked in by vboxsync, 12 days ago

Docs: bugref:10705. The following commits from doc's team git repo has been applied:

ae80a681fb1658b2e20ff12a36588811c14dfe67 Updated description of network types
4779d5f23ada981651803eb1ab029ae19f3394db Added - Shared Folders can't be used on Arm VMs running Windows
42ff285f84faa143fc53a3678b1a28a0cae68705 Started minor updates to security section
5bb1fe545161ec7211b842952221dee2021a6645 Fixed spacing
86c3d9a9eb8c807907fe3977b100712d8717a0bb Included Vadim's feedback
4117e15a9d3304ed6f011a45ad3d85b1783248bc Minor updates to security guide
67f46d035bca90c2bd0dc518456b5f4734a8f1da Updates from Vadim

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE topic
3 PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
4<topic xml:lang="en-us" id="sharedfolders">
5 <title>Shared Folders</title>
6
7 <body>
8 <p>With the <i>shared folders</i> feature of <ph conkeyref="vbox-conkeyref-phrases/product-name"/>, you can access files of your host system from within the guest system. This is similar to how you would use network shares in Windows networks, except that shared folders do not require networking, only the Guest Additions. Shared folders can be used with Windows 2000 or later, Linux, and Oracle Solaris guests. Shared Folders can't be used on Arm VMs running Windows.</p>
9 <p>Shared folders physically reside on the <i>host</i> and are then shared with the guest, which uses a
10 special file system driver in the Guest Additions to talk to the host. For Windows guests, shared folders are
11 implemented as a pseudo-network redirector. For Linux and Oracle Solaris guests, the Guest Additions provide a
12 virtual file system. </p>
13 <p>To share a host folder with a virtual machine in <ph conkeyref="vbox-conkeyref-phrases/product-name"
14 />, you must specify the path of the folder and choose a <i>share name</i> that the guest can use to access the
15 shared folder. This happens on the host. In the guest you can then use the share name to connect to it and access
16 files. </p>
17 <p>There are several ways in which shared folders can be set up for a virtual machine: </p>
18 <ul>
19 <li>
20 <p>In the window of a running VM, you select <b outputclass="bold">Shared Folders</b> from the <b
21 outputclass="bold">Devices</b> menu, or click the folder icon on the status bar in the bottom right corner. </p>
22 </li>
23 <li>
24 <p>If a VM is not currently running, you can configure shared folders in the virtual machine's <b
25 outputclass="bold">Settings</b> window. </p>
26 </li>
27 <li>
28 <p>From the command line, you can create shared folders using <userinput>VBoxManage</userinput>, as
29 follows: </p>
30 <pre xml:space="preserve">VBoxManage sharedfolder add "VM name" --name "sharename" --hostpath "C:\test"</pre>
31 <p> See <xref href="../cli_topics/vboxmanage-sharedfolder.dita"/>.</p>
32 </li>
33 </ul>
34 <p>There are two types of shares: </p>
35 <ul>
36 <li>
37 <p>Permanent shares, that are saved with the VM settings. </p>
38 </li>
39 <li>
40 <p>Transient shares, that are added at runtime and disappear when the VM is powered off. These can
41 be created using a check box in <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/>, or by using the
42 <codeph>--transient</codeph> option of the <userinput>VBoxManage sharedfolder add</userinput> command. </p>
43 </li>
44 </ul>
45 <p>Shared folders can either be read-write or read-only. This means that the guest is either allowed to
46 both read and write, or just read files on the host. By default, shared folders are read-write. Read-only folders
47 can be created using a check box in the <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/>, or with the
48 <codeph>--readonly option</codeph> of the <userinput>VBoxManage sharedfolder add</userinput> command. </p>
49 <p><ph conkeyref="vbox-conkeyref-phrases/product-name"/> shared folders also support symbolic links, also
50 called <i>symlinks</i>, under the following conditions: </p>
51 <ul>
52 <li>
53 <p>The host operating system must support symlinks. For example, a macOS, Linux, or Oracle Solaris
54 host is required. </p>
55 </li>
56 <li>
57 <p>The guest VM must have a version of the Guest Additions installed which supports symlinks.
58 Currently only the Linux and Oracle Solaris Guest Additions support symlinks. </p>
59 </li>
60 <li>
61 <p>For security reasons the guest OS is not allowed to create symlinks by default. If you trust the
62 guest OS to not abuse this functionality, you can enable the creation of symlinks for a shared folder as
63 follows: </p>
64 <pre xml:space="preserve">VBoxManage setextradata <varname>VM-name</varname> VBoxInternal2/SharedFoldersEnableSymlinksCreate/<varname>sharename</varname> 1</pre>
65 </li>
66 </ul>
67 <p>If a symbolic link is created inside a shared folder on the host and the installed Guest Additions do not
68 support symbolic links then the guest will see the target of the symlink as a file inside the shared folder. For
69 example, if a symlink is created to a file on a Linux host: </p>
70 <p>
71 <pre xml:space="preserve">$ cd /SharedFolder &amp;&amp; ln -s filename symlink-to-filename</pre>
72 </p>
73 <p>When the shared folder is viewed on a Windows guest there will be two identical files listed,
74 <userinput>filename</userinput> and <userinput>symlink-to-filename</userinput>. </p>
75 </body>
76
77
78 </topic>
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette