1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!--
|
---|
3 | manpage, user manual, usage: VBoxManage sharedfolder
|
---|
4 |
|
---|
5 | Copyright (C) 2006-2020 Oracle Corporation
|
---|
6 |
|
---|
7 | This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
8 | available from http://www.virtualbox.org. This file is free software;
|
---|
9 | you can redistribute it and/or modify it under the terms of the GNU
|
---|
10 | General Public License (GPL) as published by the Free Software
|
---|
11 | Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
12 | VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
13 | hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
14 | -->
|
---|
15 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
16 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
|
---|
17 | <!ENTITY % all.entities SYSTEM "all-entities.ent">
|
---|
18 | %all.entities;
|
---|
19 | ]>
|
---|
20 | <refentry id="vboxmanage-sharedfolder" lang="en">
|
---|
21 | <refentryinfo>
|
---|
22 | <pubdate>September 2019</pubdate>
|
---|
23 | <title>VBoxManage sharedfolder</title>
|
---|
24 | </refentryinfo>
|
---|
25 |
|
---|
26 | <refmeta>
|
---|
27 | <refentrytitle>VBoxManage-sharedfolder</refentrytitle>
|
---|
28 | <manvolnum>1</manvolnum>
|
---|
29 | </refmeta>
|
---|
30 |
|
---|
31 | <refnamediv>
|
---|
32 | <refname>VBoxManage-sharedfolder</refname>
|
---|
33 | <refpurpose>add and remove shared folders</refpurpose>
|
---|
34 | <refclass>Oracle VM VirtualBox</refclass>
|
---|
35 | </refnamediv>
|
---|
36 |
|
---|
37 | <refsynopsisdiv>
|
---|
38 | <cmdsynopsis id="synopsis-vboxmanage-sharedfolder-add">
|
---|
39 | <!-- The 'id' is mandatory and must start with 'synopsis-'. -->
|
---|
40 | <command>VBoxManage sharedfolder add</command>
|
---|
41 | <group choice="req">
|
---|
42 | <arg choice="plain"><replaceable>uuid</replaceable></arg>
|
---|
43 | <arg choice="plain"><replaceable>vmname</replaceable></arg>
|
---|
44 | </group>
|
---|
45 | <arg choice="req">--name=<replaceable>name</replaceable></arg>
|
---|
46 | <arg choice="req">--hostpath=<replaceable>hostpath</replaceable></arg>
|
---|
47 | <arg>--automount</arg>
|
---|
48 | <arg>--readonly</arg>
|
---|
49 | <arg>--transient</arg>
|
---|
50 | </cmdsynopsis>
|
---|
51 |
|
---|
52 | <cmdsynopsis id="synopsis-vboxmanage-sharedfolder-remove">
|
---|
53 | <command>VBoxManage sharedfolder remove</command>
|
---|
54 | <group choice="req">
|
---|
55 | <arg choice="plain"><replaceable>uuid</replaceable></arg>
|
---|
56 | <arg choice="plain"><replaceable>vmname</replaceable></arg>
|
---|
57 | </group>
|
---|
58 | <arg choice="req">--name=<replaceable>name</replaceable></arg>
|
---|
59 | <arg>--transient</arg>
|
---|
60 | </cmdsynopsis>
|
---|
61 | </refsynopsisdiv>
|
---|
62 |
|
---|
63 | <refsect1>
|
---|
64 | <title>Description</title>
|
---|
65 | <para>
|
---|
66 | Shared folders enable you to share data between the host system
|
---|
67 | and guests. To use shared folders, you must first install the
|
---|
68 | &product-name; Guest Additions software on the guest OS.
|
---|
69 | </para>
|
---|
70 | <para>
|
---|
71 | The shared folder is associated with a share name and the full
|
---|
72 | path name of the folder or directory on the host system. The share
|
---|
73 | name is a unique name within the namespace of the host OS.
|
---|
74 | </para>
|
---|
75 | <refsect2 id="vboxmanage-sharedfolder-add">
|
---|
76 | <title>Add a Shared Folder</title>
|
---|
77 | <remark role="help-copy-synopsis"/>
|
---|
78 | <para>
|
---|
79 | The <command>VBoxManage sharedfolder add</command> command
|
---|
80 | creates a shared folder. The folder you specify is on the host
|
---|
81 | computer. When configured, the contents of the folder on the
|
---|
82 | host system can be shared with the guest OS.
|
---|
83 | </para>
|
---|
84 | <variablelist>
|
---|
85 | <varlistentry>
|
---|
86 | <term><replaceable>uuid</replaceable>|<replaceable>vmname</replaceable></term>
|
---|
87 | <listitem><para>
|
---|
88 | Specifies the name or UUID of the guest VM that shares a
|
---|
89 | folder with the host system.
|
---|
90 | </para></listitem>
|
---|
91 | </varlistentry>
|
---|
92 | <varlistentry>
|
---|
93 | <term>--name=<replaceable>name</replaceable></term>
|
---|
94 | <listitem><para>
|
---|
95 | Specifies the name of the share, which is a unique name
|
---|
96 | within the namespace of the host OS.
|
---|
97 | </para></listitem>
|
---|
98 | </varlistentry>
|
---|
99 | <varlistentry>
|
---|
100 | <term>--hostpath=<replaceable>hostpath</replaceable></term>
|
---|
101 | <listitem><para>
|
---|
102 | Specifies the absolute path of the folder or directory on
|
---|
103 | the host OS to share with the guest OS.
|
---|
104 | </para></listitem>
|
---|
105 | </varlistentry>
|
---|
106 | <varlistentry>
|
---|
107 | <term>--automount</term>
|
---|
108 | <listitem><para>
|
---|
109 | Specifies that the share is automatically mounted. On
|
---|
110 | Linux distributions, the share is mounted at
|
---|
111 | <filename>/var/run/media/<replaceable>username</replaceable>/sf_<replaceable>sharename</replaceable></filename>
|
---|
112 | or
|
---|
113 | <filename>/media/sf_<replaceable>sharename</replaceable></filename>,
|
---|
114 | depending on your guest OS.
|
---|
115 | </para></listitem>
|
---|
116 | </varlistentry>
|
---|
117 | <varlistentry>
|
---|
118 | <term>--readonly</term>
|
---|
119 | <listitem><para>
|
---|
120 | Specifies that the share has only read-only access to
|
---|
121 | files at the host path.
|
---|
122 | </para><para>
|
---|
123 | By default, shared folders have read-write access to the
|
---|
124 | files at the host path. However on Linux distributions,
|
---|
125 | shared folders are mounted with 770 file permissions with
|
---|
126 | the <literal>root</literal> user and the
|
---|
127 | <literal>vboxsf</literal> group. By using this option, the
|
---|
128 | file permissions become 700.
|
---|
129 | </para></listitem>
|
---|
130 | </varlistentry>
|
---|
131 | <varlistentry>
|
---|
132 | <term>--transient</term>
|
---|
133 | <listitem><para>
|
---|
134 | Specifies that the share is transient, which means that it
|
---|
135 | can be added and removed at runtime and does not persist
|
---|
136 | after the VM stops.
|
---|
137 | </para></listitem>
|
---|
138 | </varlistentry>
|
---|
139 | </variablelist>
|
---|
140 | </refsect2>
|
---|
141 | <refsect2 id="vboxmanage-sharedfolder-remove">
|
---|
142 | <title>Remove a Shared Folder</title>
|
---|
143 | <remark role="help-copy-synopsis"/>
|
---|
144 | <para>
|
---|
145 | The <command>VBoxManage sharedfolder remove</command> command
|
---|
146 | removes a shared folder.
|
---|
147 | </para>
|
---|
148 | <variablelist>
|
---|
149 | <varlistentry>
|
---|
150 | <term><replaceable>uuid</replaceable>|<replaceable>vmname</replaceable></term>
|
---|
151 | <listitem><para>
|
---|
152 | Specifies the name or UUID of the guest VM that shares a
|
---|
153 | folder with the host system.
|
---|
154 | </para></listitem>
|
---|
155 | </varlistentry>
|
---|
156 | <varlistentry>
|
---|
157 | <term>--name=<replaceable>name</replaceable></term>
|
---|
158 | <listitem><para>
|
---|
159 | Specifies the name of the share to remove.
|
---|
160 | </para></listitem>
|
---|
161 | </varlistentry>
|
---|
162 | <varlistentry>
|
---|
163 | <term>--transient</term>
|
---|
164 | <listitem><para>
|
---|
165 | Specifies that the share is transient, which means that it
|
---|
166 | can be added and removed at runtime and does not persist
|
---|
167 | after the VM stops.
|
---|
168 | </para></listitem>
|
---|
169 | </varlistentry>
|
---|
170 | </variablelist>
|
---|
171 | </refsect2>
|
---|
172 | </refsect1>
|
---|
173 |
|
---|
174 | <refsect1>
|
---|
175 | <title>Examples</title>
|
---|
176 | <remark role="help-scope" condition="GLOBAL" />
|
---|
177 | <para>
|
---|
178 | The following command creates a shared folder called
|
---|
179 | <filename>o7share</filename> for the <filename>ol7</filename> VM.
|
---|
180 | The share is mounted automatically when the VM is started.
|
---|
181 | </para>
|
---|
182 | <screen>$ VBoxManage sharedfolder add ol7 --name ol7share --hostpath "/home/user/ol7share" --automount</screen>
|
---|
183 | <para>
|
---|
184 | The following command removes the shared folder called
|
---|
185 | <filename>o7share</filename> for the <filename>ol7</filename> VM.
|
---|
186 | </para>
|
---|
187 | <screen>$ VBoxManage sharedfolder remove ol7 --name ol7share</screen>
|
---|
188 | </refsect1>
|
---|
189 | </refentry>
|
---|