summaryrefslogtreecommitdiffstats
path: root/doc/manual/en_US/man_VBoxManage-usbfilter.xml
blob: 2be29e1c8be2bf099f07b53b2b6363f72e196129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<?xml version="1.0" encoding="UTF-8"?>
<!--
    manpage, user manual, usage: VBoxManage usbfilter
-->
<!--
    Copyright (C) 2006-2022 Oracle and/or its affiliates.

    This file is part of VirtualBox base platform packages, as
    available from https://www.virtualbox.org.

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation, in version 3 of the
    License.

    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, see <https://www.gnu.org/licenses>.

    SPDX-License-Identifier: GPL-3.0-only
-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<refentry id="vboxmanage-usbfilter" lang="en">
  <refentryinfo>
    <pubdate>$Date: 2023-01-11 13:15:45 +0100 (Wed, 11 Jan 2023) $</pubdate>
    <title>VBoxManage usbfilter</title>
  </refentryinfo>

  <refmeta>
    <refentrytitle>VBoxManage-usbfilter</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>VBoxManage-usbfilter</refname>
    <refpurpose>manage USB filters</refpurpose>
    <refclass>&product-name;</refclass>
  </refnamediv>

  <refsynopsisdiv>
<!-- The 'id' is mandatory and must start with 'synopsis-'. -->
    <cmdsynopsis id="synopsis-vboxmanage-usbfilter-add">
      <command>VBoxManage usbfilter add</command>
      <arg choice="req"><replaceable>index</replaceable>,0-<replaceable>N</replaceable></arg>
      <arg choice="req">--target=<group choice="req">
          <arg choice="plain"><replaceable>uuid</replaceable></arg>
          <arg choice="plain"><replaceable>vmname</replaceable></arg>
          <arg choice="plain">global</arg>
        </group></arg>
      <arg choice="req">--name=<replaceable>string</replaceable></arg>
      <arg choice="req">--action=ignore | hold</arg>
      <arg>--active=yes | no</arg>
      <arg>--vendorid=<replaceable>XXXX</replaceable></arg>
      <arg>--productid=<replaceable>XXXX</replaceable></arg>
      <arg>--revision=<replaceable>IIFF</replaceable></arg>
      <arg>--manufacturer=<replaceable>string</replaceable></arg>
      <arg>--product=<replaceable>string</replaceable></arg>
      <arg>--port=<replaceable>hex</replaceable></arg>
      <arg>--remote=yes | no</arg>
      <arg>--serialnumber=<replaceable>string</replaceable></arg>
      <arg>--maskedinterfaces=<replaceable>XXXXXXXX</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis id="synopsis-vboxmanage-usbfilter-modify">
      <command>VBoxManage usbfilter modify</command>
      <arg choice="req"><replaceable>index</replaceable>,0-<replaceable>N</replaceable></arg>
      <arg choice="req">--target=<group choice="req">
          <arg choice="plain"><replaceable>uuid</replaceable></arg>
          <arg choice="plain"><replaceable>vmname</replaceable></arg>
          <arg choice="plain">global</arg>
        </group></arg>
      <arg>--name=<replaceable>string</replaceable></arg>
      <arg>--action=ignore | hold</arg>
      <arg>--active=yes | no</arg>
      <arg>--vendorid=<replaceable>XXXX</replaceable> | ""</arg>
      <arg>--productid=<replaceable>XXXX</replaceable> | ""</arg>
      <arg>--revision=<replaceable>IIFF</replaceable> | ""</arg>
      <arg>--manufacturer=<replaceable>string</replaceable> | ""</arg>
      <arg>--product=<replaceable>string</replaceable> | ""</arg>
      <arg>--port=<replaceable>hex</replaceable></arg>
      <arg>--remote=yes | no</arg>
      <arg>--serialnumber=<replaceable>string</replaceable> | ""</arg>
      <arg>--maskedinterfaces=<replaceable>XXXXXXXX</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis id="synopsis-vboxmanage-usbfilter-remove">
      <command>VBoxManage usbfilter remove</command>
      <arg choice="req"><replaceable>index</replaceable>,0-<replaceable>N</replaceable></arg>
      <arg choice="req">--target=<group choice="req">
          <arg choice="plain"><replaceable>uuid</replaceable></arg>
          <arg choice="plain"><replaceable>vmname</replaceable></arg>
          <arg choice="plain">global</arg>
        </group></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>
    <para>
      The <command>VBoxManage usbfilter</command> command enables you to
      manage USB filters for a specific virtual machine (VM), or global
      USB filters that affect the entire &product-name; configuration.
    </para>
    <para>
      Global filters are applied before VM-specific filters. This means
      that you can use a global filter to prevent devices from being
      captured by any VM.
    </para>
    <para>
      Global filters are applied in a particular order. Only the first
      filter that fits a device is applied. For example, the first
      global filter makes a specific Kingston memory stick device
      available while the second filter ignores all Kingston devices.
      The result of applying these filters is that the specific Kingston
      memory stick is made available to any machine that has the
      appropriate filter, but no other Kingston devices are made
      available.
    </para>
    <refsect2>
      <title>Common Operand and Options</title>
      <variablelist>
        <varlistentry>
          <term>index,0-<replaceable>N</replaceable></term>
          <listitem><para>
              Specifies a single integer that indicates the position of
              the filter in the list. Zero (<literal>0</literal>)
              represents the first position in the list. If a filter
              already exists at the specified position, the existing
              filter and any existing filters that follow are moved down
              the list. Otherwise, the new filter is appended to the
              list.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--action=ignore | hold</option></term>
          <listitem><para>
              Specifies whether to permit VMs access to devices that fit
              the filter description (<literal>hold</literal>) or to
              deny them access (<literal>ignore</literal>). This option
              applies only to global filters.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--active=yes | no</option></term>
          <listitem><para>
              Specifies whether the USB filter is active or temporarily
              disabled. Valid values are <literal>yes</literal>, which
              activates the filter, and <literal>no</literal>, which
              disables the filter. The default value is
              <literal>yes</literal>.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--manufacturer=<replaceable>string</replaceable></option></term>
          <listitem><para>
              Specifies a manufacturer ID filter as a string. The
              default value is an empty string (<literal>""</literal>).
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--maskedinterfaces=<replaceable>XXXXXXXX</replaceable></option></term>
          <listitem><para>
              Specifies a masked interface filter that is used to hide
              one or more USB interfaces from the guest. The value is a
              bit mask where the set bits correspond to the USB
              interfaces to hide, or mask off. This feature is supported
              on Linux host systems only.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--name=<replaceable>filter-name</replaceable></option></term>
          <listitem><para>
              Specifies the name of the filter.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--port=<replaceable>hex</replaceable></option></term>
          <listitem><para>
              Specifies a hub port number filter as a string. The default
              value is an empty string (<literal>""</literal>).
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--product=<replaceable>string</replaceable></option></term>
          <listitem><para>
              Specifies a product ID filter as a string. The default
              value is an empty string (<literal>""</literal>).
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--productid=<replaceable>XXXX</replaceable></option></term>
          <listitem><para>
              Specifies a product ID filter. The string representation
              for an exact match has the form
              <replaceable>XXXX</replaceable>, where
              <replaceable>X</replaceable> is a hexadecimal digit
              including leading zeroes. The default value is an empty string
              (<literal>""</literal>).
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--remote=yes | no</option></term>
          <listitem><para>
              Specifies a remote filter that indicates whether the
              device is physically connected to a remote VRDE client or
              to a local host system. This option applies to VM filters
              only. The default value is an empty string
              (<literal>""</literal>).
            </para><remark>
              Why is the default value an empty string when valid values
              are <literal>yes</literal> or <literal>no</literal>?
            </remark></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--revision=<replaceable>IIFF</replaceable></option></term>
          <listitem><para>
              Specifies a revision ID filter. The string representation
              for an exact match has the form
              <replaceable>IIFF</replaceable>.
              <replaceable>I</replaceable> is a decimal digit of the
              integer part of the revision. <replaceable>F</replaceable>
              is a decimal digit of its fractional part that includes
              leading and trailing zeros. The default value is an empty
              string (<literal>""</literal>).
            </para><para>
              To specify a range of revision IDs, ensure that you use
              the hexadecimal form so that the revision is stored as a
              16-bit packed BCD value. For example, the
              <literal>int:0x0100-0x0199</literal> expression matches
              any revision from 1.0 to 1.99, inclusive.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--serialnumber=<replaceable>string</replaceable></option></term>
          <listitem><para>
              Specifies a serial number filter as a string. The default
              value is an empty string (<literal>""</literal>).
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--target=<replaceable>uuid</replaceable> | <replaceable>vmname</replaceable> | global</option></term>
          <listitem><para>
              Specifies the VM that the filter is attached to. You can
              specify the Universally Unique Identifier (UUID) or the
              name of the VM. To apply the filter description to all
              VMs, specify <literal>global</literal>.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--vendorid=<replaceable>XXXX</replaceable></option></term>
          <listitem><para>
              Specifies a vendor ID filter, which is a string
              representation of a four-digit hexadecimal number.
              <replaceable>X</replaceable> is the hexadecimal digit
              including leading zeroes. The default value is an empty
              string (<literal>""</literal>).
            </para></listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
    <refsect2 id="vboxmanage-usbfilter-add">
      <title>Add a USB Filter or a Global Filter</title>
      <remark role="help-copy-synopsis"/>
      <para>
        Use the <command>VBoxManage usbfilter add</command> command to
        create a new USB filter.
      </para>
      <para>
        In addition, specify parameters by which to filter. You can use
        the <command>VBoxManage list usbhost</command> command to view
        the parameters for devices that are attached to your system.
      </para>
    </refsect2>
    <refsect2 id="vboxmanage-usbfilter-modify">
      <title>Modify a USB Filter or a Global Filter</title>
      <remark role="help-copy-synopsis"/>
      <para>
        Use the <command>VBoxManage usbfilter modify</command> command
        to modify a USB filter. You can use the <command>VBoxManage list
        usbfilters</command> command to list global filter indexes and
        the <command>VBoxManage showvminfo</command> command to list
        indexes for a specific machine.
      </para>
    </refsect2>
    <refsect2 id="vboxmanage-usbfilter-remove">
      <title>Remove a USB Filter or a Global Filter</title>
      <remark role="help-copy-synopsis"/>
      <para>
        Use the <command>VBoxManage usbfilter remove</command> command
        to remove a USB filter entry.
      </para>
    </refsect2>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <remark role="help-scope" condition="GLOBAL" />
    <para>
      The following command lists the available USB devices on the host
      system.
    </para>
<screen>$ VBoxManage list usbhost</screen>
    <para>
      The following command adds a USB filter called
      <filename>filter01</filename> to the <filename>ol7</filename> VM.
      The filter specifies a Kingston DataTraveler memory stick and is
      placed first in the list of USB filters for the VM.
    </para>
<screen>$ VBoxManage usbfilter add 0 --target ol7 --name filter01 --vendorid 0x0930 --productid 0x6545</screen>
    <para>
      The following command removes the USB filter that is second in the
      list for the <filename>ol7</filename> VM.
    </para>
<screen>$ VBoxManage usbfilter remove 1 --target ol7</screen>
  </refsect1>
</refentry>