1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!--
|
---|
3 | manpage, user manual, usage: VBoxManage sharedfolder
|
---|
4 | -->
|
---|
5 | <!--
|
---|
6 | Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
7 |
|
---|
8 | This file is part of VirtualBox base platform packages, as
|
---|
9 | available from https://www.virtualbox.org.
|
---|
10 |
|
---|
11 | This program is free software; you can redistribute it and/or
|
---|
12 | modify it under the terms of the GNU General Public License
|
---|
13 | as published by the Free Software Foundation, in version 3 of the
|
---|
14 | License.
|
---|
15 |
|
---|
16 | This program is distributed in the hope that it will be useful, but
|
---|
17 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
19 | General Public License for more details.
|
---|
20 |
|
---|
21 | You should have received a copy of the GNU General Public License
|
---|
22 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
23 |
|
---|
24 | SPDX-License-Identifier: GPL-3.0-only
|
---|
25 | -->
|
---|
26 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
27 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
|
---|
28 | <!ENTITY % all.entities SYSTEM "all-entities.ent">
|
---|
29 | %all.entities;
|
---|
30 | ]>
|
---|
31 | <refentry id="vboxmanage-sharedfolder" lang="en">
|
---|
32 | <refentryinfo>
|
---|
33 | <pubdate>$Date: 2023-04-21 21:59:02 +0000 (Fri, 21 Apr 2023) $</pubdate>
|
---|
34 | <title>VBoxManage sharedfolder</title>
|
---|
35 | </refentryinfo>
|
---|
36 |
|
---|
37 | <refmeta>
|
---|
38 | <refentrytitle>VBoxManage-sharedfolder</refentrytitle>
|
---|
39 | <manvolnum>1</manvolnum>
|
---|
40 | </refmeta>
|
---|
41 |
|
---|
42 | <refnamediv>
|
---|
43 | <refname>VBoxManage-sharedfolder</refname>
|
---|
44 | <refpurpose>add and remove shared folders</refpurpose>
|
---|
45 | <refclass>&product-name;</refclass>
|
---|
46 | </refnamediv>
|
---|
47 |
|
---|
48 | <refsynopsisdiv>
|
---|
49 | <cmdsynopsis id="synopsis-vboxmanage-sharedfolder-add">
|
---|
50 | <!-- The 'id' is mandatory and must start with 'synopsis-'. -->
|
---|
51 | <command>VBoxManage sharedfolder add</command>
|
---|
52 | <group choice="req">
|
---|
53 | <arg choice="plain"><replaceable>uuid</replaceable></arg>
|
---|
54 | <arg choice="plain"><replaceable>vmname</replaceable></arg>
|
---|
55 | </group>
|
---|
56 | <arg choice="req">--name=<replaceable>name</replaceable></arg>
|
---|
57 | <arg choice="req">--hostpath=<replaceable>hostpath</replaceable></arg>
|
---|
58 | <arg>--readonly</arg>
|
---|
59 | <arg>--transient</arg>
|
---|
60 | <arg>--automount</arg>
|
---|
61 | <arg>--auto-mount-point=<replaceable>path</replaceable></arg>
|
---|
62 | </cmdsynopsis>
|
---|
63 |
|
---|
64 | <cmdsynopsis id="synopsis-vboxmanage-sharedfolder-remove">
|
---|
65 | <command>VBoxManage sharedfolder remove</command>
|
---|
66 | <group choice="req">
|
---|
67 | <arg choice="plain"><replaceable>uuid</replaceable></arg>
|
---|
68 | <arg choice="plain"><replaceable>vmname</replaceable></arg>
|
---|
69 | </group>
|
---|
70 | <arg choice="req">--name=<replaceable>name</replaceable></arg>
|
---|
71 | <arg>--transient</arg>
|
---|
72 | </cmdsynopsis>
|
---|
73 | </refsynopsisdiv>
|
---|
74 |
|
---|
75 | <refsect1 id="vboxmanage-sharedfolder-description">
|
---|
76 | <title>Description</title>
|
---|
77 | <para>
|
---|
78 | Shared folders enable you to share data between the host system
|
---|
79 | and guests. To use shared folders, you must first install the
|
---|
80 | &product-name; Guest Additions software on the guest OS.
|
---|
81 | </para>
|
---|
82 | <para>
|
---|
83 | The shared folder is associated with a share name and the full
|
---|
84 | path name of the folder or directory on the host system. The share
|
---|
85 | name is a unique name within the namespace of the host OS.
|
---|
86 | </para>
|
---|
87 | <refsect2 id="vboxmanage-sharedfolder-add">
|
---|
88 | <title>Add a Shared Folder</title>
|
---|
89 | <remark role="help-copy-synopsis"/>
|
---|
90 | <para>
|
---|
91 | The <command>VBoxManage sharedfolder add</command> command
|
---|
92 | creates a shared folder. The folder you specify is on the host
|
---|
93 | computer. When configured, the contents of the folder on the
|
---|
94 | host system can be shared with the guest OS.
|
---|
95 | </para>
|
---|
96 | <variablelist>
|
---|
97 | <varlistentry>
|
---|
98 | <term><option><replaceable>uuid</replaceable> | <replaceable>vmname</replaceable></option></term>
|
---|
99 | <listitem><para>
|
---|
100 | Specifies the name or UUID of the guest VM that shares a
|
---|
101 | folder with the host system.
|
---|
102 | </para></listitem>
|
---|
103 | </varlistentry>
|
---|
104 | <varlistentry>
|
---|
105 | <term>--name=<replaceable>name</replaceable></term>
|
---|
106 | <listitem><para>
|
---|
107 | Specifies the name of the share, which is a unique name
|
---|
108 | within the namespace of the host OS.
|
---|
109 | </para></listitem>
|
---|
110 | </varlistentry>
|
---|
111 | <varlistentry>
|
---|
112 | <term>--hostpath=<replaceable>hostpath</replaceable></term>
|
---|
113 | <listitem><para>
|
---|
114 | Specifies the absolute path of the folder or directory on
|
---|
115 | the host OS to share with the guest OS.
|
---|
116 | </para></listitem>
|
---|
117 | </varlistentry>
|
---|
118 | <varlistentry>
|
---|
119 | <term>--readonly</term>
|
---|
120 | <listitem><para>
|
---|
121 | Specifies that the share has only read-only access to
|
---|
122 | files at the host path.
|
---|
123 | </para><para>
|
---|
124 | By default, shared folders have read-write access to the
|
---|
125 | files at the host path. However on Linux distributions,
|
---|
126 | shared folders are mounted with 770 file permissions with
|
---|
127 | the <literal>root</literal> user and the
|
---|
128 | <literal>vboxsf</literal> group. By using this option, the
|
---|
129 | file permissions become 700.
|
---|
130 | </para></listitem>
|
---|
131 | </varlistentry>
|
---|
132 | <varlistentry>
|
---|
133 | <term>--transient</term>
|
---|
134 | <listitem><para>
|
---|
135 | Specifies that the share is transient, which means that it
|
---|
136 | can be added and removed at runtime and does not persist
|
---|
137 | after the VM stops.
|
---|
138 | </para></listitem>
|
---|
139 | </varlistentry>
|
---|
140 | <varlistentry>
|
---|
141 | <term>--automount</term>
|
---|
142 | <listitem><para>
|
---|
143 | Specifies that the share is automatically mounted.
|
---|
144 | </para></listitem>
|
---|
145 | </varlistentry>
|
---|
146 | <varlistentry>
|
---|
147 | <term>--auto-mount-point=<replaceable>path</replaceable></term>
|
---|
148 | <listitem><para>
|
---|
149 | Specifies the mount point of the share. This guest OS specific.
|
---|
150 | </para><para>
|
---|
151 | For Windows and OS/2 guest this must be an unused drive letter.
|
---|
152 | If left blank (or if the drive letter is already in use), the
|
---|
153 | last unused drive letter is used instead (i.e. searching from
|
---|
154 | <literal>Z:</literal> thru <literal>A:</literal>).
|
---|
155 | </para><para>
|
---|
156 | For Linux, Solaris and other unix guest, it must be an absolute
|
---|
157 | path like <filename>/mnt/mysharedfolder</filename>. If left
|
---|
158 | empty the default location is
|
---|
159 | <filename>/media/sf_<replaceable>sharename</replaceable></filename>.
|
---|
160 | </para></listitem>
|
---|
161 | </varlistentry>
|
---|
162 | </variablelist>
|
---|
163 | </refsect2>
|
---|
164 | <refsect2 id="vboxmanage-sharedfolder-remove">
|
---|
165 | <title>Remove a Shared Folder</title>
|
---|
166 | <remark role="help-copy-synopsis"/>
|
---|
167 | <para>
|
---|
168 | The <command>VBoxManage sharedfolder remove</command> command
|
---|
169 | removes a shared folder.
|
---|
170 | </para>
|
---|
171 | <variablelist>
|
---|
172 | <varlistentry>
|
---|
173 | <term><option><replaceable>uuid</replaceable> | <replaceable>vmname</replaceable></option></term>
|
---|
174 | <listitem><para>
|
---|
175 | Specifies the name or UUID of the guest VM that shares a
|
---|
176 | folder with the host system.
|
---|
177 | </para></listitem>
|
---|
178 | </varlistentry>
|
---|
179 | <varlistentry>
|
---|
180 | <term>--name=<replaceable>name</replaceable></term>
|
---|
181 | <listitem><para>
|
---|
182 | Specifies the name of the share to remove.
|
---|
183 | </para></listitem>
|
---|
184 | </varlistentry>
|
---|
185 | <varlistentry>
|
---|
186 | <term>--transient</term>
|
---|
187 | <listitem><para>
|
---|
188 | Specifies that the share is transient, which means that it
|
---|
189 | can be added and removed at runtime and does not persist
|
---|
190 | after the VM stops.
|
---|
191 | </para></listitem>
|
---|
192 | </varlistentry>
|
---|
193 | </variablelist>
|
---|
194 | </refsect2>
|
---|
195 | </refsect1>
|
---|
196 |
|
---|
197 | <refsect1 id="vboxmanage-sharedfolder-examples">
|
---|
198 | <title>Examples</title>
|
---|
199 | <remark role="help-scope" condition="GLOBAL" />
|
---|
200 | <para>
|
---|
201 | The following command creates a shared folder called
|
---|
202 | <filename>o7share</filename> for the <filename>ol7</filename> VM.
|
---|
203 | The share is mounted automatically when the VM is started.
|
---|
204 | </para>
|
---|
205 | <screen>$ VBoxManage sharedfolder add ol7 --name ol7share --hostpath "/home/user/ol7share" --automount</screen>
|
---|
206 | <para>
|
---|
207 | The following command removes the shared folder called
|
---|
208 | <filename>o7share</filename> for the <filename>ol7</filename> VM.
|
---|
209 | </para>
|
---|
210 | <screen>$ VBoxManage sharedfolder remove ol7 --name ol7share</screen>
|
---|
211 | </refsect1>
|
---|
212 | </refentry>
|
---|