VirtualBox

source: vbox/trunk/doc/manual/en_US/man_VBoxManage-guestcontrol.xml@ 97894

Last change on this file since 97894 was 97349, checked in by vboxsync, 2 years ago

Guest Control/docs: Brought back the VBoxManage docs / synopsis in line with reality. Did some rewording. ru_RU translation pending.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 54.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 manpage, user manual, usage: VBoxManage guestcontrol
4-->
5<!--
6 Copyright (C) 2006-2022 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-guestcontrol" lang="en">
32 <refentryinfo>
33 <pubdate>$Date: 2022-10-31 14:38:22 +0000 (Mon, 31 Oct 2022) $</pubdate>
34 <title>VBoxManage guestcontrol</title>
35 </refentryinfo>
36
37 <refmeta>
38 <refentrytitle>VBoxManage-guestcontrol</refentrytitle>
39 <manvolnum>1</manvolnum>
40 </refmeta>
41
42 <refnamediv>
43 <refname>VBoxManage-guestcontrol</refname>
44 <refpurpose>control a virtual machine from the host system</refpurpose>
45 <refclass>&product-name;</refclass>
46 </refnamediv>
47
48 <refsynopsisdiv>
49 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-run">
50<!-- The 'id' is mandatory and must start with 'synopsis-'. -->
51 <command>VBoxManage guestcontrol</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="plain">run</arg>
57 <arg>--domain=<replaceable>domainname</replaceable></arg>
58 <arg>--dos2unix</arg>
59 <arg>--exe=<replaceable>filename</replaceable></arg>
60 <arg>--ignore-orphaned-processes</arg>
61 <group>
62 <arg choice="plain">--no-wait-stderr</arg>
63 <arg choice="plain">--wait-stderr</arg>
64 </group>
65 <group>
66 <arg choice="plain">--no-wait-stdout</arg>
67 <arg choice="plain">--wait-stdout</arg>
68 </group>
69 <group>
70 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
71 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
72 </group>
73 <arg>--profile</arg>
74 <arg>--putenv=<replaceable>var-name</replaceable>=[<replaceable>value</replaceable>]</arg>
75 <arg>--quiet</arg>
76 <arg>--timeout=<replaceable>msec</replaceable></arg>
77 <arg>--unix2dos</arg>
78 <arg>--unquoted-args</arg>
79 <arg>--username=<replaceable>username</replaceable></arg>
80 <arg>--verbose</arg>
81 <arg choice="req">-- <replaceable>program/arg0</replaceable> <arg rep="repeat"><replaceable>argument</replaceable></arg></arg>
82 </cmdsynopsis>
83
84 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-start">
85 <command>VBoxManage guestcontrol</command>
86 <group choice="req">
87 <arg choice="plain"><replaceable>uuid</replaceable></arg>
88 <arg choice="plain"><replaceable>vmname</replaceable></arg>
89 </group>
90 <arg choice="plain">start</arg>
91 <arg>--domain=<replaceable>domainname</replaceable></arg>
92 <arg>--exe=<replaceable>filename</replaceable></arg>
93 <arg>--ignore-orphaned-processes</arg>
94 <group>
95 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
96 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
97 </group>
98 <arg>--profile</arg>
99 <arg>--putenv=<replaceable>var-name</replaceable>=[<replaceable>value</replaceable>]</arg>
100 <arg>--quiet</arg>
101 <arg>--timeout=<replaceable>msec</replaceable></arg>
102 <arg>--unquoted-args</arg>
103 <arg>--username=<replaceable>username</replaceable></arg>
104 <arg>--verbose</arg>
105 <arg choice="req">-- <replaceable>program/arg0</replaceable> <arg rep="repeat"><replaceable>argument</replaceable></arg></arg>
106 </cmdsynopsis>
107
108 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-copyfrom">
109 <command>VBoxManage guestcontrol</command>
110 <group choice="req">
111 <arg choice="plain"><replaceable>uuid</replaceable></arg>
112 <arg choice="plain"><replaceable>vmname</replaceable></arg>
113 </group>
114 <arg choice="plain">copyfrom</arg>
115 <arg>--dereference</arg>
116 <arg>--domain=<replaceable>domainname</replaceable></arg>
117 <group>
118 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
119 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
120 </group>
121 <arg>--quiet</arg>
122 <arg>--no-replace</arg>
123 <arg>--recursive</arg>
124 <arg>--target-directory=<replaceable>host-destination-dir</replaceable></arg>
125 <arg>--update</arg>
126 <arg>--username=<replaceable>username</replaceable></arg>
127 <arg>--verbose</arg>
128 <arg choice="req"><replaceable>guest-source0</replaceable></arg>
129 <arg choice="plain"><replaceable>guest-source1</replaceable> [...]</arg>
130 <arg choice="req"><replaceable>host-destination</replaceable></arg>
131 </cmdsynopsis>
132
133 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-copyto">
134 <command>VBoxManage guestcontrol</command>
135 <group choice="req">
136 <arg choice="plain"><replaceable>uuid</replaceable></arg>
137 <arg choice="plain"><replaceable>vmname</replaceable></arg>
138 </group>
139 <arg choice="plain">copyto</arg>
140 <arg>--dereference</arg>
141 <arg>--domain=<replaceable>domainname</replaceable></arg>
142 <group>
143 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
144 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
145 </group>
146 <arg>--quiet</arg>
147 <arg>--no-replace</arg>
148 <arg>--recursive</arg>
149 <arg>--target-directory=<replaceable>guest-destination-dir</replaceable></arg>
150 <arg>--update</arg>
151 <arg>--username=<replaceable>username</replaceable></arg>
152 <arg>--verbose</arg>
153 <arg choice="req"><replaceable>host-source0</replaceable></arg>
154 <arg choice="plain"><replaceable>host-source1</replaceable> [...]</arg>
155 </cmdsynopsis>
156
157 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-mkdir">
158 <command>VBoxManage guestcontrol</command>
159 <group choice="req">
160 <arg choice="plain"><replaceable>uuid</replaceable></arg>
161 <arg choice="plain"><replaceable>vmname</replaceable></arg>
162 </group>
163 <arg choice="plain">mkdir</arg>
164 <arg>--domain=<replaceable>domainname</replaceable></arg>
165 <arg>--mode=<replaceable>mode</replaceable></arg>
166 <arg>--parents</arg>
167 <group>
168 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
169 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
170 </group>
171 <arg>--quiet</arg>
172 <arg>--username=<replaceable>username</replaceable></arg>
173 <arg>--verbose</arg>
174 <arg choice="req" rep="repeat"><replaceable>guest-directory</replaceable></arg>
175 </cmdsynopsis>
176
177 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-rmdir">
178 <command>VBoxManage guestcontrol</command>
179 <group choice="req">
180 <arg choice="plain"><replaceable>uuid</replaceable></arg>
181 <arg choice="plain"><replaceable>vmname</replaceable></arg>
182 </group>
183 <arg choice="plain">rmdir</arg>
184 <arg>--domain=<replaceable>domainname</replaceable></arg>
185 <group>
186 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
187 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
188 </group>
189 <arg>--quiet</arg>
190 <arg>--recursive</arg>
191 <arg>--username=<replaceable>username</replaceable></arg>
192 <arg>--verbose</arg>
193 <arg choice="req" rep="repeat"><replaceable>guest-directory</replaceable></arg>
194 </cmdsynopsis>
195
196 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-rm">
197 <command>VBoxManage guestcontrol</command>
198 <group choice="req">
199 <arg choice="plain"><replaceable>uuid</replaceable></arg>
200 <arg choice="plain"><replaceable>vmname</replaceable></arg>
201 </group>
202 <arg choice="plain">rm</arg>
203 <arg>--domain=<replaceable>domainname</replaceable></arg>
204 <arg>--force</arg>
205 <group>
206 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
207 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
208 </group>
209 <arg>--quiet</arg>
210 <arg>--username=<replaceable>username</replaceable></arg>
211 <arg>--verbose</arg>
212 <arg choice="req" rep="repeat"><replaceable>guest-directory</replaceable></arg>
213 </cmdsynopsis>
214
215 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-mv">
216 <command>VBoxManage guestcontrol</command>
217 <group choice="req">
218 <arg choice="plain"><replaceable>uuid</replaceable></arg>
219 <arg choice="plain"><replaceable>vmname</replaceable></arg>
220 </group>
221 <arg choice="plain">mv</arg>
222 <arg>--domain=<replaceable>domainname</replaceable></arg>
223 <group>
224 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
225 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
226 </group>
227 <arg>--quiet</arg>
228 <arg>--username=<replaceable>username</replaceable></arg>
229 <arg>--verbose</arg>
230 <arg choice="req" rep="repeat"><replaceable>source</replaceable></arg>
231 <arg choice="req"><replaceable>destination-directory</replaceable></arg>
232 </cmdsynopsis>
233
234 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-mktemp">
235 <command>VBoxManage guestcontrol</command>
236 <group choice="req">
237 <arg choice="plain"><replaceable>uuid</replaceable></arg>
238 <arg choice="plain"><replaceable>vmname</replaceable></arg>
239 </group>
240 <arg choice="plain">mktemp</arg>
241 <arg>--domain=<replaceable>domainname</replaceable></arg>
242 <arg>--mode=<replaceable>mode</replaceable></arg>
243 <group>
244 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
245 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
246 </group>
247 <arg>--quiet</arg>
248 <arg>--secure</arg>
249 <arg>--tmpdir=<replaceable>directory-name</replaceable></arg>
250 <arg>--username=<replaceable>username</replaceable></arg>
251 <arg>--verbose</arg>
252 <arg choice="req"><replaceable>template-name</replaceable></arg>
253 </cmdsynopsis>
254
255 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-stat">
256 <command>VBoxManage guestcontrol</command>
257 <group choice="req">
258 <arg choice="plain"><replaceable>uuid</replaceable></arg>
259 <arg choice="plain"><replaceable>vmname</replaceable></arg>
260 </group>
261 <arg choice="plain">stat</arg>
262 <arg>--domain=<replaceable>domainname</replaceable></arg>
263 <group>
264 <arg choice="plain">--passwordfile=<replaceable>password-file</replaceable></arg>
265 <arg choice="plain">--password=<replaceable>password</replaceable></arg>
266 </group>
267 <arg>--quiet</arg>
268 <arg>--username=<replaceable>username</replaceable></arg>
269 <arg>--verbose</arg>
270 <arg choice="req"><replaceable>filename</replaceable></arg>
271 </cmdsynopsis>
272
273 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-list">
274 <command>VBoxManage guestcontrol</command>
275 <group choice="req">
276 <arg choice="plain"><replaceable>uuid</replaceable></arg>
277 <arg choice="plain"><replaceable>vmname</replaceable></arg>
278 </group>
279 <arg choice="plain">list</arg>
280 <group choice="req">
281 <arg choice="plain">all</arg>
282 <arg choice="plain">files</arg>
283 <arg choice="plain">processes</arg>
284 <arg choice="plain">sessions</arg>
285 </group>
286 <arg>--quiet</arg>
287 <arg>--verbose</arg>
288 </cmdsynopsis>
289
290 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-closeprocess">
291 <command>VBoxManage guestcontrol</command>
292 <group choice="req">
293 <arg choice="plain"><replaceable>uuid</replaceable></arg>
294 <arg choice="plain"><replaceable>vmname</replaceable></arg>
295 </group>
296 <arg choice="plain">closeprocess</arg>
297 <group>
298 <arg choice="plain">--session-id=<replaceable>ID</replaceable></arg>
299 <arg choice="plain">--session-name=<replaceable>name-or-pattern</replaceable></arg>
300 </group>
301 <arg>--quiet</arg>
302 <arg>--verbose</arg>
303 <arg choice="req" rep="repeat"><replaceable>PID</replaceable></arg>
304 </cmdsynopsis>
305
306 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-closesession">
307 <command>VBoxManage guestcontrol</command>
308 <group choice="req">
309 <arg choice="plain"><replaceable>uuid</replaceable></arg>
310 <arg choice="plain"><replaceable>vmname</replaceable></arg>
311 </group>
312 <arg choice="plain">closesession</arg>
313 <group>
314 <arg choice="plain">--all</arg>
315 <arg choice="plain">--session-id=<replaceable>ID</replaceable></arg>
316 <arg choice="plain">--session-name=<replaceable>name-or-pattern</replaceable></arg>
317 </group>
318 <arg>--quiet</arg>
319 <arg>--verbose</arg>
320 </cmdsynopsis>
321
322 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-updatega">
323 <command>VBoxManage guestcontrol</command>
324 <group choice="req">
325 <arg choice="plain"><replaceable>uuid</replaceable></arg>
326 <arg choice="plain"><replaceable>vmname</replaceable></arg>
327 </group>
328 <arg choice="plain">updatega</arg>
329 <arg>--quiet</arg>
330 <arg>--verbose</arg>
331 <arg>--source=<replaceable>guest-additions.ISO</replaceable></arg>
332 <arg>--wait-start</arg>
333 <arg>-- <arg rep="repeat"><replaceable>argument</replaceable></arg></arg>
334 </cmdsynopsis>
335
336 <cmdsynopsis id="synopsis-vboxmanage-guestcontrol-watch">
337 <command>VBoxManage guestcontrol</command>
338 <group choice="req">
339 <arg choice="plain"><replaceable>uuid</replaceable></arg>
340 <arg choice="plain"><replaceable>vmname</replaceable></arg>
341 </group>
342 <arg choice="plain">watch</arg>
343 <arg>--quiet</arg>
344 <arg>--verbose</arg>
345 </cmdsynopsis>
346 </refsynopsisdiv>
347
348 <refsect1>
349 <title>Description</title>
350 <para>
351 The <command>VBoxManage guestcontrol</command> command enables you
352 to control a guest (VM) from the host system. See
353 <xref linkend="guestadd-guestcontrol" />.
354 </para>
355 <refsect2>
356 <title>Common Options and Operands</title>
357 <para>
358 The following options can be used by any of the
359 <command>VBoxManage guestcontrol</command> subcommands:
360 </para>
361 <variablelist>
362 <varlistentry>
363 <term><replaceable>uuid</replaceable>|<replaceable>vmname</replaceable></term>
364 <listitem><para>
365 Specifies the Universally Unique Identifier (UUID) or name
366 of the VM.
367 </para></listitem>
368 </varlistentry>
369 <varlistentry>
370 <term><option>--quiet</option></term>
371 <listitem><para>
372 Specifies that the command produce quieter output.
373 </para><para>
374 The short form of this option is <option>-q</option>.
375 </para></listitem>
376 </varlistentry>
377 <varlistentry>
378 <term><option>--verbose</option></term>
379 <listitem><para>
380 Specifies that the command produce more detailed output.
381 </para><para>
382 The short form of this option is <option>-v</option>.
383 </para></listitem>
384 </varlistentry>
385 </variablelist>
386 <para>
387 Some of the <command>VBoxManage guestcontrol</command>
388 subcommands require that you provide guest credentials for
389 authentication. The subcommands are:
390 <command>copyfrom</command>, <command>copyto</command>,
391 <command>mkdir</command>, <command>mktemp</command>,
392 <command>mv</command>, <command>rmdir</command>,
393 <command>rm</command>, <command>run</command>,
394 <command>start</command>, and <command>stat</command>.
395 </para>
396 <para>
397 While you cannot perform anonymous executions, a user account
398 password is optional and depends on the guest's OS security
399 policy. If a user account does not have an associated password,
400 specify an empty password. On OSes such as Windows, you might
401 need to adjust the security policy to permit user accounts with
402 an empty password. In additional, global domain rules might
403 apply and therefore cannot be changed.
404 </para>
405 <para>
406 The following options are used for authentication on the guest
407 VM:
408 </para>
409 <variablelist>
410 <varlistentry>
411 <term><option>--domain=<replaceable>domainname</replaceable></option></term>
412 <listitem><para>
413 Specifies the user domain for Windows guest VMs.
414 </para></listitem>
415 </varlistentry>
416 <varlistentry>
417 <term><option>--password=<replaceable>password</replaceable></option></term>
418 <listitem><para>
419 Specifies the password for the specified user. If you do
420 not specify a password on the command line or if the
421 password file is empty, the specified user needs to have
422 an empty password.
423 </para></listitem>
424 </varlistentry>
425 <varlistentry>
426 <term><option>--passwordfile=<replaceable>filename</replaceable></option></term>
427 <listitem><para>
428 Specifies the absolute path to a file on the guest OS that
429 contains the password for the specified user. If the
430 password file is empty or if you do not specify a password
431 on the command line, the specified user needs to have an
432 empty password.
433 </para></listitem>
434 </varlistentry>
435 <varlistentry>
436 <term><option>--username=<replaceable>username</replaceable></option></term>
437 <listitem><para>
438 Specifies an existing user on the guest OS that runs the
439 process. If unspecified, the host user runs the process.
440 </para></listitem>
441 </varlistentry>
442 </variablelist>
443 </refsect2>
444 <refsect2>
445 <title>Guest Process Restrictions</title>
446 <para>
447 By default, you can run up to five guest processes
448 simultaneously. If a new guest process starts and would exceed
449 this limit, the oldest not-running guest process is discarded to
450 run the new process. You cannot retrieve output from a discarded
451 guest process. If all five guest processes are active and
452 running, attempting to start a new guest process fails.
453 </para>
454 <para>
455 You can modify the guest process execution limit in two ways:
456 </para>
457 <itemizedlist>
458 <listitem><para>
459 Use the <command>VBoxManage setproperty</command> command to
460 update the
461 <literal>/VirtualBox/GuestAdd/VBoxService/--control-procs-max-kept</literal>
462 guest property value.
463 </para></listitem>
464 <listitem><para>
465 Use the <command>VBoxService</command> command and specify
466 the
467 <option>--control-procs-max-kept=<replaceable>value</replaceable></option>
468 option.
469 </para></listitem>
470 </itemizedlist>
471 <para>
472 After you change the limit, you must restart the guest OS.
473 </para>
474 <para>
475 You can serve an unlimited number guest processes by specifing a
476 value of <literal>0</literal>, however this action is not
477 recommended.
478 </para>
479 </refsect2>
480 <refsect2 id="vboxmanage-guestcontrol-run">
481 <title>Run a Command on the guest</title>
482 <remark role="help-copy-synopsis"/>
483 <para>
484 The <command>VBoxManage guestcontrol
485 <replaceable>vmname</replaceable> run</command> command enables
486 you to execute a program on the guest VM. Standard input,
487 standard output, and standard error are redirected from the VM
488 to the host system until the program completes.
489 </para>
490 <note>
491 <para>
492 The Windows OS imposes certain limitations for graphical
493 applications. See <xref linkend="KnownIssues" />.
494 </para>
495 </note>
496 <variablelist>
497 <varlistentry>
498 <term><option>--exe=<replaceable>path-to-executable</replaceable></option></term>
499 <listitem><para>
500 Specifies the absolute path of the executable program to
501 run on the guest VM. For example:
502 <filename>C:\Windows\System32\calc.exe</filename>.
503 </para></listitem>
504 </varlistentry>
505 <varlistentry>
506 <term><option>--timeout=<replaceable>msec</replaceable></option></term>
507 <listitem><para>
508 Specifies the maximum amount of time, in milliseconds,
509 that the program can run. While the program runs,
510 <command>VBoxManage</command> receives its output.
511 </para><para>
512 If you do not specify a timeout value,
513 <command>VBoxManage</command> waits indefinitely for the
514 process to end, or for an error to occur.
515 </para></listitem>
516 </varlistentry>
517 <varlistentry>
518 <term><option>--putenv=<replaceable>NAME</replaceable>=[<replaceable>value</replaceable>]</option></term>
519 <listitem><para>
520 Sets, modifies, and unsets environment variables in the
521 guest VM environment.
522 </para><para>
523 When you create a guest process, it runs with the default
524 standard guest OS environment. Use this option to modify
525 environment variables in that default environment.
526 </para><para>
527 Use the
528 <option>--putenv=<replaceable>NAME</replaceable>=[<replaceable>value</replaceable>]</option>
529 option to set or modify the environment variable specified
530 by <replaceable>NAME</replaceable>.
531 </para><para>
532 Use the
533 <option>--putenv=<replaceable>NAME</replaceable>=[<replaceable>value</replaceable>]</option>
534 option to unset the environment variable specified by
535 <replaceable>NAME</replaceable>.
536 </para><para>
537 Ensure that any environment variable name or value that
538 includes spaces is enclosed by quotes.
539 </para><para>
540 Specify a <option>--putenv</option> option for each
541 environment variable that you want to modify.
542 </para><para>
543 The short form of this option is <option>-E</option>.
544 </para></listitem>
545 </varlistentry>
546 <varlistentry>
547 <term><option>--unquoted-args</option></term>
548 <listitem><para>
549 Disables the escaped double quoting of arguments that you
550 pass to the program. For example,
551 <literal>\"fred\"</literal>.
552 </para></listitem>
553 </varlistentry>
554 <varlistentry>
555 <term><option>--ignore-orphaned-processes</option></term>
556 <listitem><para>
557 Ignores orphaned processes. Not yet implemented.
558 </para></listitem>
559 </varlistentry>
560 <varlistentry>
561 <term><option>--profile</option></term>
562 <listitem><para>
563 Uses a shell profile to specify the environment to use.
564 Not yet implemented.
565 </para></listitem>
566 </varlistentry>
567 <varlistentry>
568 <term><option>--no-wait-stdout</option></term>
569 <listitem><para>
570 Does not wait for the guest process to end or receive its
571 exit code and any failure explanation.
572 </para></listitem>
573 </varlistentry>
574 <varlistentry>
575 <term><option>--wait-stdout</option></term>
576 <listitem><para>
577 Waits for the guest process to end to receive its exit
578 code and any failure explanation. The
579 <command>VBoxManage</command> command receives the
580 standard output of the guest process while the process
581 runs.
582 </para></listitem>
583 </varlistentry>
584 <varlistentry>
585 <term><option>--no-wait-stderr</option></term>
586 <listitem><para>
587 Does not wait for the guest process to end to receive its
588 exit code, error messages, and flags.
589 </para></listitem>
590 </varlistentry>
591 <varlistentry>
592 <term><option>--wait-stderr</option></term>
593 <listitem><para>
594 Waits for the guest process to end to receive its exit
595 code, error messages, and flags. The
596 <command>VBoxManage</command> command receives the
597 standard error of the guest process while the process
598 runs.
599 </para></listitem>
600 </varlistentry>
601 <varlistentry>
602 <term><option>--dos2unix</option></term>
603 <listitem><para>
604 Transform DOS or Windows guest output to UNIX or Linux
605 output. This transformation changes CR + LF line endings
606 to LF. Not yet implemented.
607 </para></listitem>
608 </varlistentry>
609 <varlistentry>
610 <term><option>--unix2dos</option></term>
611 <listitem><para>
612 Transform UNIX or Linux guest output to DOS or Windows
613 output. This transformation changes LF line endings to CR
614 + LF.
615 </para></listitem>
616 </varlistentry>
617 <varlistentry>
618 <term><option>-- <replaceable>program/arg0</replaceable> [<replaceable>argument</replaceable>...]</option></term>
619 <listitem><para>
620 Specifies the name of the program and any arguments to
621 pass to the program.
622 </para><para>
623 Ensure that any command argument that includes spaces is
624 enclosed by quotes.
625 </para></listitem>
626 </varlistentry>
627 </variablelist>
628 </refsect2>
629 <refsect2 id="vboxmanage-guestcontrol-start">
630 <title>Start a Command on the guest</title>
631 <remark role="help-copy-synopsis"/>
632 <para>
633 The <command>VBoxManage guestcontrol
634 <replaceable>vmname</replaceable> start</command> command
635 enables you to execute a guest program until it completes.
636 </para>
637 <note>
638 <para>
639 The Windows OS imposes certain limitations for graphical
640 applications. See <xref linkend="KnownIssues" />.
641 </para>
642 </note>
643 </refsect2>
644 <refsect2 id="vboxmanage-guestcontrol-copyfrom">
645 <title>Copy a file from the guest to the host.</title>
646 <remark role="help-copy-synopsis"/>
647 <para>
648 The <command>VBoxManage guestcontrol
649 <replaceable>vmname</replaceable> copyfrom</command> command
650 enables you to copy a file from the guest VM to the host system.
651 </para>
652 <variablelist>
653 <varlistentry>
654 <term><option>--dereference</option></term>
655 <listitem><para>
656 Enables following of symbolic links on the guest file
657 system.
658 </para></listitem>
659 </varlistentry>
660 <varlistentry>
661 <term><option>--no-replace</option></term>
662 <listitem><para>
663 Only copies a file if it does not exist on the host yet.
664 </para><para>
665 The short form of this option is <option>-n</option>.
666 </para></listitem>
667 </varlistentry>
668 <varlistentry>
669 <term><option>--recursive</option></term>
670 <listitem><para>
671 Recursively copies files and directories from the
672 specified guest directory to the host.
673 </para><para>
674 The short form of this option is <option>-R</option>.
675 </para></listitem>
676 </varlistentry>
677 <varlistentry>
678 <term><option>--target-directory=<replaceable>host-dst-dir</replaceable></option></term>
679 <listitem><para>
680 Specifies the absolute path of the destination directory
681 on the host system. For example,
682 <filename>C:\Temp</filename>.
683 </para></listitem>
684 </varlistentry>
685 <varlistentry>
686 <term><option>--update</option></term>
687 <listitem><para>
688 Only copies a file if the guest file is newer than on the host.
689 </para><para>
690 The short form of this option is <option>-u</option>.
691 </para></listitem>
692 </varlistentry>
693 <varlistentry>
694 <term><literal><replaceable>guest-source0</replaceable> [<replaceable>guest-source1</replaceable> [...]]</literal></term>
695 <listitem><para>
696 Specifies the absolute path of one or more files to copy
697 from the guest VM. For example,
698 <filename>C:\Windows\System32\calc.exe</filename>. You can
699 use wildcards to specify multiple files. For example,
700 <filename>C:\Windows\System*\*.dll</filename>.
701 </para></listitem>
702 </varlistentry>
703 </variablelist>
704 </refsect2>
705 <refsect2 id="vboxmanage-guestcontrol-copyto">
706 <title>Copy a file from the host to the guest.</title>
707 <remark role="help-copy-synopsis"/>
708 <para>
709 The <command>VBoxManage guestcontrol
710 <replaceable>vmname</replaceable> copyto</command> command
711 enables you to copy a file from the host system to the guest VM.
712 </para>
713 <variablelist>
714 <varlistentry>
715 <term><option>--dereference</option></term>
716 <listitem><para>
717 Enables following of symbolic links on the host system.
718 </para></listitem>
719 </varlistentry>
720 <varlistentry>
721 <term><option>--no-replace</option></term>
722 <listitem><para>
723 Only copies a file if it does not exist on the guest yet.
724 </para><para>
725 The short form of this option is <option>-n</option>.
726 </para></listitem>
727 </varlistentry>
728 <varlistentry>
729 <term><option>--recursive</option></term>
730 <listitem><para>
731 Recursively copies files and directories from the
732 specified host directory to the guest.
733 </para><para>
734 The short form of this option is <option>-R</option>.
735 </para></listitem>
736 </varlistentry>
737 <varlistentry>
738 <term><option>--target-directory=<replaceable>guest-dst-dir</replaceable></option></term>
739 <listitem><para>
740 Specifies the absolute path of the destination directory
741 on the guest. For example,
742 <filename>/home/myuser/fromhost</filename>.
743 </para></listitem>
744 </varlistentry>
745 <varlistentry>
746 <term><option>--update</option></term>
747 <listitem><para>
748 Only copies a file if the host file is newer than on the guest.
749 </para><para>
750 The short form of this option is <option>-u</option>.
751 </para></listitem>
752 </varlistentry>
753 <varlistentry>
754 <term><literal><replaceable>host-source0</replaceable> [<replaceable>host-source1</replaceable> [...]]</literal></term>
755 <listitem><para>
756 Specifies the absolute path of a file to
757 copy from the host system. For example,
758 <filename>C:\Windows\System32\calc.exe</filename>. You can
759 use wildcards to specify multiple files. For example,
760 <filename>C:\Windows\System*\*.dll</filename>.
761 </para></listitem>
762 </varlistentry>
763 </variablelist>
764 </refsect2>
765 <refsect2 id="vboxmanage-guestcontrol-mkdir">
766 <title>Create a directory on the guest.</title>
767 <remark role="help-copy-synopsis"/>
768 <para>
769 The <command>VBoxManage guestcontrol
770 <replaceable>vmname</replaceable> mkdir</command> command
771 enables you to create one or more directories on the guest VM.
772 </para>
773 <para>
774 Alternate forms of this subcommand are <command>md</command>,
775 <command>createdir</command>, and
776 <command>createdirectory</command>.
777 </para>
778 <variablelist>
779 <varlistentry>
780 <term><option>--parents</option></term>
781 <listitem><para>
782 Creates any of the missing parent directories of the
783 specified directory.
784 </para><para>
785 For example, if you attempt to create the
786 <filename>D:\Foo\Bar</filename> directory and the
787 <filename>D:\Foo</filename> directory does not exist,
788 using the <option>--parents</option> creates the missing
789 <filename>D:\Foo</filename> directory. However, if you
790 attempt to create the <filename>D:\Foo\Bar</filename> and
791 do not specify the <option>--parents</option> option, the
792 command fails.
793 </para></listitem>
794 </varlistentry>
795 <varlistentry>
796 <term><option>--mode=<replaceable>mode</replaceable></option></term>
797 <listitem><para>
798 Specifies the permission mode to use for the specified
799 directory. If you specify the <option>--parents</option>
800 option, the mode is used for the associated parent
801 directories, as well. <replaceable>mode</replaceable> is a
802 four-digit octal mode such as <literal>0755</literal>.
803 </para></listitem>
804 </varlistentry>
805 <varlistentry>
806 <term><literal><replaceable>guest-dir</replaceable> [<replaceable>guest-dir</replaceable>...]</literal></term>
807 <listitem><para>
808 Specifies an absolute path of one or more directories to
809 create on the guest VM. For example,
810 <filename>D:\Foo\Bar</filename>.
811 </para><para>
812 If all of the associated parent directories do not exist
813 on the guest VM, you must specify the
814 <option>--parents</option> option.
815 </para><para>
816 You must have sufficient rights on the guest VM to create
817 the specified directory and its parent directories.
818 </para></listitem>
819 </varlistentry>
820 </variablelist>
821 </refsect2>
822 <refsect2 id="vboxmanage-guestcontrol-rmdir">
823 <title>Remove a directory from the guest.</title>
824 <remark role="help-copy-synopsis"/>
825 <para>
826 The <command>VBoxManage guestcontrol
827 <replaceable>vmname</replaceable> rmdir</command> command
828 enables you to delete the specified directory from the guest VM.
829 </para>
830 <para>
831 Alternate forms of this subcommand are
832 <command>removedir</command> and
833 <command>removedirectory</command>.
834 </para>
835 <variablelist>
836 <varlistentry>
837 <term><option>--recursive</option></term>
838 <listitem><para>
839 Recursively removes directories from the specified from
840 the guest VM.
841 </para><para>
842 The short form of this option is <option>-R</option>.
843 </para></listitem>
844 </varlistentry>
845 <varlistentry>
846 <term><literal><replaceable>guest-dir</replaceable> [<replaceable>guest-dir</replaceable>...]</literal></term>
847 <listitem><para>
848 Specifies an absolute path of one or more directories to
849 remove from the guest VM. You can use wildcards to specify
850 the directory names. For example,
851 <filename>D:\Foo\*Bar</filename>.
852 </para><para>
853 You must have sufficient rights on the guest VM to remove
854 the specified directory and its parent directories.
855 </para></listitem>
856 </varlistentry>
857 </variablelist>
858 </refsect2>
859 <refsect2 id="vboxmanage-guestcontrol-rm">
860 <title>Remove a file from the guest.</title>
861 <remark role="help-copy-synopsis"/>
862 <para>
863 The <command>VBoxManage guestcontrol
864 <replaceable>vmname</replaceable> rm</command> command enables
865 you to delete the specified files from the guest VM.
866 </para>
867 <para>
868 The alternate form of this subcommand is
869 <command>removefile</command>.
870 </para>
871 <variablelist>
872 <varlistentry>
873 <term><option>--force</option></term>
874 <listitem><para>
875 Forces the operation and overrides any confirmation
876 requests.
877 </para><para>
878 The short form of this option is <option>-f</option>.
879 </para></listitem>
880 </varlistentry>
881 <varlistentry>
882 <term><literal><replaceable>guest-file</replaceable> [<replaceable>guest-file</replaceable>...]</literal></term>
883 <listitem><para>
884 Specifies an absolute path of one or more file to remove
885 from the guest VM. You can use wildcards to specify the
886 file names. For example,
887 <filename>D:\Foo\Bar\text*.txt</filename>.
888 </para><para>
889 You must have sufficient rights on the guest VM to remove
890 the specified file.
891 </para></listitem>
892 </varlistentry>
893 </variablelist>
894 </refsect2>
895 <refsect2 id="vboxmanage-guestcontrol-mv">
896 <title>Rename a file or Directory on the guest</title>
897 <remark role="help-copy-synopsis"/>
898 <para>
899 The <command>VBoxManage guestcontrol
900 <replaceable>vmname</replaceable> mv</command> command enables
901 you to rename files and directories on the guest VM.
902 </para>
903 <para>
904 Alternate forms of this subcommand are <command>move</command>,
905 <command>ren</command>, and <command>rename</command>.
906 </para>
907 <variablelist>
908 <varlistentry>
909 <term><literal><replaceable>guest-source</replaceable> [<replaceable>guest-source</replaceable>...]</literal></term>
910 <listitem><para>
911 Specifies an absolute path of a file or a single directory
912 to move or rename on the guest VM. You can use wildcards
913 to specify the file names.
914 </para><para>
915 You must have sufficient rights on the guest VM to access
916 the specified file or directory.
917 </para></listitem>
918 </varlistentry>
919 <varlistentry>
920 <term><replaceable>dest</replaceable></term>
921 <listitem><para>
922 Specifies the absolute path of the renamed file or
923 directory, or the destination directory to which to move
924 the files. If you move only one file,
925 <replaceable>dest</replaceable> can be a file or a
926 directory, otherwise <replaceable>dest</replaceable> must
927 be a directory.
928 </para><para>
929 You must have sufficient rights on the guest VM to access
930 the destination file or directory.
931 </para></listitem>
932 </varlistentry>
933 </variablelist>
934 </refsect2>
935 <refsect2 id="vboxmanage-guestcontrol-mktemp">
936 <title>Create a Temporary File or Directory on the guest</title>
937 <remark role="help-copy-synopsis"/>
938 <para>
939 The <command>VBoxManage guestcontrol
940 <replaceable>vmname</replaceable> mktemp</command> command
941 enables you to create a temporary file or temporary directory on
942 the guest VM. You can use this command to assist with the
943 subsequent copying of files from the host system to the guest
944 VM. By default, this command creates the file or directory in
945 the guest VM's platform-specific <filename>temp</filename>
946 directory.
947 </para>
948 <para>
949 Alternate forms of this subcommand are
950 <command>createtemp</command> and
951 <command>createtemporary</command>.
952 </para>
953 <variablelist>
954 <varlistentry>
955 <term><option>--directory</option></term>
956 <listitem><para>
957 Creates a temporary directory that is specified by the
958 <replaceable>template</replaceable> operand.
959 </para></listitem>
960 </varlistentry>
961 <varlistentry>
962 <term><option>--secure</option></term>
963 <listitem><para>
964 Enforces secure file and directory creation by setting the
965 permission mode to <literal>0755</literal>. Any operation
966 that cannot be performed securely fails.
967 </para></listitem>
968 </varlistentry>
969 <varlistentry>
970 <term><option>--mode=<replaceable>mode</replaceable></option></term>
971 <listitem><para>
972 Specifies the permission mode to use for the specified
973 directory. <replaceable>mode</replaceable> is a four-digit
974 octal mode such as <literal>0755</literal>.
975 </para></listitem>
976 </varlistentry>
977 <varlistentry>
978 <term><option>--tmpdir=<replaceable>directory</replaceable></option></term>
979 <listitem><para>
980 Specifies the absolute path of the directory on the guest
981 VM in which to create the specified file or directory. If
982 unspecified, <replaceable>directory</replaceable> is the
983 platform-specific <filename>temp</filename> directory.
984 </para></listitem>
985 </varlistentry>
986 <varlistentry>
987 <term><replaceable>template</replaceable></term>
988 <listitem><para>
989 Specifies a template file name for the temporary file,
990 without a directory path. The template file name must
991 contain at least one sequence of three consecutive X
992 characters, or must end in X.
993 </para></listitem>
994 </varlistentry>
995 </variablelist>
996 </refsect2>
997 <refsect2 id="vboxmanage-guestcontrol-stat">
998 <title>Show a file or File System Status on the guest</title>
999 <remark role="help-copy-synopsis"/>
1000 <para>
1001 The <command>VBoxManage guestcontrol
1002 <replaceable>vmname</replaceable> stat</command> command enables
1003 you to show the status of files or file systems on the guest VM.
1004 </para>
1005 <variablelist>
1006 <varlistentry>
1007 <term><literal><replaceable>file</replaceable> [<replaceable>file</replaceable> ...]</literal></term>
1008 <listitem><para>
1009 Specifies an absolute path of a file or file system on the
1010 guest VM. For example,
1011 <filename>/home/foo/a.out</filename>.
1012 </para><para>
1013 You must have sufficient rights on the guest VM to access
1014 the specified files or file systems.
1015 </para></listitem>
1016 </varlistentry>
1017 </variablelist>
1018 </refsect2>
1019 <refsect2 id="vboxmanage-guestcontrol-list">
1020 <title>List the Configuration and Status Information for a Guest Virtual
1021 Machine</title>
1022 <remark role="help-copy-synopsis"/>
1023 <para>
1024 The <command>VBoxManage guestcontrol
1025 <replaceable>vmname</replaceable> list</command> command enables
1026 you to list guest control configuration and status information.
1027 For example, the output shows open guest sessions, guest
1028 processes, and files.
1029 </para>
1030 <variablelist>
1031 <varlistentry>
1032 <term><literal>all</literal>|<literal>sessions</literal>|<literal>processes</literal>|<literal>files</literal></term>
1033 <listitem><para>
1034 Indicates the type of information to show.
1035 <literal>all</literal> shows all available data,
1036 <literal>sessions</literal> shows guest sessions,
1037 <literal>processes</literal> shows processes, and
1038 <literal>files</literal> shows files.
1039 </para></listitem>
1040 </varlistentry>
1041 </variablelist>
1042 </refsect2>
1043 <refsect2 id="vboxmanage-guestcontrol-closeprocess">
1044 <title>Terminate a Process in a guest Session</title>
1045 <remark role="help-copy-synopsis"/>
1046 <para>
1047 The <command>VBoxManage guestcontrol
1048 <replaceable>vmname</replaceable> closeprocess</command> command
1049 enables you to terminate a guest process that runs in a guest
1050 session. Specify the process by using a process identifier (PID)
1051 and the session by using the session ID or name.
1052 </para>
1053 <variablelist>
1054 <varlistentry>
1055 <term><option>--session-id=<replaceable>ID</replaceable></option></term>
1056 <listitem><para>
1057 Specifies the ID of the guest session.
1058 </para></listitem>
1059 </varlistentry>
1060 <varlistentry>
1061 <term><option>--session-name=<replaceable>name</replaceable>|<replaceable>pattern</replaceable></option></term>
1062 <listitem><para>
1063 Specifies the name of the guest session. Use a pattern
1064 that contains wildcards to specify multiple sessions.
1065 </para></listitem>
1066 </varlistentry>
1067 <varlistentry>
1068 <term><literal><replaceable>PID</replaceable> [<replaceable>PID</replaceable> ...]</literal></term>
1069 <listitem><para>
1070 Specifies the list of PIDs of guest processes to
1071 terminate.
1072 </para></listitem>
1073 </varlistentry>
1074 </variablelist>
1075 </refsect2>
1076 <refsect2 id="vboxmanage-guestcontrol-closesession">
1077 <title>Close a guest Session</title>
1078 <remark role="help-copy-synopsis"/>
1079 <para>
1080 The <command>VBoxManage guestcontrol
1081 <replaceable>vmname</replaceable> closesession</command> command
1082 enables you to close a guest session. Specify the guest session
1083 either by session ID or by name.
1084 </para>
1085 <variablelist>
1086 <varlistentry>
1087 <term><option>--session-id=<replaceable>ID</replaceable></option></term>
1088 <listitem><para>
1089 Specifies the ID of the guest session.
1090 </para></listitem>
1091 </varlistentry>
1092 <varlistentry>
1093 <term><option>--session-name=<replaceable>name</replaceable>|<replaceable>pattern</replaceable></option></term>
1094 <listitem><para>
1095 Specifies the name of the guest session. Use a pattern
1096 that contains wildcards to specify multiple sessions.
1097 </para></listitem>
1098 </varlistentry>
1099 <varlistentry>
1100 <term><option>--all</option></term>
1101 <listitem><para>
1102 Closes all guest sessions.
1103 </para></listitem>
1104 </varlistentry>
1105 </variablelist>
1106 </refsect2>
1107 <refsect2 id="vboxmanage-guestcontrol-updatega">
1108 <title>Update the Guest Additions Software on the guest</title>
1109 <remark role="help-copy-synopsis"/>
1110 <para>
1111 The <command>VBoxManage guestcontrol
1112 <replaceable>vmname</replaceable> updatega</command> command
1113 enables you to update the Guest Additions software installed in
1114 the specified guest VM.
1115 </para>
1116 <para>
1117 Alternate forms of this subcommand are
1118 <command>updateadditions</command> and
1119 <command>updateguestadditions</command>.
1120 </para>
1121 <variablelist>
1122 <varlistentry>
1123 <term><option>--source=<replaceable>new-iso-path</replaceable></option></term>
1124 <listitem><para>
1125 Specifies the absolute path of the Guest Additions update
1126 <filename>.ISO</filename> file on the guest VM.
1127 </para></listitem>
1128 </varlistentry>
1129 <varlistentry>
1130 <term><option>--reboot</option></term>
1131 <listitem><para>
1132 Automatically reboots the guest after a successful Guest Additions
1133 update.
1134 </para></listitem>
1135 </varlistentry>
1136 <varlistentry>
1137 <term><option>--timeout=<replaceable>ms</replaceable></option></term>
1138 <listitem><para>
1139 Sets the timeout (in ms) to wait for the overall Guest Additions update
1140 to complete. By default no timeout is being used.
1141 </para></listitem>
1142 </varlistentry>
1143 <varlistentry>
1144 <term><option>--verify</option></term>
1145 <listitem><para>
1146 Verifies whether the Guest Additions were updated successfully after
1147 a successful installation. A guest reboot is mandatory.
1148 </para></listitem>
1149 </varlistentry>
1150 <varlistentry>
1151 <term><option>--wait-ready</option></term>
1152 <listitem><para>
1153 Waits for the current Guest Additions being ready to handle the
1154 Guest Additions update.
1155 </para>
1156 </listitem>
1157 </varlistentry>
1158 <varlistentry>
1159 <term><option>--wait-start</option></term>
1160 <listitem><para>
1161 Starts the <command>VBoxManage</command> update process on
1162 the guest VM and then waits for the Guest Additions update
1163 to begin before terminating the
1164 <command>VBoxManage</command> process.
1165 </para><para>
1166 By default, the <command>VBoxManage</command> command
1167 waits for the Guest Additions update to complete before it
1168 terminates. Use this option when a running
1169 <command>VBoxManage</command> process affects the
1170 interaction between the installer and the guest OS.
1171 </para></listitem>
1172 </varlistentry>
1173 <varlistentry>
1174 <term><option>-- <replaceable>argument</replaceable> [<replaceable>argument</replaceable> ...]</option></term>
1175 <listitem><para>
1176 Specifies optional command-line arguments to pass to the
1177 Guest Additions updater. You might use the
1178 <option>--</option> option to pass the appropriate updater
1179 arguments to retrofit features that are not yet installed.
1180 </para><para>
1181 Ensure that any command argument that includes spaces is
1182 enclosed by quotes.
1183 </para></listitem>
1184 </varlistentry>
1185 </variablelist>
1186 </refsect2>
1187 <refsect2 id="vboxmanage-guestcontrol-waitrunlevel">
1188 <title>Wait for a guest run level</title>
1189 <para>
1190 The <command>VBoxManage guestcontrol
1191 <replaceable>vmname</replaceable> waitrunlevel</command> command
1192 enables you to wait for a guest run level being reached.
1193 </para>
1194 <variablelist>
1195 <varlistentry>
1196 <term><option>--timeout=<replaceable>ms</replaceable></option></term>
1197 <listitem><para>
1198 Sets the timeout (in ms) to wait for reaching the run level.
1199 By default no timeout is being used.
1200 </para></listitem>
1201 </varlistentry>
1202 <varlistentry>
1203 <term><option><replaceable>system</replaceable>|<replaceable>userland</replaceable>|<replaceable>desktop</replaceable></option></term>
1204 <listitem><para>
1205 Specifies the run level to wait for.
1206 </para></listitem>
1207 </varlistentry>
1208 </variablelist>
1209 </refsect2>
1210 <refsect2 id="vboxmanage-guestcontrol-watch">
1211 <title>Show Current Guest Control Activity</title>
1212 <remark role="help-copy-synopsis"/>
1213 <para>
1214 The <command>VBoxManage guestcontrol
1215 <replaceable>vmname</replaceable> watch</command> command
1216 enables you to show current guest control activity.
1217 </para>
1218 </refsect2>
1219 </refsect1>
1220
1221 <refsect1>
1222 <title>Examples</title>
1223 <remark role="help-scope" condition="GLOBAL"/>
1224 <para>
1225 The following <command>VBoxManage guestcontrol run</command>
1226 command executes the <command>ls -l /usr</command> command on the
1227 <literal>My OL VM</literal> Oracle Linux VM as the
1228 <literal>user1</literal> user.
1229 </para>
1230<screen>
1231$ VBoxManage --nologo guestcontrol "My OL VM" run --exe "/bin/ls" \
1232--username user1 --passwordfile pw.txt --wait-stdout -- -l /usr
1233</screen>
1234 <para>
1235 The <option>--exe</option> option specifies the absolute path of
1236 the command to run in the guest VM, <filename>/bin/ls</filename>.
1237 Use the <option>--</option> option to pass any arguments that
1238 follow it to the <command>ls</command> command.
1239 </para>
1240 <para>
1241 Use the <option>--username</option> option to specify the user
1242 name, <literal>user1</literal> and use the
1243 <option>--passwordfile</option> option to specify the name of a
1244 file that includes the password for the <literal>user1</literal>
1245 user, <filename>pw.txt</filename>.
1246 </para>
1247 <para>
1248 The <option>--wait-stdout</option> option waits for the
1249 <command>ls</command> guest process to complete before providing
1250 the exit code and the command output. The
1251 <option>--nologo</option> option suppresses the output of the logo
1252 information.
1253 </para>
1254 <para>
1255 The following <command>VBoxManage guestcontrol run</command>
1256 command executes the <command>ipconfig</command> command on the
1257 <literal>My Win VM</literal> Windows VM as the
1258 <literal>user1</literal> user. Standard input, standard output,
1259 and standard error are redirected from the VM to the host system
1260 until the program completes.
1261 </para>
1262<screen>
1263$ VBoxManage --nologo guestcontrol "My Win VM" run \
1264--exe "c:\\windows\\system32\\ipconfig.exe" \
1265--username user1 --passwordfile pw.txt --wait-stdout
1266</screen>
1267 <para>
1268 The <option>--exe</option> specifies the absolute path of command
1269 to run in the guest VM,
1270 <filename>c:\windows\system32\ipconfig.exe</filename>. The double
1271 backslashes shown in this example are required only on UNIX host
1272 systems.
1273 </para>
1274 <para>
1275 Use the <option>--username</option> option to specify the user
1276 name, <literal>user1</literal> and use the
1277 <option>--passwordfile</option> option to specify the name of a
1278 file that includes the password for the <literal>user1</literal>
1279 user, <filename>pw.txt</filename>.
1280 </para>
1281 <para>
1282 The <option>--wait-stdout</option> option waits for the
1283 <command>ls</command> guest process to complete before providing
1284 the exit code and the command output. The
1285 <option>--nologo</option> option to suppress the output of the
1286 logo information.
1287 </para>
1288 <para>
1289 The following <command>VBoxManage guestcontrol start</command>
1290 command executes the <command>ls -l /usr</command> command on the
1291 <literal>My OL VM</literal> Oracle Linux VM until the program
1292 completes.
1293 </para>
1294<screen>
1295$ VBoxManage --nologo guestcontrol "My Win VM" start \
1296--exe "c:\\windows\\system32\\ipconfig.exe" \
1297--username user1 --passwordfile pw.txt --wait-stdout
1298</screen>
1299 </refsect1>
1300</refentry>
Note: See TracBrowser for help on using the repository browser.

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