VirtualBox

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

最後變更 在這個檔案從104688是 103992,由 vboxsync 提交於 12 月 前

doc/manual: Improve the User Manual documentation around the behaviour
of symbolic links created inside a Shared Folder on the host and then
viewed from inside a guest which doesn't have Shared Folder symlink
support. bugref:10619 ticketref:21809

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 5.9 KB
 
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>
9 With the <i>shared folders</i> feature of
10 <ph conkeyref="vbox-conkeyref-phrases/product-name"/>, you can access files of your host system from
11 within the guest system. This is similar to how you would use
12 network shares in Windows networks, except that shared folders do
13 not require networking, only the Guest Additions. Shared folders
14 are supported with Windows 2000 or later, Linux, and Oracle
15 Solaris guests. <ph conkeyref="vbox-conkeyref-phrases/product-name"/> includes experimental support for
16 Mac OS X and OS/2 guests.
17 </p>
18 <p>
19 Shared folders physically reside on the <i>host</i>
20 and are then shared with the guest, which uses a special file
21 system driver in the Guest Additions to talk to the host. For
22 Windows guests, shared folders are implemented as a pseudo-network
23 redirector. For Linux and Oracle Solaris guests, the Guest
24 Additions provide a virtual file system.
25 </p>
26 <p>
27 To share a host folder with a virtual machine in <ph conkeyref="vbox-conkeyref-phrases/product-name"/>,
28 you must specify the path of the folder and choose a
29 <i>share name</i> that the guest can use to access
30 the shared folder. This happens on the host. In the guest you can
31 then use the share name to connect to it and access files.
32 </p>
33 <p>
34 There are several ways in which shared folders can be set up for a
35 virtual machine:
36 </p>
37 <ul>
38 <li>
39 <p>
40 In the window of a running VM, you select
41 <b outputclass="bold">Shared Folders</b> from the
42 <b outputclass="bold">Devices</b> menu, or click on the
43 folder icon on the status bar in the bottom right corner.
44 </p>
45 </li>
46 <li>
47 <p>
48 If a VM is not currently running, you can configure shared
49 folders in the virtual machine's
50 <b outputclass="bold">Settings</b> window.
51 </p>
52 </li>
53 <li>
54 <p>
55 From the command line, you can create shared folders using
56 <userinput>VBoxManage</userinput>, as follows:
57 </p>
58 <pre xml:space="preserve">VBoxManage sharedfolder add "VM name" --name "sharename" --hostpath "C:\test"</pre>
59 <p> See <xref href="vboxmanage-sharedfolder.dita"/>. </p>
60 </li>
61 </ul>
62 <p>
63 There are two types of shares:
64 </p>
65 <ul>
66 <li>
67 <p>
68 Permanent shares, that are saved with the VM settings.
69 </p>
70 </li>
71 <li>
72 <p>
73 Transient shares, that are added at runtime and disappear when
74 the VM is powered off. These can be created using a check box
75 in <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/>, or by using the <codeph>--transient</codeph>
76 option of the <userinput>VBoxManage sharedfolder add</userinput>
77 command.
78 </p>
79 </li>
80 </ul>
81 <p>
82 Shared folders can either be read-write or read-only. This means
83 that the guest is either allowed to both read and write, or just
84 read files on the host. By default, shared folders are read-write.
85 Read-only folders can be created using a check box in the
86 <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/>, or with the <codeph>--readonly option</codeph> of the
87 <userinput>VBoxManage sharedfolder add</userinput> command.
88 </p>
89 <p>
90 <ph conkeyref="vbox-conkeyref-phrases/product-name"/> shared folders also support symbolic links, also
91 called <i>symlinks</i>, under the following
92 conditions:
93 </p>
94 <ul>
95 <li>
96 <p>
97 The host operating system must support symlinks. For example,
98 a macOS, Linux, or Oracle Solaris host is required.
99 </p>
100 </li>
101 <li>
102 <p>
103 The guest VM must have a version of the Guest Additions
104 installed which supports symlinks. Currently only the Linux and
105 Oracle Solaris Guest Additions support symlinks.
106 </p>
107 </li>
108 <li>
109 <p>
110 For security reasons the guest OS is not allowed to create
111 symlinks by default. If you trust the guest OS to not abuse
112 the functionality, you can enable the creation of symlinks for
113 a shared folder as follows:
114 </p>
115 <pre xml:space="preserve">VBoxManage setextradata <varname>VM-name</varname> VBoxInternal2/SharedFoldersEnableSymlinksCreate/<varname>sharename</varname> 1</pre>
116 </li>
117 </ul>
118 <p>
119 If a symbolic link is created inside a shared folder on the host
120 and the installed Guest Additions don't support symbolic links
121 then the guest will see the target of the symlink as a file
122 inside the shared folder. For example, if a symlink is created
123 to a file on a Linux host:
124 </p>
125 <p>
126 <pre xml:space="preserve">$ cd /SharedFolder &amp;&amp; ln -s filename symlink-to-filename</pre>
127 </p>
128 <p>
129 And then the shared folder is viewed on a Windows guest there
130 will be two identical files listed, <userinput>filename</userinput>
131 and <userinput>symlink-to-filename</userinput>.
132 </p>
133 </body>
134
135
136 </topic>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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