summaryrefslogtreecommitdiffstats
path: root/doc/manual/en_US/man_VBoxManage-guestproperty.xml
blob: 09231641eeffa479c65fc55512505f407f473f54 (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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<?xml version="1.0" encoding="UTF-8"?>
<!--
    manpage, user manual, usage: VBoxManage guestproperty
-->
<!--
    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-guestproperty" lang="en">
  <refentryinfo>
    <pubdate>$Date: 2022-09-07 16:31:32 +0200 (Wed, 07 Sep 2022) $</pubdate>
    <title>VBoxManage guestproperty</title>
  </refentryinfo>

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

  <refnamediv>
    <refname>VBoxManage-guestproperty</refname>
    <refpurpose>manage virtual machine guest properties</refpurpose>
    <refclass>&product-name;</refclass>
  </refnamediv>

  <refsynopsisdiv>
<!-- The 'id' is mandatory and must start with 'synopsis-'. -->
    <cmdsynopsis id="synopsis-vboxmanage-guestproperty-get">
      <command>VBoxManage guestproperty get</command>
      <group choice="req">
        <arg choice="plain"><replaceable>uuid</replaceable></arg>
        <arg choice="plain"><replaceable>vmname</replaceable></arg>
      </group>
      <arg choice="req"><replaceable>property-name</replaceable></arg>
      <arg>--verbose</arg>
    </cmdsynopsis>

    <cmdsynopsis id="synopsis-vboxmanage-guestproperty-enumerate">
      <command>VBoxManage guestproperty enumerate</command>
      <group choice="req">
        <arg choice="plain"><replaceable>uuid</replaceable></arg>
        <arg choice="plain"><replaceable>vmname</replaceable></arg>
      </group>
      <arg>--no-timestamp</arg>
      <arg>--no-flags</arg>
      <arg>--relative</arg>
      <arg>--old-format</arg>
      <arg rep="repeat"><replaceable>patterns</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis id="synopsis-vboxmanage-guestproperty-set">
      <command>VBoxManage guestproperty set</command>
      <group choice="req">
        <arg choice="plain"><replaceable>uuid</replaceable></arg>
        <arg choice="plain"><replaceable>vmname</replaceable></arg>
      </group>
      <arg choice="req"><replaceable>property-name</replaceable></arg>
      <arg><replaceable>property-value</replaceable><arg>--flags=<replaceable>flags</replaceable></arg></arg>
    </cmdsynopsis>

    <cmdsynopsis id="synopsis-vboxmanage-guestproperty-unset">
      <command>VBoxManage guestproperty unset</command>
      <group choice="req">
        <arg choice="plain"><replaceable>uuid</replaceable></arg>
        <arg choice="plain"><replaceable>vmname</replaceable></arg>
      </group>
      <arg choice="req"><replaceable>property-name</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis id="synopsis-vboxmanage-guestproperty-wait">
      <command>VBoxManage guestproperty wait</command>
      <group choice="req">
        <arg choice="plain"><replaceable>uuid</replaceable></arg>
        <arg choice="plain"><replaceable>vmname</replaceable></arg>
      </group>
      <arg choice="req"><replaceable>patterns</replaceable></arg>
      <arg>--timeout=<replaceable>msec</replaceable></arg>
      <arg>--fail-on-timeout</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>
    <para>
      The <command>VBoxManage guestproperty</command> command enables
      you to set or retrieve the properties of a running virtual machine
      (VM). See <xref linkend="guestadd-guestprops" />. Guest properties
      are arbitrary name-value string pairs that can be written to and
      read from by either the guest or the host. As a result, these
      properties can be used as a low-volume communication channel for
      strings provided that a guest is running and has the Guest
      Additions installed. In addition, the Guest Additions
      automatically set and maintain values whose keywords begin with
      <literal>/VirtualBox/</literal>.
    </para>
    <refsect2>
      <title>General Command Operand</title>
      <variablelist>
        <varlistentry>
          <term><replaceable>uuid</replaceable>|<replaceable>vmname</replaceable></term>
          <listitem><para>
              Specifies the Universally Unique Identifier (UUID) or name
              of the VM.
            </para></listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
    <refsect2 id="vboxmanage-guestproperty-enumerate">
      <title>List All Properties for a Virtual Machine</title>
      <remark role="help-copy-synopsis"/>
      <para>
        <!-- @todo the help output doesn't correctly insert a space after the /command tag if it comes last on a line...  -->
        The <command>VBoxManage guestproperty enumerate</command> command
        lists each guest property and value for the specified
        VM. Note that the output is limited if the guest's service is
        not updating the properties, for example because the VM is not
        running or because the Guest Additions are not installed.
      </para>
      <variablelist>
        <varlistentry>
          <term><option>--relative</option></term>
          <listitem><para>Display the timestamp relative to current time.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--no-timestamp</option></term>
          <listitem><para>Do not display the timestamp of the last update.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--no-flags</option></term>
          <listitem><para>Do not display the flags.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--old-format</option></term>
          <listitem><para>Use the output format from VirtualBox 6.1 and earlier.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option><replaceable>pattern</replaceable></option></term>
          <listitem><para>
              Filters the list of properties based on the specified
              pattern, which can contain the following wildcard
              characters:
            </para><variablelist>
              <varlistentry>
                <term><literal>*</literal> (asterisk)</term>
                <listitem><para>
                    Represents any number of characters. For example,
                    the <literal>/VirtualBox*</literal> pattern matches
                    all properties that begin with
                    <literal>/VirtualBox</literal>.
                  </para></listitem>
              </varlistentry>
              <varlistentry>
                <term><literal>?</literal> (question mark)</term>
                <listitem><para>
                    Represents a single arbitrary character. For
                    example, the <literal>fo?</literal> pattern matches
                    both <literal>foo</literal> and
                    <literal>for</literal>.
                  </para></listitem>
              </varlistentry>
              <varlistentry>
                <term><literal>|</literal> (pipe)</term>
                <listitem><para>
                    Specifies multiple alternative patterns. For
                    example, the <literal>s*|t*</literal> pattern
                    matches any property that begins with
                    <literal>s</literal> or <literal>t</literal>.
                  </para></listitem>
              </varlistentry>
            </variablelist></listitem>
        </varlistentry>

        </variablelist>
    </refsect2>
    <refsect2 id="vboxmanage-guestproperty-get">
      <title>Retrieve a Property Value for a Virtual Machine</title>
      <remark role="help-copy-synopsis"/>
      <para>
        The <command>VBoxManage guestproperty get</command> command
        retrieves the value of the specified property. If the property
        cannot be found, for example because the guest is not running,
        the command issues the following message:
      </para>
<screen>No value set!</screen>
      <variablelist>
        <varlistentry>
          <term><replaceable>property-name</replaceable></term>
          <listitem><para>
              Specifies the name of the property.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--verbose</option></term>
          <listitem><para>
              Provides the property value, timestamp, and any specified
              value attributes.
            </para></listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
    <refsect2 id="vboxmanage-guestproperty-set">
      <title>Set a Property Value for a Virtual Machine</title>
      <remark role="help-copy-synopsis"/>
      <para>
        The <command>VBoxManage guestproperty set</command> command
        enables you to set a guest property by specifying the property
        and its value. If you omit the value, the property is deleted.
      </para>
      <variablelist>
        <varlistentry>
          <term><replaceable>property-name</replaceable></term>
          <listitem><para>
              Specifies the name of the property.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><replaceable>property-value</replaceable></term>
          <listitem><para>
              Specifies the value of the property. If no value is
              specified, any existing value is removed.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--flags=<replaceable>flags</replaceable></option></term>
          <listitem><para>
              Specify the additional attributes of the value. The
              following attributes can be specified as a comma-separated
              list:
            </para><variablelist>
              <varlistentry>
                <term><literal>TRANSIENT</literal></term>
                <listitem><para>
                    Removes the value with the VM data when the VM
                    exits.
                  </para></listitem>
              </varlistentry>
              <varlistentry>
                <term><literal>TRANSRESET</literal></term>
                <listitem><para>
                    Removes the value when the VM restarts or exits.
                  </para></listitem>
              </varlistentry>
              <varlistentry>
                <term><literal>RDONLYGUEST</literal></term>
                <listitem><para>
                    Specifies that the value can be changed only by the
                    host and that the guest can read the value.
                  </para></listitem>
              </varlistentry>
              <varlistentry>
                <term><literal>RDONLYHOST</literal></term>
                <listitem><para>
                    Specifies that the value can be changed only by the
                    guest and that the host can read the value.
                  </para></listitem>
              </varlistentry>
              <varlistentry>
                <term><literal>READONLY</literal></term>
                <listitem><para>
                    Specifies that the value cannot be changed.
                  </para></listitem>
              </varlistentry>
            </variablelist></listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
    <refsect2 id="vboxmanage-guestproperty-wait">
      <title>Wait for a Property Value to Be Created, Deleted, or Changed</title>
      <remark role="help-copy-synopsis"/>
      <para>
        The <command>VBoxManage guestproperty wait</command> command
        waits for a particular value that is described by the pattern
        string to change, to be deleted, or to be created.
      </para>
      <variablelist>
        <varlistentry>
          <term><replaceable>patterns</replaceable></term>
          <listitem><para>
              Specifies a pattern that matches the properties on which
              you want to wait. For information about the pattern
              wildcards, see the description of the
              <option>--patterns</option> option.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--timeout<replaceable>msec</replaceable></option></term>
          <listitem><para>
              Specifies the number of microseconds to wait.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><option>--fail-on-timeout</option></term>
          <listitem><para>
              Specifies that the command fails if the timeout is
              reached.
            </para></listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
    <refsect2 id="vboxmanage-guestproperty-unset">
      <title>Unset a Virtual Machine Property Value</title>
      <remark role="help-copy-synopsis"/>
      <para>
        The <command>VBoxManage guestproperty unset</command> command
        unsets the value of a guest property.
      </para>
      <para>
        The alternate form of this subcommand is
        <command>delete</command>.
      </para>
      <variablelist>
        <varlistentry>
          <term><replaceable>property-name</replaceable></term>
          <listitem><para>
              Specifies the name of the property.
            </para></listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <remark role="help-scope" condition="GLOBAL" />
    <para>
      The following command lists the guest properties and their values
      for the <literal>win8</literal> VM.
    </para>
<screen>$ VBoxManage guestproperty enumerate win8</screen>
    <para>
      The following command creates a guest property called
      <literal>region</literal> for the <literal>win8</literal> VM. The
      value of the property is set to <literal>west</literal>.
    </para>
<screen>$ VBoxManage guestproperty set win8 region west</screen>
  </refsect1>
</refentry>