VirtualBox

source: vbox/trunk/doc/manual/en_US/user_VBoxManage.xml@ 55214

Last change on this file since 55214 was 55172, checked in by vboxsync, 10 years ago

doc/manual: nit.

File size: 193.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4<chapter id="vboxmanage">
5 <title>VBoxManage</title>
6
7 <sect1>
8 <title>Introduction</title>
9
10 <para>As briefly mentioned in <xref linkend="frontends" />, VBoxManage is
11 the command-line interface to VirtualBox. With it, you can completely
12 control VirtualBox from the command line of your host operating system.
13 VBoxManage supports all the features that the graphical user interface
14 gives you access to, but it supports a lot more than that. It exposes
15 really all the features of the virtualization engine, even those that
16 cannot (yet) be accessed from the GUI.</para>
17
18 <para>You will need to use the command line if you want to</para>
19
20 <para><itemizedlist>
21 <listitem>
22 <para>use a different user interface than the main GUI (for example,
23 VBoxSDL or the VBoxHeadless server);</para>
24 </listitem>
25
26 <listitem>
27 <para>control some of the more advanced and experimental
28 configuration settings for a VM.</para>
29 </listitem>
30 </itemizedlist></para>
31
32 <para>There are two main things to keep in mind when using
33 <computeroutput>VBoxManage</computeroutput>: First,
34 <computeroutput>VBoxManage</computeroutput> must always be used with a
35 specific "subcommand", such as "list" or "createvm" or "startvm". All the
36 subcommands that <computeroutput>VBoxManage</computeroutput> supports are
37 described in detail in <xref linkend="vboxmanage" />.</para>
38
39 <para>Second, most of these subcommands require that you specify a
40 particular virtual machine after the subcommand. There are two ways you
41 can do this:</para>
42
43 <itemizedlist>
44 <listitem>
45 <para>You can specify the VM name, as it is shown in the VirtualBox
46 GUI. Note that if that name contains spaces, then you must enclose the
47 entire name in double quotes (as it is always required with command
48 line arguments that contain spaces).</para>
49
50 <para>For example:<screen>VBoxManage startvm "Windows XP"</screen></para>
51 </listitem>
52
53 <listitem>
54 <para>You can specify the UUID, which is the internal unique
55 identifier that VirtualBox uses to refer to the virtual machine.
56 Assuming that the aforementioned VM called "Windows XP" has the UUID
57 shown below, the following command has the same effect as the
58 previous:<screen>VBoxManage startvm 670e746d-abea-4ba6-ad02-2a3b043810a5</screen></para>
59 </listitem>
60 </itemizedlist>
61
62 <para>You can type <computeroutput>VBoxManage list vms</computeroutput> to
63 have all currently registered VMs listed with all their settings,
64 including their respective names and UUIDs.</para>
65
66 <para>Some typical examples of how to control VirtualBox from the command
67 line are listed below:</para>
68
69 <itemizedlist>
70 <listitem>
71 <para>To create a new virtual machine from the command line and
72 immediately register it with VirtualBox, use
73 <computeroutput>VBoxManage createvm</computeroutput> with the
74 <computeroutput>--register</computeroutput> option,<footnote>
75 <para>For details, see <xref
76 linkend="vboxmanage-createvm" />.</para>
77 </footnote> like this:</para>
78
79 <screen>$ VBoxManage createvm --name "SUSE 10.2" --register
80VirtualBox Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
81(C) 2005-$VBOX_C_YEAR $VBOX_VENDOR
82All rights reserved.
83
84Virtual machine 'SUSE 10.2' is created.
85UUID: c89fc351-8ec6-4f02-a048-57f4d25288e5
86Settings file: '/home/username/.config/VirtualBox/Machines/SUSE 10.2/SUSE 10.2.xml'</screen>
87
88 <para>As can be seen from the above output, a new virtual machine has
89 been created with a new UUID and a new XML settings file.</para>
90 </listitem>
91
92 <listitem>
93 <para>To show the configuration of a particular VM, use
94 <computeroutput>VBoxManage showvminfo</computeroutput>; see <xref
95 linkend="vboxmanage-showvminfo" /> for details and an example.</para>
96 </listitem>
97
98 <listitem>
99 <para>To change settings while a VM is powered off, use
100 <computeroutput>VBoxManage modifyvm</computeroutput>, e.g. as
101 follows:<screen>VBoxManage modifyvm "Windows XP" --memory 512</screen></para>
102
103 <para>For details, see <xref linkend="vboxmanage-modifyvm" />.</para>
104 </listitem>
105
106 <listitem>
107 <para>To change the storage configuration (e.g. to add a storage
108 controller and then a virtual disk), use <computeroutput>VBoxManage
109 storagectl</computeroutput> and <computeroutput>VBoxManage
110 storageattach</computeroutput>; see <xref
111 linkend="vboxmanage-storagectl" /> and <xref
112 linkend="vboxmanage-storageattach" /> for details.</para>
113 </listitem>
114
115 <listitem>
116 <para>To control VM operation, use one of the following:<itemizedlist>
117 <listitem>
118 <para>To start a VM that is currently powered off, use
119 <computeroutput>VBoxManage startvm</computeroutput>; see <xref
120 linkend="vboxmanage-startvm" /> for details.</para>
121 </listitem>
122
123 <listitem>
124 <para>To pause or save a VM that is currently running or change
125 some of its settings, use <computeroutput>VBoxManage
126 controlvm</computeroutput>; see <xref
127 linkend="vboxmanage-controlvm" /> for details.</para>
128 </listitem>
129 </itemizedlist></para>
130 </listitem>
131 </itemizedlist>
132 </sect1>
133
134 <sect1>
135 <title>Commands overview</title>
136
137 <para>When running VBoxManage without parameters or when supplying an
138 invalid command line, the below syntax diagram will be shown. Note that
139 the output will be slightly different depending on the host platform; when
140 in doubt, check the output of <computeroutput>VBoxManage</computeroutput>
141 for the commands available on your particular host.</para>
142
143 <screen>$VBOX_MANAGE_OUTPUT</screen>
144
145 <para>Each time VBoxManage is invoked, only one command can be executed.
146 However, a command might support several subcommands which then can be
147 invoked in one single call. The following sections provide detailed
148 reference information on the different commands.</para>
149 </sect1>
150
151 <sect1 id="vboxmanage-general">
152 <title>General options</title>
153 <para>
154 <itemizedlist>
155 <listitem>
156 <para><computeroutput>--version</computeroutput>: show the version of
157 this tool and exit.</para>
158 </listitem>
159 <listitem>
160 <para><computeroutput>--nologo</computeroutput>: suppress the output
161 of the logo information (useful for scripts)</para>
162 </listitem>
163 <listitem>
164 <para><computeroutput>--settingspw</computeroutput>: specifiy a settings
165 password</para>
166 </listitem>
167 <listitem>
168 <para><computeroutput>--settingspwfile</computeroutput>: specify a file
169 containing the settings password.</para>
170 </listitem>
171 </itemizedlist>
172 The settings password is used for certain settings which need to be
173 stored encrypted for security reasons. At the moment, the only encrypted
174 setting is the iSCSI initiator secret (see
175 <xref linkend="vboxmanage-storageattach" /> for details). As long as no
176 settings password is specified, this information is stored in
177 <emphasis role="bold">plain text</emphasis>. After using the
178 <computeroutput>--settingspw|--settingspwfile</computeroutput> option
179 once, it must be always used, otherwise the encrypted setting cannot
180 be unencrypted.
181 </para>
182 </sect1>
183
184 <sect1 id="vboxmanage-list">
185 <title>VBoxManage list</title>
186
187 <para>The <computeroutput>list</computeroutput> command gives relevant
188 information about your system and information about VirtualBox's current
189 settings.</para>
190
191 <para>The following subcommands are available with
192 <computeroutput>VBoxManage list</computeroutput>: <itemizedlist>
193 <listitem>
194 <para><computeroutput>vms</computeroutput> lists all virtual
195 machines currently registered with VirtualBox. By default this
196 displays a compact list with each VM's name and UUID; if you also
197 specify <computeroutput>--long</computeroutput> or
198 <computeroutput>-l</computeroutput>, this will be a detailed list as
199 with the <computeroutput>showvminfo</computeroutput> command (see
200 below).</para>
201 </listitem>
202
203 <listitem>
204 <para><computeroutput>runningvms</computeroutput> lists all
205 currently running virtual machines by their unique identifiers
206 (UUIDs) in the same format as with
207 <computeroutput>vms</computeroutput>.</para>
208 </listitem>
209
210 <listitem>
211 <para><computeroutput>ostypes</computeroutput> lists all guest
212 operating systems presently known to VirtualBox, along with the
213 identifiers used to refer to them with the
214 <computeroutput>modifyvm</computeroutput> command.</para>
215 </listitem>
216
217 <listitem>
218 <para><computeroutput>hostdvds</computeroutput>,
219 <computeroutput>hostfloppies</computeroutput>, respectively, list
220 DVD, floppy, bridged networking and host-only networking interfaces
221 on the host, along with the name used to access them from within
222 VirtualBox.</para>
223 </listitem>
224
225 <listitem>
226 <para><computeroutput>bridgedifs</computeroutput>,
227 <computeroutput>hostonlyifs</computeroutput> and
228 <computeroutput>dhcpservers</computeroutput>, respectively, list
229 bridged network interfaces, host-only network interfaces and DHCP
230 servers currently available on the host. Please see <xref
231 linkend="networkingdetails" /> for details on these.</para>
232 </listitem>
233
234 <listitem>
235 <para><computeroutput>hostinfo</computeroutput> displays information
236 about the host system, such as CPUs, memory size and operating
237 system version.</para>
238 </listitem>
239
240 <listitem>
241 <para><computeroutput>hostcpuids</computeroutput> dumps the CPUID
242 parameters for the host CPUs. This can be used for a more fine
243 grained analyis of the host's virtualization capabilities.</para>
244 </listitem>
245
246 <listitem>
247 <para><computeroutput>hddbackends</computeroutput> lists all known
248 virtual disk back-ends of VirtualBox. For each such format (such as
249 VDI, VMDK or RAW), this lists the back-end's capabilities and
250 configuration.</para>
251 </listitem>
252
253 <listitem>
254 <para><computeroutput>hdds</computeroutput>,
255 <computeroutput>dvds</computeroutput> and
256 <computeroutput>floppies</computeroutput> all give you information
257 about virtual disk images currently in use by VirtualBox, including
258 all their settings, the unique identifiers (UUIDs) associated with
259 them by VirtualBox and all files associated with them. This is the
260 command-line equivalent of the Virtual Media Manager; see <xref
261 linkend="vdis" />.</para>
262 </listitem>
263
264 <listitem>
265 <para><computeroutput>usbhost</computeroutput> supplies information
266 about USB devices attached to the host, notably information useful
267 for constructing USB filters and whether they are currently in use
268 by the host.</para>
269 </listitem>
270
271 <listitem>
272 <para><computeroutput>usbfilters</computeroutput> lists all global
273 USB filters registered with VirtualBox -- that is, filters for
274 devices which are accessible to all virtual machines -- and displays
275 the filter parameters.</para>
276 </listitem>
277
278 <listitem>
279 <para><computeroutput>systemproperties</computeroutput> displays
280 some global VirtualBox settings, such as minimum and maximum guest
281 RAM and virtual hard disk size, folder settings and the current
282 authentication library in use.</para>
283 </listitem>
284
285 <listitem>
286 <para><computeroutput>extpacks</computeroutput> displays all
287 VirtualBox extension packs currently installed; see <xref
288 linkend="intro-installing" /> and <xref
289 linkend="vboxmanage-extpack" /> for more information.</para>
290 </listitem>
291 </itemizedlist></para>
292 </sect1>
293
294 <sect1 id="vboxmanage-showvminfo">
295 <title>VBoxManage showvminfo</title>
296
297 <para>The <computeroutput>showvminfo</computeroutput> command shows
298 information about a particular virtual machine. This is the same
299 information as <computeroutput>VBoxManage list vms --long</computeroutput>
300 would show for all virtual machines.</para>
301
302 <para>You will get information similar to the following:</para>
303
304 <para><screen>$ VBoxManage showvminfo "Windows XP"
305VirtualBox Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
306(C) 2005-$VBOX_C_YEAR $VBOX_VENDOR
307All rights reserved.
308
309Name: Windows XP
310Guest OS: Other/Unknown
311UUID: 1bf3464d-57c6-4d49-92a9-a5cc3816b7e7
312Config file: /home/username/.config/VirtualBox/Machines/Windows XP/Windows XP.xml
313Memory size: 512MB
314VRAM size: 12MB
315Number of CPUs: 2
316Synthetic Cpu: off
317Boot menu mode: message and menu
318Boot Device (1): DVD
319Boot Device (2): HardDisk
320Boot Device (3): Not Assigned
321Boot Device (4): Not Assigned
322ACPI: on
323IOAPIC: on
324PAE: on
325Time offset: 0 ms
326Hardw. virt.ext: on
327Nested Paging: on
328VT-x VPID: off
329State: powered off (since 2009-10-20T14:52:19.000000000)
330Monitor count: 1
3313D Acceleration: off
3322D Video Acceleration: off
333Teleporter Enabled: off
334Teleporter Port: 0
335Teleporter Address:
336Teleporter Password:
337Storage Controller (0): IDE Controller
338Storage Controller Type (0): PIIX4
339Storage Controller (1): Floppy Controller 1
340Storage Controller Type (1): I82078
341IDE Controller (0, 0): /home/user/windows.vdi (UUID: 46f6e53a-4557-460a-9b95-68b0f17d744b)
342IDE Controller (0, 1): /home/user/openbsd-cd46.iso (UUID: 4335e162-59d3-4512-91d5-b63e94eebe0b)
343Floppy Controller 1 (0, 0): /home/user/floppy.img (UUID: 62ac6ccb-df36-42f2-972e-22f836368137)
344NIC 1: disabled
345NIC 2: disabled
346NIC 3: disabled
347NIC 4: disabled
348NIC 5: disabled
349NIC 6: disabled
350NIC 7: disabled
351NIC 8: disabled
352UART 1: disabled
353UART 2: disabled
354Audio: disabled (Driver: Unknown)
355Clipboard Mode: Bidirectional
356VRDE: disabled
357USB: disabled
358
359USB Device Filters:
360&lt;none&gt;
361
362Shared folders:
363&lt;none&gt;
364
365Statistics update: disabled</screen></para>
366 </sect1>
367
368 <sect1 id="vboxmanage-registervm">
369 <title>VBoxManage registervm / unregistervm</title>
370
371 <para>The <computeroutput>registervm</computeroutput> command allows you
372 to import a virtual machine definition in an XML file into VirtualBox. The
373 machine must not conflict with one already registered in VirtualBox and it
374 may not have any hard or removable disks attached. It is advisable to
375 place the definition file in the machines folder before registering
376 it.<note>
377 <para>When creating a new virtual machine with
378 <computeroutput>VBoxManage createvm</computeroutput> (see below), you
379 can directly specify the <computeroutput>--register</computeroutput>
380 option to avoid having to register it separately.</para>
381 </note></para>
382
383 <para>The <computeroutput>unregistervm</computeroutput> command
384 unregisters a virtual machine. If
385 <computeroutput>--delete</computeroutput> is also specified, the following
386 files will automatically be deleted as well:<orderedlist>
387 <listitem>
388 <para>all hard disk image files, including differencing files, which
389 are used by the machine and not shared with other machines;</para>
390 </listitem>
391
392 <listitem>
393 <para>saved state files that the machine created, if any (one if the
394 machine was in "saved" state and one for each online
395 snapshot);</para>
396 </listitem>
397
398 <listitem>
399 <para>the machine XML file and its backups;</para>
400 </listitem>
401
402 <listitem>
403 <para>the machine log files, if any;</para>
404 </listitem>
405
406 <listitem>
407 <para>the machine directory, if it is empty after having deleted all
408 the above.</para>
409 </listitem>
410 </orderedlist></para>
411 </sect1>
412
413 <sect1 id="vboxmanage-createvm">
414 <title>VBoxManage createvm</title>
415
416 <para>This command creates a new XML virtual machine definition
417 file.</para>
418
419 <para>The <computeroutput>--name &lt;name&gt;</computeroutput> parameter
420 is required and must specify the name of the machine. Since this name is
421 used by default as the file name of the settings file (with the extension
422 <computeroutput>.xml</computeroutput>) and the machine folder (a subfolder
423 of the <computeroutput>.config/VirtualBox/Machines</computeroutput> folder - this folder name may vary depending on the operating system and the version of VirtualBox which you are using), it
424 must conform to your host operating system's requirements for file name
425 specifications. If the VM is later renamed, the file and folder names will
426 change automatically.</para>
427
428 <para>However, if the <computeroutput>--basefolder
429 &lt;path&gt;</computeroutput> option is used, the machine folder will be
430 named <computeroutput>&lt;path&gt;</computeroutput>. In this case, the
431 names of the file and the folder will not change if the virtual machine is
432 renamed.</para>
433
434 <para>By default, this command only creates the XML file without
435 automatically registering the VM with your VirtualBox installation. To
436 register the VM instantly, use the optional
437 <computeroutput>--register</computeroutput> option, or run
438 <computeroutput>VBoxManage registervm</computeroutput> separately
439 afterwards.</para>
440 </sect1>
441
442 <sect1 id="vboxmanage-modifyvm">
443 <title>VBoxManage modifyvm</title>
444
445 <para>This command changes the properties of a registered virtual machine
446 which is not running. Most of the properties that this command makes
447 available correspond to the VM settings that VirtualBox graphical user
448 interface displays in each VM's "Settings" dialog; these were described in
449 <xref linkend="BasicConcepts" />. Some of the more advanced settings,
450 however, are only available through the
451 <computeroutput>VBoxManage</computeroutput> interface.</para>
452
453 <para>These commands require that the machine is powered off (neither
454 running nor in "saved" state). Some machine settings can also be changed
455 while a machine is running; those settings will then have a corresponding
456 subcommand with the <computeroutput>VBoxManage controlvm</computeroutput>
457 subcommand (see <xref linkend="vboxmanage-controlvm" />).</para>
458
459 <sect2>
460 <title>General settings</title>
461
462 <para>The following general settings are available through
463 <computeroutput>VBoxManage modifyvm</computeroutput>:<itemizedlist>
464 <listitem>
465 <para><computeroutput>--name &lt;name&gt;</computeroutput>: This
466 changes the VM's name and possibly renames the internal virtual
467 machine files, as described with <computeroutput>VBoxManage
468 createvm</computeroutput> above.</para>
469 </listitem>
470
471 <listitem>
472 <para><computeroutput>--groups &lt;group&gt;, ...</computeroutput>:
473 This changes the group membership of a VM. Groups always start with
474 a <computeroutput>/</computeroutput> and can be nested. By default
475 VMs are in group <computeroutput>/</computeroutput>.</para>
476 </listitem>
477
478 <listitem>
479 <para><computeroutput>--description &lt;desc&gt;</computeroutput>:
480 This changes the VM's description, which is a way to record details
481 about the VM in a way which is meaningful for the user. The GUI
482 interprets HTML formatting, the command line allows arbitrary
483 strings potentially containing multiple lines.</para>
484 </listitem>
485
486 <listitem>
487 <para><computeroutput>--ostype &lt;ostype&gt;</computeroutput>:
488 This specifies what guest operating system is supposed to run in
489 the VM. To learn about the various identifiers that can be used
490 here, use <computeroutput>VBoxManage list
491 ostypes</computeroutput>.</para>
492 </listitem>
493
494 <listitem>
495 <para><computeroutput>--memory
496 &lt;memorysize&gt;</computeroutput>: This sets the amount of RAM,
497 in MB, that the virtual machine should allocate for itself from
498 the host. See the remarks in <xref linkend="gui-createvm" /> for
499 more information.</para>
500 </listitem>
501
502 <listitem>
503 <para><computeroutput>--vram &lt;vramsize&gt;</computeroutput>:
504 This sets the amount of RAM that the virtual graphics card should
505 have. See <xref linkend="settings-display" /> for details.</para>
506 </listitem>
507
508 <listitem>
509 <para><computeroutput>--acpi on|off</computeroutput>;
510 <computeroutput>--ioapic on|off</computeroutput>: These two
511 determine whether the VM should have ACPI and I/O APIC support,
512 respectively; see <xref linkend="settings-motherboard" /> for
513 details.</para>
514 </listitem>
515
516 <listitem>
517 <para><computeroutput>--hardwareuuid
518 &lt;uuid&gt;</computeroutput>: The UUID presented to the guest via
519 memory tables (DMI/SMBIOS), hardware and guest properties. By
520 default this is the same as the VM uuid. Useful when cloning a VM.
521 Teleporting takes care of this automatically.</para>
522 </listitem>
523
524 <listitem>
525 <para><computeroutput>--cpus &lt;cpucount&gt;</computeroutput>:
526 This sets the number of virtual CPUs for the virtual machine (see
527 <xref linkend="settings-processor" />). If CPU hot-plugging is
528 enabled (see below), this then sets the
529 <emphasis>maximum</emphasis> number of virtual CPUs that can be
530 plugged into the virtual machines.</para>
531 </listitem>
532
533 <listitem>
534 <para><computeroutput>--rtcuseutc on|off</computeroutput>: This
535 option lets the real-time clock (RTC) operate in UTC time (see
536 <xref linkend="settings-motherboard" />).</para>
537 </listitem>
538
539 <listitem>
540 <para><computeroutput>--cpuhotplug on|off</computeroutput>: This
541 enables CPU hot-plugging. When enabled, virtual CPUs can be added
542 to and removed from a virtual machine while it is running. See
543 <xref linkend="cpuhotplug" /> for more information.</para>
544 </listitem>
545
546 <listitem>
547 <para><computeroutput>--plugcpu|unplugcpu
548 &lt;id&gt;</computeroutput>: If CPU hot-plugging is enabled (see
549 above), this adds a virtual CPU to the virtual machines (or
550 removes one). <computeroutput>&lt;id&gt;</computeroutput>
551 specifies the index of the virtual CPU to be added or removed and
552 must be a number from 0 to the maximum no. of CPUs configured with
553 the <computeroutput>--cpus</computeroutput> option. CPU 0 can
554 never be removed.</para>
555 </listitem>
556
557 <listitem>
558 <para><computeroutput>--cpuexecutioncap
559 &lt;1-100&gt;</computeroutput>: This setting controls how much cpu
560 time a virtual CPU can use. A value of 50 implies a single virtual
561 CPU can use up to 50% of a single host CPU.</para>
562 </listitem>
563
564 <listitem>
565 <para><computeroutput>--pae on|off</computeroutput>: This
566 enables/disables PAE (see <xref
567 linkend="settings-processor" />).</para>
568 </listitem>
569
570 <listitem>
571 <para><computeroutput>--longmode on|off</computeroutput>: This
572 enables/disables long mode (see <xref
573 linkend="settings-processor" />).</para>
574 </listitem>
575
576 <listitem>
577 <para><computeroutput>--synthcpu on|off</computeroutput>: This
578 setting determines whether VirtualBox will expose a synthetic CPU
579 to the guest to allow live migration between host systems that
580 differ significantly.</para>
581 </listitem>
582
583 <listitem>
584 <para><computeroutput>--hpet on|off</computeroutput>: This
585 enables/disables a High Precision Event Timer (HPET) which can
586 replace the legacy system timers. This is turned off by default.
587 Note that Windows supports a HPET only from Vista onwards.</para>
588 </listitem>
589
590 <listitem>
591 <para><computeroutput>--hwvirtex on|off</computeroutput>: This
592 enables or disables the use of hardware virtualization extensions
593 (Intel VT-x or AMD-V) in the processor of your host system; see
594 <xref linkend="hwvirt" />.</para>
595 </listitem>
596
597 <listitem>
598 <para><computeroutput>--triplefaultreset on|off</computeroutput>:
599 This setting allows to reset the guest instead of triggering a
600 Guru Meditation. Some guests raise a triple fault to reset the
601 CPU so sometimes this is desired behavior. Works only for non-SMP
602 guests.</para>
603 </listitem>
604
605 <listitem>
606 <para><computeroutput>--paravirtprovider
607 none|default|legacy|minimal|hyperv|kvm</computeroutput>: This
608 setting specifies which paravirtualization interface to provide to
609 the guest operating system. Specifying
610 <computeroutput>none</computeroutput> explicitly turns off exposing
611 any paravirtualization interface. The option
612 <computeroutput>default</computeroutput>, will pick an appropriate
613 interface depending on the guest OS type while starting the VM.
614 This is the default option chosen while creating new VMs. The
615 <computeroutput>legacy</computeroutput> option is chosen for VMs
616 which were created with older VirtualBox versions and will pick a
617 paravirtualization interface while starting the VM with VirtualBox
618 5.0 and newer. The <computeroutput>minimal</computeroutput> provider
619 is mandatory for Mac OS X guests, while
620 <computeroutput>kvm</computeroutput> and
621 <computeroutput>hyperv</computeroutput> are recommended for Linux
622 and Windows guests respectively. These options are explained in
623 detail under <xref linkend="gimproviders" />.</para>
624 </listitem>
625
626 <listitem>
627 <para><computeroutput>--nestedpaging on|off</computeroutput>: If
628 hardware virtualization is enabled, this additional setting
629 enables or disables the use of the nested paging feature in the
630 processor of your host system; see <xref
631 linkend="hwvirt" />.</para>
632 </listitem>
633
634 <listitem>
635 <para><computeroutput>--largepages on|off</computeroutput>: If
636 hardware virtualization <emphasis>and</emphasis> nested paging are
637 enabled, for Intel VT-x only, an additional performance
638 improvement of up to 5% can be obtained by enabling this setting.
639 This causes the hypervisor to use large pages to reduce TLB use
640 and overhead.</para>
641 </listitem>
642
643 <listitem>
644 <para><computeroutput>--vtxvpid on|off</computeroutput>: If
645 hardware virtualization is enabled, for Intel VT-x only, this
646 additional setting enables or disables the use of the tagged TLB
647 (VPID) feature in the processor of your host system; see <xref
648 linkend="hwvirt" />.</para>
649 </listitem>
650
651 <listitem>
652 <para><computeroutput>--vtxux on|off</computeroutput>: If
653 hardware virtualization is enabled, for Intel VT-x only, this
654 setting enables or disables the use of the unrestricted guest mode
655 feature for executing your guest.</para>
656 </listitem>
657
658 <listitem>
659 <para><computeroutput>--accelerate3d on|off</computeroutput>: This
660 enables, if the Guest Additions are installed, whether hardware 3D
661 acceleration should be available; see <xref
662 linkend="guestadd-3d" />.</para>
663 </listitem>
664
665 <listitem>
666 <para>You can influence the BIOS logo that is displayed when a
667 virtual machine starts up with a number of settings. Per default,
668 a VirtualBox logo is displayed.</para>
669
670 <para>With <computeroutput>--bioslogofadein
671 on|off</computeroutput> and <computeroutput>--bioslogofadeout
672 on|off</computeroutput>, you can determine whether the logo should
673 fade in and out, respectively.</para>
674
675 <para>With <computeroutput>--bioslogodisplaytime
676 &lt;msec&gt;</computeroutput> you can set how long the logo should
677 be visible, in milliseconds.</para>
678
679 <para>With <computeroutput>--bioslogoimagepath
680 &lt;imagepath&gt;</computeroutput> you can, if you are so
681 inclined, replace the image that is shown, with your own logo. The
682 image must be an uncompressed 256 color BMP file without color
683 space information (Windows 3.0 format). The image must not be
684 bigger than 640 x 480.</para>
685 </listitem>
686
687 <listitem>
688 <para><computeroutput>--biosbootmenu
689 disabled|menuonly|messageandmenu</computeroutput>: This specifies
690 whether the BIOS allows the user to select a temporary boot
691 device. <computeroutput>menuonly</computeroutput> suppresses the
692 message, but the user can still press F12 to select a temporary
693 boot device.</para>
694 </listitem>
695
696 <listitem>
697 <para><computeroutput>--nicbootprio&lt;1-N&gt;
698 &lt;priority&gt;</computeroutput>: This specifies the order in which
699 NICs are tried for booting over the network (using PXE). The
700 priority is an integer in the 0 to 4 range. Priority 1 is the
701 highest, priority 4 is low. Priority 0, which is the default unless
702 otherwise specified, is the lowest.
703 </para>
704 <para> Note that this option only has effect when the Intel PXE boot
705 ROM is used.
706 </para>
707 </listitem>
708
709 <listitem>
710 <para><computeroutput>--boot&lt;1-4&gt;
711 none|floppy|dvd|disk|net</computeroutput>: This specifies the boot
712 order for the virtual machine. There are four "slots", which the
713 VM will try to access from 1 to 4, and for each of which you can
714 set a device that the VM should attempt to boot from.</para>
715 </listitem>
716
717 <listitem>
718 <para><computeroutput>--snapshotfolder
719 default|&lt;path&gt;</computeroutput>: This allows you to specify
720 the folder in which snapshots will be kept for a virtual
721 machine.</para>
722 </listitem>
723
724 <listitem>
725 <para><computeroutput>--firmware efi|bios</computeroutput>:
726 Specifies which firmware is used to boot particular virtual
727 machine: EFI or BIOS. Use EFI only if your fully understand what
728 you're doing.</para>
729 </listitem>
730
731 <listitem>
732 <para><computeroutput>--guestmemoryballoon
733 &lt;size&gt;</computeroutput> sets the default size of the guest
734 memory balloon, that is, memory allocated by the VirtualBox Guest
735 Additions from the guest operating system and returned to the
736 hypervisor for re-use by other virtual machines.
737 <computeroutput>&lt;size&gt;</computeroutput> must be specified in
738 megabytes. The default size is 0 megabytes. For details,
739 see <xref linkend="guestadd-balloon" />.</para>
740 </listitem>
741
742 <listitem>
743 <para><computeroutput>--lptmode&lt;1-N&gt;
744 &lt;Device&gt;</computeroutput>
745 Specifies the Device Name of the parallel port that
746 the Parallel Port feature will be using. Use this
747 <emphasis>before</emphasis> <computeroutput>--lpt</computeroutput>.
748 This feature is host operating system specific.</para>
749 </listitem>
750
751 <listitem>
752 <para><computeroutput>--lpt&lt;1-N&gt;
753 &lt;I/O base&gt; &lt;IRQ&gt;</computeroutput>
754 Specifies the I/O address of the parallel port and the IRQ
755 number that the Parallel Port feature will be using. Use this
756 <emphasis>after</emphasis>
757 <computeroutput>--lptmod</computeroutput>. I/O base address and IRQ are
758 the values that guest sees i.e. the values avalable under guest Device Manager.</para>
759 </listitem>
760
761 <listitem>
762 <para><computeroutput>--defaultfrontend
763 default|&lt;name&gt;</computeroutput>: This allows you to specify
764 the default frontend which will be used when starting this VM; see
765 <xref linkend="vboxmanage-startvm" /> for details.</para>
766 </listitem>
767 </itemizedlist></para>
768 </sect2>
769
770 <sect2>
771 <title>Networking settings</title>
772
773 <para>The following networking settings are available through
774 <computeroutput>VBoxManage modifyvm</computeroutput>. With all these
775 settings, the decimal number directly following the option name ("1-N"
776 in the list below) specifies the virtual network adapter whose settings
777 should be changed.<itemizedlist>
778 <listitem>
779 <para><computeroutput>--nic&lt;1-N&gt;
780 none|null|nat|bridged|intnet|hostonly|generic
781 </computeroutput>: With
782 this, you can set, for each of the VM's virtual network cards,
783 what type of networking should be available. They can be not
784 present (<computeroutput>none</computeroutput>), not connected to
785 the host (<computeroutput>null</computeroutput>), use network
786 address translation (<computeroutput>nat</computeroutput>),
787 bridged networking (<computeroutput>bridged</computeroutput>) or
788 communicate with other virtual machines using internal networking
789 (<computeroutput>intnet</computeroutput>), host-only networking
790 (<computeroutput>hostonly</computeroutput>), or access rarely used
791 sub-modes (<computeroutput>generic</computeroutput>).
792 These options correspond
793 to the modes which are described in detail in <xref
794 linkend="networkingmodes" />.</para>
795 </listitem>
796
797 <listitem>
798 <para><computeroutput>--nictype&lt;1-N&gt;
799 Am79C970A|Am79C973|82540EM|82543GC|82545EM|virtio</computeroutput>:
800 This allows you, for each of the VM's virtual network cards, to
801 specify which networking hardware VirtualBox presents to the
802 guest; see <xref linkend="nichardware" />.</para>
803 </listitem>
804
805 <listitem>
806 <para><computeroutput>--cableconnected&lt;1-N&gt;
807 on|off</computeroutput>: This allows you to temporarily disconnect
808 a virtual network interface, as if a network cable had been pulled
809 from a real network card. This might be useful for resetting
810 certain software components in the VM.</para>
811 </listitem>
812
813 <listitem>
814 <para>With the "nictrace" options, you can optionally trace
815 network traffic by dumping it to a file, for debugging
816 purposes.</para>
817
818 <para>With <computeroutput>--nictrace&lt;1-N&gt;
819 on|off</computeroutput>, you can enable network tracing for a
820 particular virtual network card.</para>
821
822 <para>If enabled, you must specify with
823 <computeroutput>--nictracefile&lt;1-N&gt;
824 &lt;filename&gt;</computeroutput> what file the trace should be
825 logged to.</para>
826 </listitem>
827
828 <listitem>
829 <para><computeroutput>--bridgeadapter&lt;1-N&gt;
830 none|&lt;devicename&gt;</computeroutput>: If bridged networking
831 has been enabled for a virtual network card (see the
832 <computeroutput>--nic</computeroutput> option above; otherwise
833 this setting has no effect), use this option to specify which host
834 interface the given virtual network interface will use. For
835 details, please see <xref linkend="network_bridged" />.</para>
836 </listitem>
837
838 <listitem>
839 <para><computeroutput>--hostonlyadapter&lt;1-N&gt;
840 none|&lt;devicename&gt;</computeroutput>: If host-only networking
841 has been enabled for a virtual network card (see the --nic option
842 above; otherwise this setting has no effect), use this option to
843 specify which host-only networking interface the given virtual
844 network interface will use. For details, please see <xref
845 linkend="network_hostonly" />.</para>
846 </listitem>
847
848 <listitem>
849 <para><computeroutput>--intnet&lt;1-N&gt;
850 network</computeroutput>: If internal networking has been enabled
851 for a virtual network card (see the
852 <computeroutput>--nic</computeroutput> option above; otherwise
853 this setting has no effect), use this option to specify the name
854 of the internal network (see <xref
855 linkend="network_internal" />).</para>
856 </listitem>
857
858 <listitem>
859 <para><computeroutput>--macaddress&lt;1-N&gt;
860 auto|&lt;mac&gt;</computeroutput>: With this option you can set
861 the MAC address of the virtual network card. Normally, each
862 virtual network card is assigned a random address by VirtualBox at
863 VM creation.</para>
864 </listitem>
865
866 <listitem>
867 <para><computeroutput>--nicgenericdrv&lt;1-N&gt;
868 &lt;backend driver&gt;</computeroutput>: If generic networking has been
869 enabled for a virtual network card (see the
870 <computeroutput>--nic</computeroutput> option above; otherwise
871 this setting has no effect), this mode allows you to access
872 rarely used networking sub-modes, such as VDE network or UDP Tunnel.
873 </para>
874 </listitem>
875
876 <listitem>
877 <para><computeroutput>--nicproperty&lt;1-N&gt;
878 &lt;paramname&gt;="paramvalue"</computeroutput>:
879 This option, in combination with "nicgenericdrv" allows you to
880 pass parameters to rarely-used network backends.</para><para>
881 Those parameters are backend engine-specific, and are different
882 between UDP Tunnel and the VDE backend drivers. For example,
883 please see <xref linkend="network_udp_tunnel" />.
884 </para>
885 </listitem>
886 </itemizedlist></para>
887
888 <sect3>
889 <title>NAT Networking settings.</title>
890
891 <para>The following NAT networking settings are available through
892 <computeroutput>VBoxManage modifyvm</computeroutput>. With all these
893 settings, the decimal number directly following the option name ("1-N"
894 in the list below) specifies the virtual network adapter whose
895 settings should be changed.<itemizedlist>
896 <listitem>
897 <para><computeroutput>--natpf&lt;1-N&gt;
898 [&lt;name&gt;],tcp|udp,[&lt;hostip&gt;],&lt;hostport&gt;,[&lt;guestip&gt;],
899 &lt;guestport&gt;</computeroutput>: This option defines a NAT
900 port-forwarding rule (please see <xref linkend="natforward" />
901 for details).</para>
902 </listitem>
903
904 <listitem>
905 <para><computeroutput>--natpf&lt;1-N&gt; delete
906 &lt;name&gt;</computeroutput>: This option deletes a NAT
907 port-forwarding rule (please see <xref linkend="natforward" />
908 for details).</para>
909 </listitem>
910
911 <listitem>
912 <para><computeroutput>--nattftpprefix&lt;1-N&gt;
913 &lt;prefix&gt;</computeroutput>: This option defines a prefix
914 for the built-in TFTP server, i.e. where the boot file is
915 located (please see <xref linkend="nat-tftp" /> and <xref
916 linkend="nat-adv-tftp" /> for details).</para>
917 </listitem>
918
919 <listitem>
920 <para><computeroutput>--nattftpfile&lt;1-N&gt;
921 &lt;bootfile&gt;</computeroutput>: This option defines the TFT
922 boot file (please see <xref linkend="nat-adv-tftp" /> for
923 details).</para>
924 </listitem>
925
926 <listitem>
927 <para><computeroutput>--nattftpserver&lt;1-N&gt;
928 &lt;tftpserver&gt;</computeroutput>: This option defines the
929 TFTP server address to boot from (please see <xref
930 linkend="nat-adv-tftp" /> for details).</para>
931 </listitem>
932
933 <listitem>
934 <para><computeroutput>--natdnspassdomain&lt;1-N&gt;
935 on|off</computeroutput>: This option specifies whether the
936 built-in DHCP server passes the domain name for network name
937 resolution.</para>
938 </listitem>
939
940 <listitem>
941 <para><computeroutput>--natdnsproxy&lt;1-N&gt;
942 on|off</computeroutput>: This option makes the NAT engine proxy
943 all guest DNS requests to the host's DNS servers (please see
944 <xref linkend="nat-adv-dns" /> for details).</para>
945 </listitem>
946
947 <listitem>
948 <para><computeroutput>--natdnshostresolver&lt;1-N&gt;
949 on|off</computeroutput>: This option makes the NAT engine use
950 the host's resolver mechanisms to handle DNS requests (please
951 see <xref linkend="nat-adv-dns" /> for details).</para>
952 </listitem>
953
954 <listitem>
955 <para><computeroutput>--natsettings&lt;1-N&gt;
956 [&lt;mtu&gt;],[&lt;socksnd&gt;],[&lt;sockrcv&gt;],[&lt;tcpsnd&gt;],
957 [&lt;tcprcv&gt;]</computeroutput>: This option controls several
958 NAT settings (please see <xref linkend="nat-adv-settings" /> for
959 details).</para>
960 </listitem>
961
962 <listitem>
963 <para><computeroutput>--nataliasmode&lt;1-N&gt;
964 default|[log],[proxyonly],[sameports]</computeroutput>: This
965 option defines behaviour of NAT engine core: log - enables
966 logging, proxyonly - switches of aliasing mode makes NAT
967 transparent, sameports enforces NAT engine to send packets via
968 the same port as they originated on, default - disable all
969 mentioned modes above . (please see <xref
970 linkend="nat-adv-alias" /> for details).</para>
971 </listitem>
972 </itemizedlist></para>
973 </sect3>
974 </sect2>
975
976 <sect2 id="vboxmanage-modifyvm-other">
977 <title>Miscellaneous settings</title>
978
979 <para>The following other hardware settings, such as serial port, audio,
980 clipboard, drag'n drop, monitor and USB settings are available through
981 <computeroutput>VBoxManage modifyvm</computeroutput>:<itemizedlist>
982 <listitem>
983 <para><computeroutput>--uart&lt;1-N&gt; off|&lt;I/O base&gt;
984 &lt;IRQ&gt;</computeroutput>: With this option you can configure
985 virtual serial ports for the VM; see <xref
986 linkend="serialports" /> for an introduction.</para>
987 </listitem>
988
989 <listitem>
990 <para><computeroutput>--uartmode&lt;1-N&gt;
991 &lt;arg&gt;</computeroutput>: This setting controls how VirtualBox
992 connects a given virtual serial port (previously configured with
993 the <computeroutput>--uartX</computeroutput> setting, see above)
994 to the host on which the virtual machine is running. As described
995 in detail in <xref linkend="serialports" />, for each such port,
996 you can specify <computeroutput>&lt;arg&gt;</computeroutput> as
997 one of the following options:<itemizedlist>
998 <listitem>
999 <para><computeroutput>disconnected</computeroutput>: Even
1000 though the serial port is shown to the guest, it has no
1001 "other end" -- like a real COM port without a cable.</para>
1002 </listitem>
1003
1004 <listitem>
1005 <para><computeroutput>server
1006 &lt;pipename&gt;</computeroutput>: On a Windows host, this
1007 tells VirtualBox to create a named pipe on the host named
1008 <computeroutput>&lt;pipename&gt;</computeroutput> and
1009 connect the virtual serial device to it. Note that Windows
1010 requires that the name of a named pipe begin with
1011 <computeroutput>\\.\pipe\</computeroutput>.</para>
1012
1013 <para>On a Linux host, instead of a named pipe, a local
1014 domain socket is used.</para>
1015 </listitem>
1016
1017 <listitem>
1018 <para><computeroutput>client
1019 &lt;pipename&gt;</computeroutput>: This operates just like
1020 <computeroutput>server ...</computeroutput>, except that the
1021 pipe (or local domain socket) is not created by VirtualBox,
1022 but assumed to exist already.</para>
1023 </listitem>
1024
1025 <listitem>
1026 <para><computeroutput>&lt;devicename&gt;</computeroutput>:
1027 If, instead of the above, the device name of a physical
1028 hardware serial port of the host is specified, the virtual
1029 serial port is connected to that hardware port. On a Windows
1030 host, the device name will be a COM port such as
1031 <computeroutput>COM1</computeroutput>; on a Linux host, the
1032 device name will look like
1033 <computeroutput>/dev/ttyS0</computeroutput>. This allows you
1034 to "wire" a real serial port to a virtual machine.</para>
1035 </listitem>
1036 </itemizedlist></para>
1037 </listitem>
1038
1039 <listitem>
1040 <para><computeroutput>--audio none|null|oss</computeroutput>: With
1041 this option, you can set whether the VM should have audio
1042 support.</para>
1043 </listitem>
1044
1045 <listitem>
1046 <para><computeroutput>--clipboard
1047 disabled|hosttoguest|guesttohost|bidirectional</computeroutput>:
1048 With this setting, you can select if and how the guest or host
1049 operating system's clipboard should be shared with the host or guest;
1050 see <xref linkend="generalsettings" />. This requires that the Guest
1051 Additions be installed in the virtual machine.</para>
1052 </listitem>
1053
1054 <listitem>
1055 <para><computeroutput>--draganddrop
1056 disabled|hosttoguest|guesttohost|bidirectional</computeroutput>:
1057 With this setting, you can select the current drag'n drop mode
1058 being used between the host and the virtual machine;
1059 see <xref linkend="guestadd-dnd" />. This requires that the Guest
1060 Additions be installed in the virtual machine.</para>
1061 </listitem>
1062
1063 <listitem>
1064 <para><computeroutput>--monitorcount
1065 &lt;count&gt;</computeroutput>: This enables multi-monitor
1066 support; see <xref linkend="settings-display" />.</para>
1067 </listitem>
1068
1069 <listitem>
1070 <para><computeroutput>--usb on|off</computeroutput>: This option
1071 enables or disables the VM's virtual USB controller; see <xref
1072 linkend="settings-usb" /> for details.</para>
1073 </listitem>
1074
1075 <listitem>
1076 <para><computeroutput>--usbehci on|off</computeroutput>: This
1077 option enables or disables the VM's virtual USB 2.0 controller;
1078 see <xref linkend="settings-usb" /> for details.</para>
1079 </listitem>
1080 </itemizedlist></para>
1081
1082 <!-- @todo r=andy Document tracing-* commands -->
1083 </sect2>
1084
1085 <sect2 id="vboxmanage-modifyvm-vrde">
1086 <title>Remote machine settings</title>
1087
1088 <para>The following settings that affect remote machine behavior are
1089 available through <computeroutput>VBoxManage
1090 modifyvm</computeroutput>:<itemizedlist>
1091 <listitem>
1092 <para><computeroutput>--vrde on|off</computeroutput>: With the
1093 VirtualBox graphical user interface, this enables or disables the
1094 VirtualBox remote desktop extension (VRDE) server. Note that if
1095 you are using <computeroutput>VBoxHeadless</computeroutput> (see
1096 <xref linkend="vboxheadless" />), VRDE is enabled by
1097 default.</para>
1098 </listitem>
1099
1100 <!-- @todo r=andy Document vrdeproperty -->
1101
1102 <listitem>
1103 <para><computeroutput>--vrdeport
1104 default|&lt;ports&gt;</computeroutput>: A port or a range of ports
1105 the VRDE server can bind to; "default" or "0" means port 3389, the
1106 standard port for RDP. You can specify a comma-separated list of
1107 ports or ranges of ports. Use a dash between two port numbers to
1108 specify a range. The VRDE server will bind to <emphasis
1109 role="bold">one</emphasis> of available ports from the specified
1110 list. Only one machine can use a given port at a time. For
1111 example, the option <computeroutput> --vrdeport
1112 5000,5010-5012</computeroutput> will tell the server to bind to
1113 one of following ports: 5000, 5010, 5011 or 5012.</para>
1114 </listitem>
1115
1116 <listitem>
1117 <para><computeroutput>--vrdeaddress &lt;IP
1118 address&gt;</computeroutput>: The IP address of the host network
1119 interface the VRDE server will bind to. If specified, the server
1120 will accept connections only on the specified host network
1121 interface.</para>
1122 <para>The setting can be used to specify whether the VRDP server
1123 should accept either IPv4 or IPv6 or both connections:
1124 <itemizedlist>
1125 <listitem>
1126 <para>only IPv4: <computeroutput>--vrdeaddress "0.0.0.0"
1127 </computeroutput></para>
1128 </listitem>
1129 <listitem>
1130 <para>only IPv6: <computeroutput>--vrdeaddress "::"
1131 </computeroutput></para>
1132 </listitem>
1133 <listitem>
1134 <para>both IPv6 and IPv4 (default): <computeroutput>--vrdeaddress ""
1135 </computeroutput></para>
1136 </listitem>
1137 </itemizedlist></para>
1138 </listitem>
1139
1140 <listitem>
1141 <para><computeroutput>--vrdeauthtype
1142 null|external|guest</computeroutput>: This allows you to choose
1143 whether and how authorization will be performed; see <xref
1144 linkend="vbox-auth" /> for details.</para>
1145 </listitem>
1146
1147 <listitem>
1148 <para><computeroutput>--vrdemulticon on|off</computeroutput>: This
1149 enables multiple connections to the same VRDE server, if the
1150 server supports this feature; see <xref lang=""
1151 linkend="vrde-multiconnection" />.</para>
1152 </listitem>
1153
1154 <listitem>
1155 <para><computeroutput>--vrdereusecon on|off</computeroutput>: This
1156 specifies the VRDE server behavior when multiple connections are
1157 disabled. When this option is enabled, the server will allow a new
1158 client to connect and will drop the existing connection. When this
1159 option is disabled (this is the default setting), a new connection
1160 will not be accepted if there is already a client connected to the
1161 server.</para>
1162 </listitem>
1163
1164 <listitem>
1165 <para><computeroutput>--vrdevideochannel on|off</computeroutput>:
1166 This enables video redirection, if it is supported by the VRDE
1167 server; see <xref lang="" linkend="vrde-videochannel" />.</para>
1168 </listitem>
1169
1170 <listitem>
1171 <para><computeroutput>--vrdevideochannelquality
1172 &lt;percent&gt;</computeroutput>: Sets the image quality for video
1173 redirection; see <xref lang=""
1174 linkend="vrde-videochannel" />.</para>
1175 </listitem>
1176 </itemizedlist></para>
1177 </sect2>
1178
1179 <sect2 id="vboxmanage-modifyvm-teleport">
1180 <title>Teleporting settings</title>
1181
1182 <para>With the following commands for <computeroutput>VBoxManage
1183 modifyvm</computeroutput> you can configure a machine to be a target for
1184 teleporting. See <xref linkend="teleporting" /> for an
1185 introduction.<itemizedlist>
1186 <listitem>
1187 <para><computeroutput>--teleporter on|off</computeroutput>: With
1188 this setting you turn on or off whether a machine waits for a
1189 teleporting request to come in on the network when it is started.
1190 If "on", when the machine is started, it does not boot the virtual
1191 machine as it would normally; instead, it then waits for a
1192 teleporting request to come in on the port and address listed with
1193 the next two parameters.</para>
1194 </listitem>
1195
1196 <listitem>
1197 <para><computeroutput>--teleporterport
1198 &lt;port&gt;</computeroutput>, <computeroutput>--teleporteraddress
1199 &lt;address&gt;</computeroutput>: these must be used with
1200 --teleporter and tell the virtual machine on which port and
1201 address it should listen for a teleporting request from another
1202 virtual machine. <computeroutput>&lt;port&gt;</computeroutput> can
1203 be any free TCP/IP port number (e.g. 6000);
1204 <computeroutput>&lt;address&gt;</computeroutput> can be any IP
1205 address or hostname and specifies the TCP/IP socket to bind to.
1206 The default is "0.0.0.0", which means any address.</para>
1207 </listitem>
1208
1209 <listitem>
1210 <para><computeroutput>--teleporterpassword
1211 &lt;password&gt;</computeroutput>: if this optional argument is
1212 given, then the teleporting request will only succeed if the
1213 source machine specifies the same password as the one given with
1214 this command.</para>
1215 </listitem>
1216
1217 <listitem>
1218 <para><computeroutput>--teleporterpasswordfile
1219 &lt;password&gt;</computeroutput>: if this optional argument is
1220 given, then the teleporting request will only succeed if the
1221 source machine specifies the same password as the one specified
1222 in the file give with this command. Use <computeroutput>stdin</computeroutput>
1223 to read the password from stdin.</para>
1224 </listitem>
1225
1226 <listitem>
1227 <para><computeroutput>--cpuid &lt;leaf&gt; &lt;eax&gt; &lt;ebx&gt;
1228 &lt;ecx&gt; &lt;edx&gt;</computeroutput>: Advanced users can use
1229 this command before a teleporting operation to restrict the
1230 virtual CPU capabilities that VirtualBox presents to the guest
1231 operating system. This must be run on both the source and the
1232 target machines involved in the teleporting and will then modify
1233 what the guest sees when it executes the
1234 <computeroutput>CPUID</computeroutput> machine instruction. This
1235 might help with misbehaving applications that wrongly assume that
1236 certain CPU capabilities are present. The meaning of the
1237 parameters is hardware dependent; please refer to the AMD or Intel
1238 processor manuals.</para>
1239 </listitem>
1240 </itemizedlist></para>
1241 </sect2>
1242 </sect1>
1243
1244 <sect1 id="vboxmanage-clonevm">
1245 <title>VBoxManage clonevm</title>
1246
1247 <para>This command creates a full or linked copy of an existing virtual
1248 machine.</para>
1249
1250 <para>The <computeroutput>clonevm</computeroutput> subcommand takes at
1251 least the name of the virtual machine which should be cloned. The following
1252 additional settings can be used to further configure the clone VM
1253 operation:</para>
1254
1255 <itemizedlist>
1256 <listitem>
1257 <para><computeroutput>--snapshot &lt;uuid&gt;|&lt;name&gt;</computeroutput>:
1258 Select a specific snapshot where the clone operation should refer
1259 to. Default is referring to the current state.</para>
1260 </listitem>
1261 <listitem>
1262 <para><computeroutput>--mode machine|machineandchildren|all</computeroutput>:
1263 Selects the cloning mode of the operation. If
1264 <computeroutput>machine</computeroutput> is selected (the default),
1265 the current state of the VM without any snapshots is cloned. In the
1266 <computeroutput>machineandchildren</computeroutput> mode the snapshot
1267 provided by <computeroutput>--snapshot</computeroutput> and all
1268 child snapshots are cloned. If <computeroutput>all</computeroutput>
1269 is the selected mode all snapshots and the current state are cloned.
1270 </para>
1271 </listitem>
1272 <listitem>
1273 <para><computeroutput>--options link|keepallmacs|keepnatmacs|keepdisknames</computeroutput>:
1274 Allows additional fine tuning of the clone operation. The first
1275 option defines that a linked clone should be created, which is
1276 only possible for a machine clone from a snapshot. The next two
1277 options allow to define how the MAC addresses of every virtual
1278 network card should be handled. They can either be reinitialized
1279 (the default), left unchanged
1280 (<computeroutput>keepallmacs</computeroutput>) or left unchanged
1281 when the network type is NAT
1282 (<computeroutput>keepnatmacs</computeroutput>). If you add
1283 <computeroutput>keepdisknames</computeroutput> all new disk images
1284 are called like the original ones, otherwise they are
1285 renamed.</para>
1286 </listitem>
1287 <listitem>
1288 <para><computeroutput>--name &lt;name&gt;</computeroutput>: Select a
1289 new name for the new virtual machine. Default is "Original Name
1290 Clone".</para>
1291 </listitem>
1292 <listitem>
1293 <para><computeroutput>--basefolder &lt;basefolder&gt;</computeroutput>:
1294 Select the folder where the new virtual machine configuration should
1295 be saved in.</para>
1296 </listitem>
1297 <listitem>
1298 <para><computeroutput>--uuid &lt;uuid&gt;</computeroutput>:
1299 Select the UUID the new VM should have. This id has to be unique in
1300 the VirtualBox instance this clone should be registered. Default is
1301 creating a new UUID.</para>
1302 </listitem>
1303 <listitem>
1304 <para><computeroutput>--register</computeroutput>:
1305 Automatically register the new clone in this VirtualBox
1306 installation. If you manually want to register the new VM later, see
1307 <xref linkend="vboxmanage-registervm" /> for instructions how to do
1308 so.</para>
1309 </listitem>
1310 </itemizedlist>
1311 </sect1>
1312
1313 <sect1 id="vboxmanage-import">
1314 <title>VBoxManage import</title>
1315
1316 <para>This command imports a virtual appliance in OVF format by copying
1317 the virtual disk images and creating virtual machines in VirtualBox. See
1318 <xref linkend="ovf" /> for an introduction to appliances.</para>
1319
1320 <para>The <computeroutput>import</computeroutput> subcommand takes at
1321 least the path name of an OVF file as input and expects the disk images,
1322 if needed, in the same directory as the OVF file. A lot of additional
1323 command-line options are supported to control in detail what is being
1324 imported and modify the import parameters, but the details depend on the
1325 content of the OVF file.</para>
1326
1327 <para>It is therefore recommended to first run the import subcommand with
1328 the <computeroutput>--dry-run</computeroutput> or
1329 <computeroutput>-n</computeroutput> option. This will then print a
1330 description of the appliance's contents to the screen how it would be
1331 imported into VirtualBox, together with the optional command-line options
1332 to influence the import behavior.</para>
1333
1334 <para>As an example, here is the screen output with a sample appliance
1335 containing a Windows XP guest:<screen>VBoxManage import WindowsXp.ovf --dry-run
1336Interpreting WindowsXp.ovf...
1337OK.
1338Virtual system 0:
1339 0: Suggested OS type: "WindowsXP"
1340 (change with "--vsys 0 --ostype &lt;type&gt;"; use "list ostypes" to list all)
1341 1: Suggested VM name "Windows XP Professional_1"
1342 (change with "--vsys 0 --vmname &lt;name&gt;")
1343 3: Number of CPUs: 1
1344 (change with "--vsys 0 --cpus &lt;n&gt;")
1345 4: Guest memory: 956 MB (change with "--vsys 0 --memory &lt;MB&gt;")
1346 5: Sound card (appliance expects "ensoniq1371", can change on import)
1347 (disable with "--vsys 0 --unit 5 --ignore")
1348 6: USB controller
1349 (disable with "--vsys 0 --unit 6 --ignore")
1350 7: Network adapter: orig bridged, config 2, extra type=bridged
1351 8: Floppy
1352 (disable with "--vsys 0 --unit 8 --ignore")
1353 9: SCSI controller, type BusLogic
1354 (change with "--vsys 0 --unit 9 --scsitype {BusLogic|LsiLogic}";
1355 disable with "--vsys 0 --unit 9 --ignore")
135610: IDE controller, type PIIX4
1357 (disable with "--vsys 0 --unit 10 --ignore")
135811: Hard disk image: source image=WindowsXp.vmdk,
1359 target path=/home/user/disks/WindowsXp.vmdk, controller=9;channel=0
1360 (change controller with "--vsys 0 --unit 11 --controller &lt;id&gt;";
1361 disable with "--vsys 0 --unit 11 --ignore")</screen></para>
1362
1363 <para>As you can see, the individual configuration items are numbered, and
1364 depending on their type support different command-line options. The import
1365 subcommand can be directed to ignore many such items with a
1366 <computeroutput>--vsys X --unit Y --ignore</computeroutput> option, where
1367 X is the number of the virtual system (zero unless there are several
1368 virtual system descriptions in the appliance) and Y the item number, as
1369 printed on the screen.</para>
1370
1371 <para>In the above example, Item #1 specifies the name of the target
1372 machine in VirtualBox. Items #9 and #10 specify hard disk controllers,
1373 respectively. Item #11 describes a hard disk image; in this case, the
1374 additional <computeroutput>--controller</computeroutput> option indicates
1375 which item the disk image should be connected to, with the default coming
1376 from the OVF file.</para>
1377
1378 <para>You can combine several items for the same virtual system behind the
1379 same <computeroutput>--vsys</computeroutput> option. For example, to
1380 import a machine as described in the OVF, but without the sound card and
1381 without the USB controller, and with the disk image connected to the IDE
1382 controller instead of the SCSI controller, use this:<screen>VBoxManage import WindowsXp.ovf
1383 --vsys 0 --unit 5 --ignore --unit 6 --ignore --unit 11 --controller 10</screen></para>
1384 </sect1>
1385
1386 <sect1 id="vboxmanage-export">
1387 <title>VBoxManage export</title>
1388
1389 <para>This command exports one or more virtual machines from VirtualBox
1390 into a virtual appliance in OVF format, including copying their virtual
1391 disk images to compressed VMDK. See <xref linkend="ovf" /> for an
1392 introduction to appliances.</para>
1393
1394 <para>The <computeroutput>export</computeroutput> command is simple to
1395 use: list the machine (or the machines) that you would like to export to
1396 the same OVF file and specify the target OVF file after an additional
1397 <computeroutput>--output</computeroutput> or
1398 <computeroutput>-o</computeroutput> option. Note that the directory of the
1399 target OVF file will also receive the exported disk images in the
1400 compressed VMDK format (regardless of the original format) and should have
1401 enough disk space left for them.</para>
1402
1403 <para>Beside a simple export of a given virtual machine, you can append
1404 several product information to the appliance file. Use
1405 <computeroutput>--product</computeroutput>,
1406 <computeroutput>--producturl</computeroutput>,
1407 <computeroutput>--vendor</computeroutput>,
1408 <computeroutput>--vendorurl</computeroutput> and
1409 <computeroutput>--version</computeroutput> to specify this additional
1410 information. For legal reasons you may add a license text or the content
1411 of a license file by using the <computeroutput>--eula</computeroutput> and
1412 <computeroutput>--eulafile</computeroutput> option respectively. As with
1413 OVF import, you must use the <computeroutput>--vsys X</computeroutput>
1414 option to direct the previously mentioned options to the correct virtual
1415 machine.</para>
1416
1417 <para>For virtualization products which aren't fully compatible with the
1418 OVF standard 1.0 you can enable a OVF 0.9 legacy mode with the
1419 <computeroutput>--legacy09</computeroutput> option.</para>
1420
1421 <para>To specify options controlling the exact content of the appliance
1422 file, you can use <computeroutput>--option</computeroutput> to request the
1423 creation of a manifest file (encouraged, allows detection of corrupted
1424 appliances on import), the additional export of DVD images, and the
1425 exclusion of MAC addresses. You can specify a list of options, e.g.
1426 <computeroutput>--option manifest,nomacs</computeroutput>. For details,
1427 check the help output of <computeroutput>VBoxManage export</computeroutput>.</para>
1428 </sect1>
1429
1430 <sect1 id="vboxmanage-startvm">
1431 <title>VBoxManage startvm</title>
1432
1433 <para>This command starts a virtual machine that is currently in the
1434 "Powered off" or "Saved" states.</para>
1435
1436 <para>The optional <computeroutput>--type</computeroutput> specifier
1437 determines whether the machine will be started in a window or whether the
1438 output should go through <computeroutput>VBoxHeadless</computeroutput>,
1439 with VRDE enabled or not; see <xref linkend="vboxheadless" /> for more
1440 information. The list of types is subject to change, and it's not
1441 guaranteed that all types are accepted by any product variant.</para>
1442
1443 <para>The global or per-VM default value for the VM frontend type will be
1444 taken if the type is not explicitly specified. If none of these are set,
1445 the GUI variant will be started.</para>
1446
1447 <para>The following values are allowed:</para>
1448
1449 <glosslist>
1450 <glossentry>
1451 <glossterm><computeroutput>gui</computeroutput></glossterm>
1452
1453 <glossdef>
1454 <para>Starts a VM showing a GUI window. This is the default.</para>
1455 </glossdef>
1456 </glossentry>
1457
1458 <glossentry>
1459 <glossterm><computeroutput>headless</computeroutput></glossterm>
1460
1461 <glossdef>
1462 <para>Starts a VM without a window for remote display only.</para>
1463 </glossdef>
1464 </glossentry>
1465
1466 <glossentry>
1467 <glossterm><computeroutput>sdl</computeroutput></glossterm>
1468
1469 <glossdef>
1470 <para>Starts a VM with a minimal GUI and limited features.</para>
1471 </glossdef>
1472 </glossentry>
1473
1474 <glossentry>
1475 <glossterm><computeroutput>separate</computeroutput></glossterm>
1476
1477 <glossdef>
1478 <para>Starts a VM with detachable UI (technically it is a headless VM
1479 with user interface in a separate process). This is an experimental
1480 feature as it lacks certain functionality at the moment (e.g. 3D
1481 acceleration will not work).</para>
1482 </glossdef>
1483 </glossentry>
1484 </glosslist>
1485
1486 <note>
1487 <para>If you experience problems with starting virtual machines with
1488 particular frontends and there is no conclusive error information,
1489 consider starting virtual machines directly by running the respective
1490 front-end, as this can give additional error information.</para>
1491 </note>
1492 </sect1>
1493
1494 <sect1 id="vboxmanage-controlvm">
1495 <title>VBoxManage controlvm</title>
1496
1497 <para>The <computeroutput>controlvm</computeroutput> subcommand allows you
1498 to change the state of a virtual machine that is currently running. The
1499 following can be specified:</para>
1500
1501 <para><itemizedlist>
1502 <listitem>
1503 <para><computeroutput>VBoxManage controlvm &lt;vm&gt;
1504 pause</computeroutput> temporarily puts a virtual machine on hold,
1505 without changing its state for good. The VM window will be painted
1506 in gray to indicate that the VM is currently paused. (This is
1507 equivalent to selecting the "Pause" item in the "Machine" menu of
1508 the GUI.)</para>
1509 </listitem>
1510
1511 <listitem>
1512 <para>Use <computeroutput>VBoxManage controlvm &lt;vm&gt;
1513 resume</computeroutput> to undo a previous
1514 <computeroutput>pause</computeroutput> command. (This is equivalent
1515 to selecting the "Resume" item in the "Machine" menu of the
1516 GUI.)</para>
1517 </listitem>
1518
1519 <listitem>
1520 <para><computeroutput>VBoxManage controlvm &lt;vm&gt;
1521 reset</computeroutput> has the same effect on a virtual machine as
1522 pressing the "Reset" button on a real computer: a cold reboot of the
1523 virtual machine, which will restart and boot the guest operating
1524 system again immediately. The state of the VM is not saved
1525 beforehand, and data may be lost. (This is equivalent to selecting
1526 the "Reset" item in the "Machine" menu of the GUI.)</para>
1527 </listitem>
1528
1529 <listitem>
1530 <para><computeroutput>VBoxManage controlvm &lt;vm&gt;
1531 poweroff</computeroutput> has the same effect on a virtual machine
1532 as pulling the power cable on a real computer. Again, the state of
1533 the VM is not saved beforehand, and data may be lost. (This is
1534 equivalent to selecting the "Close" item in the "Machine" menu of
1535 the GUI or pressing the window's close button, and then selecting
1536 "Power off the machine" in the dialog.)</para>
1537
1538 <para>After this, the VM's state will be "Powered off". From there,
1539 it can be started again; see <xref
1540 linkend="vboxmanage-startvm" />.</para>
1541 </listitem>
1542
1543 <listitem>
1544 <para><computeroutput>VBoxManage controlvm &lt;vm&gt;
1545 savestate</computeroutput> will save the current state of the VM to
1546 disk and then stop the VM. (This is equivalent to selecting the
1547 "Close" item in the "Machine" menu of the GUI or pressing the
1548 window's close button, and then selecting "Save the machine state"
1549 in the dialog.)</para>
1550
1551 <para>After this, the VM's state will be "Saved". From there, it can
1552 be started again; see <xref linkend="vboxmanage-startvm" />.</para>
1553 </listitem>
1554
1555 <listitem>
1556 <para><computeroutput>VBoxManage controlvm "VM name" teleport
1557 --hostname &lt;name&gt; --port &lt;port&gt; [--passwordfile
1558 &lt;file&gt; | --password &lt;password&gt;]</computeroutput> makes
1559 the machine the source of a teleporting operation and initiates a
1560 teleport to the given target. See <xref linkend="teleporting" /> for
1561 an introduction. If the optional password is specified, it must match
1562 the password that was given to the
1563 <computeroutput>modifyvm</computeroutput> command for the target
1564 machine; see <xref linkend="vboxmanage-modifyvm-teleport" /> for
1565 details.</para>
1566 </listitem>
1567 </itemizedlist></para>
1568
1569 <para>A few extra options are available with
1570 <computeroutput>controlvm</computeroutput> that do not directly affect the
1571 VM's running state:</para>
1572
1573 <itemizedlist>
1574 <!-- @todo r=andy Document keyboardputscancode -->
1575
1576 <listitem>
1577 <para>The <computeroutput>setlinkstate&lt;1-N&gt;</computeroutput>
1578 operation connects or disconnects virtual network cables from their
1579 network interfaces.</para>
1580 </listitem>
1581
1582 <listitem>
1583 <para><computeroutput>nic&lt;1-N&gt;
1584 null|nat|bridged|intnet|hostonly|generic</computeroutput>: With this, you can
1585 set, for each of the VM's virtual network cards, what type of
1586 networking should be available. They can be not connected to the host
1587 (<computeroutput>null</computeroutput>), use network address
1588 translation (<computeroutput>nat</computeroutput>), bridged networking
1589 (<computeroutput>bridged</computeroutput>) or communicate with other
1590 virtual machines using internal networking
1591 (<computeroutput>intnet</computeroutput>) or host-only networking
1592 (<computeroutput>hostonly</computeroutput>) or access to rarely used
1593 sub-modes
1594 (<computeroutput>generic</computeroutput>). These options correspond
1595 to the modes which are described in detail in <xref
1596 linkend="networkingmodes" />.</para>
1597 </listitem>
1598
1599 <listitem>
1600 <para>With the "nictrace" options, you can optionally trace
1601 network traffic by dumping it to a file, for debugging
1602 purposes.</para>
1603
1604 <para>With <computeroutput>--nictrace&lt;1-N&gt;
1605 on|off</computeroutput>, you can enable network tracing for a
1606 particular virtual network card.</para>
1607
1608 <para>If enabled, you must specify with
1609 <computeroutput>--nictracefile&lt;1-N&gt;
1610 &lt;filename&gt;</computeroutput> what file the trace should be
1611 logged to.</para>
1612 </listitem>
1613
1614 <!-- @todo r=andy Document nicpromisc -->
1615
1616 <listitem>
1617 <para><computeroutput>nicproperty&lt;1-N&gt;
1618 &lt;paramname&gt;="paramvalue"</computeroutput>:
1619 This option, in combination with "nicgenericdrv" allows you to
1620 pass parameters to rarely-used network backends.</para><para>
1621 Those parameters are backend engine-specific, and are different
1622 between UDP Tunnel and the VDE backend drivers. For example,
1623 please see <xref linkend="network_udp_tunnel" />.
1624 </para>
1625 </listitem>
1626
1627 <listitem>
1628 <para>The <computeroutput>guestmemoryballoon</computeroutput>
1629 operation changes the size of the guest memory balloon, that is,
1630 memory allocated by the VirtualBox Guest Additions from the guest
1631 operating system and returned to the hypervisor for re-use by other
1632 virtual machines. This must be specified in megabytes. For details,
1633 see <xref linkend="guestadd-balloon" />.</para>
1634 </listitem>
1635
1636 <listitem>
1637 <para><computeroutput>usbattach</computeroutput> and
1638 <computeroutput>usbdettach</computeroutput> make host USB devices
1639 visible to the virtual machine on the fly, without the need for
1640 creating filters first. The USB devices can be specified by UUID
1641 (unique identifier) or by address on the host system.</para>
1642
1643 <para>You can use <computeroutput>VBoxManage list
1644 usbhost</computeroutput> to locate this information.</para>
1645 </listitem>
1646
1647 <listitem>
1648 <para><computeroutput>clipboard
1649 disabled|hosttoguest|guesttohost|bidirectional</computeroutput>:
1650 With this setting, you can select if and how the guest or host
1651 operating system's clipboard should be shared with the host or guest;
1652 see <xref linkend="generalsettings" />. This requires that the Guest
1653 Additions be installed in the virtual machine.</para>
1654 </listitem>
1655
1656 <listitem>
1657 <para><computeroutput>draganddrop
1658 disabled|hosttoguest|guesttohost|bidirectional</computeroutput>:
1659 With this setting, you can select the current drag'n drop mode
1660 being used between the host and the virtual machine;
1661 see <xref linkend="guestadd-dnd" />. This requires that the Guest
1662 Additions be installed in the virtual machine.</para>
1663 </listitem>
1664
1665 <listitem>
1666 <para><computeroutput>vrde on|off</computeroutput> lets you enable or
1667 disable the VRDE server, if it is installed.</para>
1668 </listitem>
1669
1670 <listitem>
1671 <para><computeroutput>vrdeport default|&lt;ports&gt;</computeroutput>
1672 changes the port or a range of ports that the VRDE server can bind to;
1673 "default" or "0" means port 3389, the standard port for RDP. For
1674 details, see the description for the
1675 <computeroutput>--vrdeport</computeroutput> option in <xref
1676 linkend="vboxmanage-modifyvm-other" />.</para>
1677 </listitem>
1678
1679
1680 <listitem>
1681 <para><computeroutput>setvideomodehint</computeroutput> requests that
1682 the guest system change to a particular video mode. This requires that
1683 the Guest Additions be installed, and will not work for all guest
1684 systems.</para>
1685 </listitem>
1686
1687 <listitem>
1688 <para><computeroutput>screenshotpng</computeroutput> takes a screenshot
1689 of the guest display and saves it in PNG format.</para>
1690 </listitem>
1691
1692 <listitem>
1693 <para><computeroutput>videocap on|off</computeroutput> enables or disables
1694 recording a VM session into a WebM/VP8 file.</para>
1695 </listitem>
1696
1697 <listitem>
1698 <para><computeroutput>videocapscreens all|&lt;screen ID&gt; [&lt;screen ID&gt; ...]]</computeroutput>
1699 allows to specify which screens of the VM are being recorded. This setting
1700 cannot be changed while video capturing is enabled.</para>
1701 </listitem>
1702
1703 <listitem>
1704 <para><computeroutput>videocapfile &lt;file&gt;</computeroutput> sets the filename
1705 VirtualBox uses to save the recorded content. This setting cannot be changed
1706 while video capturing is enabled.</para>
1707 </listitem>
1708
1709 <listitem>
1710 <para><computeroutput>videocapres &lt;width&gt; &lt;height&gt;</computeroutput>
1711 sets the resolution (in pixels) of the recorded video. This setting cannot be
1712 changed while video capturing is enabled.</para>
1713 </listitem>
1714
1715 <listitem> <!-- @todo r=andy Clarify rate. -->
1716 <para><computeroutput>videocaprate &lt;rate&gt;</computeroutput> sets the
1717 bitrate in kilobits (kb) per second. Increasing this value makes the video
1718 look better for the cost of an increased file size. This setting cannot be
1719 changed while video capturing is enabled.</para>
1720 </listitem>
1721
1722 <listitem>
1723 <para><computeroutput>videocapfps &lt;fps&gt;</computeroutput> sets the
1724 maximum number of frames per second (FPS) to be recorded. Frames with a
1725 higher frequency will be skipped. Reducing this value increases the number
1726 of skipped frames and reduces the file size. This setting cannot be changed
1727 while video capturing is enabled.</para>
1728 </listitem>
1729
1730 <listitem> <!-- @todo r=andy Clarify time format. -->
1731 <para><computeroutput>videocapmaxtime &lt;time&gt;</computeroutput> sets
1732 the maximum time the video capturing will take place since activation.
1733 The capturing stops when the defined time interval has elapsed. If this
1734 value is zero the capturing is not limited by time. This setting cannot
1735 be changed while video capturing is enabled.</para>
1736 </listitem>
1737
1738 <listitem>
1739 <para><computeroutput>videocapmaxsize &lt;MB&gt;</computeroutput> limits
1740 the maximum size of the captured video file (in MB). The capturing stops
1741 when file size has reached the specified size. If this value is zero
1742 the capturing will not be limited by file size. This setting cannot be
1743 changed while video capturing is enabled.</para>
1744 </listitem>
1745
1746 <listitem>
1747 <para><computeroutput>videocapopts &lt;key=value&gt; [&lt;key=value&gt; ...]</computeroutput>
1748 can be used to specify additional video capturing options. These options
1749 only are for advanced users and must be specified in a comma-separated
1750 key=value format, e.g. <computeroutput>foo=bar,a=b</computeroutput>.
1751 This setting cannot be changed while video capturing is enabled.</para>
1752 </listitem>
1753
1754 <listitem>
1755 <para>The <computeroutput>setcredentials</computeroutput> operation is
1756 used for remote logons in Windows guests. For details, please refer to
1757 <xref linkend="autologon" />.</para>
1758 </listitem>
1759
1760 <!-- @todo r=andy Document teleport! -->
1761
1762 <listitem>
1763 <para><computeroutput>--plugcpu|unplugcpu
1764 &lt;id&gt;</computeroutput>: If CPU hot-plugging is enabled, this adds
1765 a virtual CPU to the virtual machines (or removes one).
1766 <computeroutput>&lt;id&gt;</computeroutput> specifies the index of
1767 the virtual CPU to be added or removed and must be a number from 0
1768 to the maximum no. of CPUs configured. CPU 0 can never be removed.</para>
1769 </listitem>
1770
1771 <listitem>
1772 <para>The <computeroutput>cpuexecutioncap
1773 &lt;1-100&gt;</computeroutput>: This operation controls how much cpu
1774 time a virtual CPU can use. A value of 50 implies a single virtual CPU
1775 can use up to 50% of a single host CPU.</para>
1776 </listitem>
1777
1778 <!-- @todo r=andy Document webcam! -->
1779
1780 </itemizedlist>
1781 </sect1>
1782
1783 <sect1>
1784 <title>VBoxManage discardstate</title>
1785
1786 <para>This command discards the saved state of a virtual machine which is
1787 not currently running, which will cause its operating system to restart
1788 next time you start it. This is the equivalent of pulling out the power
1789 cable on a physical machine, and should be avoided if possible.</para>
1790 </sect1>
1791
1792 <sect1>
1793 <title>VBoxManage adoptstate</title>
1794
1795 <para>If you have a saved state file (<computeroutput>.sav</computeroutput>)
1796 that is separate from the VM configuration, you can use this command to
1797 "adopt" the file. This will change the VM to saved state and when you
1798 start it, VirtualBox will attempt to restore it from the saved state file
1799 you indicated. This command should only be used in special setups.</para>
1800 </sect1>
1801
1802 <sect1>
1803 <title>VBoxManage snapshot</title>
1804
1805 <para>This command is used to control snapshots from the command line. A
1806 snapshot consists of a complete copy of the virtual machine settings,
1807 copied at the time when the snapshot was taken, and optionally a virtual
1808 machine saved state file if the snapshot was taken while the machine was
1809 running. After a snapshot has been taken, VirtualBox creates differencing
1810 hard disk for each normal hard disk associated with the machine so that
1811 when a snapshot is restored, the contents of the virtual machine's virtual
1812 hard disks can be quickly reset by simply dropping the pre-existing
1813 differencing files.</para>
1814
1815 <para>The <computeroutput>take</computeroutput> operation takes a snapshot
1816 of the current state of the virtual machine. You must supply a name for
1817 the snapshot and can optionally supply a description. The new snapshot is
1818 inserted into the snapshots tree as a child of the current snapshot and
1819 then becomes the new current snapshot. The
1820 <computeroutput>--description</computeroutput> parameter allows to
1821 describe the snapshot. If <computeroutput>--live</computeroutput>
1822 is specified, the VM will not be stopped during the snapshot creation
1823 (live smapshotting).</para>
1824
1825 <para>The <computeroutput>delete</computeroutput> operation deletes a
1826 snapshot (specified by name or by UUID). This can take a while to finish
1827 since the differencing images associated with the snapshot might need to
1828 be merged with their child differencing images.</para>
1829
1830 <para>The <computeroutput>restore</computeroutput> operation will restore
1831 the given snapshot (specified by name or by UUID) by resetting the virtual
1832 machine's settings and current state to that of the snapshot. The previous
1833 current state of the machine will be lost. After this, the given snapshot
1834 becomes the new "current" snapshot so that subsequent snapshots are
1835 inserted under the snapshot from which was restored.</para>
1836
1837 <para>The <computeroutput>restorecurrent</computeroutput> operation is a
1838 shortcut to restore the current snapshot (i.e. the snapshot from which the
1839 current state is derived). This subcommand is equivalent to using the
1840 "restore" subcommand with the name or UUID of the current snapshot, except
1841 that it avoids the extra step of determining that name or UUID.</para>
1842
1843 <para>With the <computeroutput>edit</computeroutput> operation, you can
1844 change the name or description of an existing snapshot.</para>
1845
1846 <para>With the <computeroutput>showvminfo</computeroutput> operation, you
1847 can view the virtual machine settings that were stored with an existing
1848 snapshot.</para>
1849 </sect1>
1850
1851 <sect1 id="vboxmanage-closemedium">
1852 <title>VBoxManage closemedium</title>
1853
1854 <para>This commands removes a hard disk, DVD or floppy image from a
1855 VirtualBox media registry.<footnote>
1856 <para>Before VirtualBox 4.0, it was necessary to call VBoxManage
1857 openmedium before a medium could be attached to a virtual machine;
1858 that call "registered" the medium with the global VirtualBox media
1859 registry. With VirtualBox 4.0 this is no longer necessary; media are
1860 added to media registries automatically. The "closemedium" call has
1861 been retained, however, to allow for explicitly removing a medium from
1862 a registry.</para>
1863 </footnote></para>
1864
1865 <para>Optionally, you can request that the image be deleted. You will get
1866 appropriate diagnostics that the deletion failed, however the image will
1867 become unregistered in any case.</para>
1868 </sect1>
1869
1870 <sect1 id="vboxmanage-storageattach">
1871 <title>VBoxManage storageattach</title>
1872
1873 <para>This command attaches/modifies/removes a storage medium connected to
1874 a storage controller that was previously added with the
1875 <computeroutput>storagectl</computeroutput> command (see the previous
1876 section). The syntax is as follows:</para>
1877
1878 <screen>VBoxManage storageattach &lt;uuid|vmname&gt;
1879 --storagectl &lt;name&gt;
1880 [--port &lt;number&gt;]
1881 [--device &lt;number&gt;]
1882 [--type dvddrive|hdd|fdd]
1883 [--medium none|emptydrive|
1884 &lt;uuid&gt;|&lt;filename&gt;|host:&lt;drive&gt;|iscsi]
1885 [--mtype normal|writethrough|immutable|shareable]
1886 [--comment &lt;text&gt;]
1887 [--setuuid &lt;uuid&gt;]
1888 [--setparentuuid &lt;uuid&gt;]
1889 [--passthrough on|off]
1890 [--tempeject on|off]
1891 [--nonrotational on|off]
1892 [--discard on|off]
1893 [--bandwidthgroup name|none]
1894 [--forceunmount]
1895 [--server &lt;name&gt;|&lt;ip&gt;]
1896 [--target &lt;target&gt;]
1897 [--tport &lt;port&gt;]
1898 [--lun &lt;lun&gt;]
1899 [--encodedlun &lt;lun&gt;]
1900 [--username &lt;username&gt;]
1901 [--password &lt;password&gt;]
1902 [--initiator &lt;initiator&gt;]
1903 [--intnet]</screen>
1904
1905 <para>A number of parameters are commonly required; the ones at the end of
1906 the list are required only for iSCSI targets (see below).</para>
1907
1908 <para>The common parameters are:<glosslist>
1909 <glossentry>
1910 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
1911
1912 <glossdef>
1913 <para>The VM UUID or VM Name. Mandatory.</para>
1914 </glossdef>
1915 </glossentry>
1916
1917 <glossentry>
1918 <glossterm><computeroutput>--storagectl</computeroutput></glossterm>
1919
1920 <glossdef>
1921 <para>Name of the storage controller. Mandatory. The list of the
1922 storage controllers currently attached to a VM can be obtained
1923 with <computeroutput>VBoxManage showvminfo</computeroutput>; see
1924 <xref linkend="vboxmanage-showvminfo" />.</para>
1925 </glossdef>
1926 </glossentry>
1927
1928 <glossentry>
1929 <glossterm><computeroutput>--port</computeroutput></glossterm>
1930
1931 <glossdef>
1932 <para>The number of the storage controller's port which is to be
1933 modified. Mandatory, unless the storage controller has only a
1934 single port.</para>
1935 </glossdef>
1936 </glossentry>
1937
1938 <glossentry>
1939 <glossterm><computeroutput>--device</computeroutput></glossterm>
1940
1941 <glossdef>
1942 <para>The number of the port's device which is to be modified.
1943 Mandatory, unless the storage controller has only a single device
1944 per port.</para>
1945 </glossdef>
1946 </glossentry>
1947
1948 <glossentry>
1949 <glossterm><computeroutput>--type</computeroutput></glossterm>
1950
1951 <glossdef>
1952 <para>Define the type of the drive to which the medium is being
1953 attached/detached/modified. This argument can only be omitted if
1954 the type of medium can be determined from either the medium given
1955 with the <computeroutput>--medium</computeroutput> argument or
1956 from a previous medium attachment.</para>
1957 </glossdef>
1958 </glossentry>
1959
1960 <glossentry>
1961 <glossterm><computeroutput>--medium</computeroutput></glossterm>
1962
1963 <glossdef>
1964 <para>Specifies what is to be attached. The following values are
1965 supported:<itemizedlist>
1966 <listitem>
1967 <para>"none": Any existing device should be removed from the
1968 given slot.</para>
1969 </listitem>
1970
1971 <listitem>
1972 <para>"emptydrive": For a virtual DVD or floppy drive only,
1973 this makes the device slot behaves like a removeable drive
1974 into which no media has been inserted.</para>
1975 </listitem>
1976
1977 <listitem>
1978 <para>"additions": For a virtual DVD drive only, this
1979 attaches the <emphasis>VirtualBox Guest Additions</emphasis>
1980 image to the given device slot.</para>
1981 </listitem>
1982
1983 <listitem>
1984 <para>If a UUID is specified, it must be the UUID of a
1985 storage medium that is already known to VirtualBox (e.g.
1986 because it has been attached to another virtual machine).
1987 See <xref linkend="vboxmanage-list" /> for how to list known
1988 media. This medium is then attached to the given device
1989 slot.</para>
1990 </listitem>
1991
1992 <listitem>
1993 <para>If a filename is specified, it must be the full path
1994 of an existing disk image (ISO, RAW, VDI, VMDK or other),
1995 which is then attached to the given device slot.</para>
1996 </listitem>
1997
1998 <listitem>
1999 <para>"host:&lt;drive&gt;": For a virtual DVD or floppy
2000 drive only, this connects the given device slot to the
2001 specified DVD or floppy drive on the host computer.</para>
2002 </listitem>
2003
2004 <listitem>
2005 <para>"iscsi": For virtual hard disks only, this allows for
2006 specifying an iSCSI target. In this case, more parameters
2007 must be given; see below.</para>
2008 </listitem>
2009 </itemizedlist></para>
2010
2011 <para>Some of the above changes, in particular for removeable
2012 media (floppies and CDs/DVDs), can be effected while a VM is
2013 running. Others (device changes or changes in hard disk device
2014 slots) require the VM to be powered off.</para>
2015 </glossdef>
2016 </glossentry>
2017
2018 <glossentry>
2019 <glossterm><computeroutput>--mtype</computeroutput></glossterm>
2020
2021 <glossdef>
2022 <para>Defines how this medium behaves with respect to snapshots
2023 and write operations. See <xref linkend="hdimagewrites" /> for
2024 details.</para>
2025 </glossdef>
2026 </glossentry>
2027
2028 <glossentry>
2029 <glossterm><computeroutput>--comment</computeroutput></glossterm>
2030
2031 <glossdef>
2032 <para>Any description that you want to have stored with this
2033 medium (optional; for example, for an iSCSI target, "Big storage
2034 server downstairs"). This is purely descriptive and not needed for
2035 the medium to function correctly.</para>
2036 </glossdef>
2037 </glossentry>
2038
2039 <glossentry>
2040 <glossterm><computeroutput>--setuuid, --setparentuuid</computeroutput></glossterm>
2041
2042 <glossdef>
2043 <para>Modifies the UUID or parent UUID of a medium before
2044 attaching it to a VM. This is an expert option. Inappropriate use
2045 can make the medium unusable or lead to broken VM configurations
2046 if any other VM is referring to the same media already. The most
2047 frequently used variant is <code>--setuuid ""</code>, which assigns
2048 a new (random) UUID to an image. This is useful to resolve the
2049 duplicate UUID errors if one duplicated an image using file copy
2050 utilities.</para>
2051 </glossdef>
2052 </glossentry>
2053
2054 <glossentry>
2055 <glossterm><computeroutput>--passthrough</computeroutput></glossterm>
2056
2057 <glossdef>
2058 <para>For a virtual DVD drive only, you can enable DVD writing
2059 support (currently experimental; see <xref
2060 linkend="storage-cds" />).</para>
2061 </glossdef>
2062 </glossentry>
2063
2064 <glossentry>
2065 <glossterm><computeroutput>--tempeject</computeroutput></glossterm>
2066
2067 <glossdef>
2068 <para>For a virtual DVD drive only, you can configure the behavior
2069 for guest-triggered medium eject. If this is set to "on", the eject
2070 has only temporary effects. If the VM is powered off and restarted
2071 the originally configured medium will be still in the drive.</para>
2072 </glossdef>
2073 </glossentry>
2074
2075 <glossentry>
2076 <glossterm><computeroutput>--nonrotational</computeroutput></glossterm>
2077
2078 <glossdef>
2079 <para>This switch allows to enable the non-rotational flag for virtual
2080 hard disks. Some guests (i.e. Windows 7+) treat such disks like SSDs
2081 and don't perform disk fragmentation on such media.
2082 </para>
2083 </glossdef>
2084 </glossentry>
2085
2086 <glossentry>
2087 <glossterm><computeroutput>--bandwidthgroup</computeroutput></glossterm>
2088
2089 <glossdef>
2090 <para>Sets the bandwidth group to use for the given device; see
2091 <xref linkend="storage-bandwidth-limit" />.</para>
2092 </glossdef>
2093 </glossentry>
2094
2095 <glossentry>
2096 <glossterm><computeroutput>--forceunmount</computeroutput></glossterm>
2097
2098 <glossdef>
2099 <para>For a virtual DVD or floppy drive only, this forcibly
2100 unmounts the DVD/CD/Floppy or mounts a new DVD/CD/Floppy even if
2101 the previous one is locked down by the guest for reading. Again,
2102 see <xref linkend="storage-cds" /> for details.</para>
2103 </glossdef>
2104 </glossentry>
2105 </glosslist></para>
2106
2107 <para>When "iscsi" is used with the
2108 <computeroutput>--medium</computeroutput> parameter for iSCSI support --
2109 see <xref linkend="storage-iscsi" /> --, additional parameters must or can
2110 be used:<glosslist>
2111 <glossentry>
2112 <glossterm><computeroutput>--server</computeroutput></glossterm>
2113
2114 <glossdef>
2115 <para>The host name or IP address of the iSCSI target;
2116 required.</para>
2117 </glossdef>
2118 </glossentry>
2119
2120 <glossentry>
2121 <glossterm><computeroutput>--target</computeroutput></glossterm>
2122
2123 <glossdef>
2124 <para>Target name string. This is determined by the iSCSI target
2125 and used to identify the storage resource; required.</para>
2126 </glossdef>
2127 </glossentry>
2128
2129 <glossentry>
2130 <glossterm><computeroutput>--tport</computeroutput></glossterm>
2131
2132 <glossdef>
2133 <para>TCP/IP port number of the iSCSI service on the target
2134 (optional).</para>
2135 </glossdef>
2136 </glossentry>
2137
2138 <glossentry>
2139 <glossterm><computeroutput>--lun</computeroutput></glossterm>
2140
2141 <glossdef>
2142 <para>Logical Unit Number of the target resource (optional).
2143 Often, this value is zero.</para>
2144 </glossdef>
2145 </glossentry>
2146
2147 <glossentry>
2148 <glossterm><computeroutput>--username, --password</computeroutput></glossterm>
2149
2150 <glossdef>
2151 <para>Username and password (initiator secret) for target
2152 authentication, if required (optional).<note>
2153 <para>Username and password are stored without
2154 encryption (i.e. in clear text) in the XML machine
2155 configuration file if no settings password is provided.
2156 When a settings password was specified the first time,
2157 the password is stored encrypted.</para>
2158 </note></para>
2159 </glossdef>
2160 </glossentry>
2161
2162 <glossentry>
2163 <glossterm><computeroutput>--intnet</computeroutput></glossterm>
2164
2165 <glossdef>
2166 <para>If specified, connect to the iSCSI target via Internal
2167 Networking. This needs further configuration which is described in
2168 <xref linkend="iscsi-intnet" />.</para>
2169 </glossdef>
2170 </glossentry>
2171 </glosslist></para>
2172 </sect1>
2173
2174 <sect1 id="vboxmanage-storagectl">
2175 <title>VBoxManage storagectl</title>
2176
2177 <para>This command attaches/modifies/removes a storage controller. After
2178 this, virtual media can be attached to the controller with the
2179 <computeroutput>storageattach</computeroutput> command (see the next
2180 section).</para>
2181
2182 <para>The syntax is as follows:</para>
2183
2184 <screen>VBoxManage storagectl &lt;uuid|vmname&gt;
2185 --name &lt;name&gt;
2186 [--add &lt;ide/sata/scsi/floppy&gt;]
2187 [--controller &lt;LsiLogic|LSILogicSAS|BusLogic|
2188 IntelAhci|PIIX3|PIIX4|ICH6|I82078|usb&gt;]
2189 [--sataportcount &lt;1-30&gt;]
2190 [--hostiocache on|off]
2191 [--bootable on|off]
2192 [--remove]</screen>
2193
2194 <para>where the parameters mean: <glosslist>
2195 <glossentry>
2196 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
2197
2198 <glossdef>
2199 <para>The VM UUID or VM Name. Mandatory.</para>
2200 </glossdef>
2201 </glossentry>
2202
2203 <glossentry>
2204 <glossterm><computeroutput>--name</computeroutput></glossterm>
2205
2206 <glossdef>
2207 <para>Name of the storage controller. Mandatory.</para>
2208 </glossdef>
2209 </glossentry>
2210
2211 <glossentry>
2212 <glossterm><computeroutput>--add</computeroutput></glossterm>
2213
2214 <glossdef>
2215 <para>Define the type of the system bus to which the storage
2216 controller must be connected.</para>
2217 </glossdef>
2218 </glossentry>
2219
2220 <glossentry>
2221 <glossterm><computeroutput>--controller</computeroutput></glossterm>
2222
2223 <glossdef>
2224 <para>Allows to choose the type of chipset being emulated for the
2225 given storage controller.</para>
2226 </glossdef>
2227 </glossentry>
2228
2229 <glossentry>
2230 <glossterm><computeroutput>--sataportcount</computeroutput></glossterm>
2231
2232 <glossdef>
2233 <para>This determines how many ports the SATA controller should
2234 support.</para>
2235 </glossdef>
2236 </glossentry>
2237
2238 <glossentry>
2239 <glossterm><computeroutput>--hostiocache</computeroutput></glossterm>
2240
2241 <glossdef>
2242 <para>Configures the use of the host I/O cache for all disk images
2243 attached to this storage controller. For details, please see <xref
2244 linkend="iocaching" />.</para>
2245 </glossdef>
2246 </glossentry>
2247
2248 <glossentry>
2249 <glossterm><computeroutput>--bootable</computeroutput></glossterm>
2250
2251 <glossdef>
2252 <para>Selects whether this controller is bootable.</para>
2253 </glossdef>
2254 </glossentry>
2255
2256 <glossentry>
2257 <glossterm><computeroutput>--remove</computeroutput></glossterm>
2258
2259 <glossdef>
2260 <para>Removes the storage controller from the VM config.</para>
2261 </glossdef>
2262 </glossentry>
2263 </glosslist></para>
2264 </sect1>
2265
2266 <sect1>
2267 <title>VBoxManage bandwidthctl</title>
2268
2269 <para>This command creates/deletes/modifies/shows bandwidth groups of the given
2270 virtual machine:<screen>VBoxManage bandwidthctl &lt;uuid|vmname&gt;
2271 add &lt;name&gt; --type disk|network --limit &lt;megabytes per second&gt;[k|m|g|K|M|G] |
2272 set &lt;name&gt; --limit &lt;megabytes per second&gt;[k|m|g|K|M|G] |
2273 remove &lt;name&gt; |
2274 list [--machinereadable]</screen></para>
2275
2276 <para>The following subcommands are available:<itemizedlist>
2277 <listitem>
2278 <para><computeroutput>add</computeroutput>, creates a new bandwidth
2279 group of given type.</para>
2280 </listitem>
2281 <listitem>
2282 <para><computeroutput>set</computeroutput>, modifies the limit for an
2283 existing bandwidth group.</para>
2284 </listitem>
2285 <listitem>
2286 <para><computeroutput>remove</computeroutput>, destroys a bandwidth
2287 group.</para>
2288 </listitem>
2289 <listitem>
2290 <para><computeroutput>list</computeroutput>, shows all bandwidth groups
2291 defined for the given VM.</para>
2292 </listitem>
2293 </itemizedlist>
2294 </para>
2295 <para>The parameters mean:<glosslist>
2296 <glossentry>
2297 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
2298
2299 <glossdef>
2300 <para>The VM UUID or VM Name. Mandatory.</para>
2301 </glossdef>
2302 </glossentry>
2303
2304 <glossentry>
2305 <glossterm><computeroutput>--name</computeroutput></glossterm>
2306
2307 <glossdef>
2308 <para>Name of the bandwidth group. Mandatory.</para>
2309 </glossdef>
2310 </glossentry>
2311
2312 <glossentry>
2313 <glossterm><computeroutput>--type</computeroutput></glossterm>
2314
2315 <glossdef>
2316 <para>Type of the bandwidth group. Mandatory. Two types are
2317 supported: <computeroutput>disk</computeroutput> and
2318 <computeroutput>network</computeroutput>. See
2319 <xref linkend="storage-bandwidth-limit" /> or
2320 <xref linkend="network_bandwidth_limit" /> for a description of a
2321 particular type.</para>
2322 </glossdef>
2323 </glossentry>
2324
2325 <glossentry>
2326 <glossterm><computeroutput>--limit</computeroutput></glossterm>
2327
2328 <glossdef>
2329 <para>Specifies the limit for the given group. Can be changed
2330 while the VM is running. The default unit is megabytes per
2331 second. The unit can be changed by specifying one of the
2332 following suffixes: <computeroutput>k</computeroutput> for kilobits/s, <computeroutput>m</computeroutput> for megabits/s, <computeroutput>g</computeroutput> for gigabits/s, <computeroutput>K</computeroutput> for kilobytes/s, <computeroutput>M</computeroutput> for megabytes/s, <computeroutput>G</computeroutput> for gigabytes/s.</para>
2333 </glossdef>
2334 </glossentry>
2335 </glosslist>
2336 <note>
2337 <para>The network bandwidth limits apply only to the traffic being sent by
2338 virtual machines. The traffic being received by VMs is unlimited.</para>
2339 </note>
2340 <note>
2341 <para>To remove a bandwidth group it must not be referenced by any disks
2342 or adapters in running VM.</para>
2343 </note>
2344 </para>
2345 </sect1>
2346
2347 <sect1>
2348 <title>VBoxManage showhdinfo</title>
2349
2350 <para>This command shows information about a virtual hard disk image,
2351 notably its size, its size on disk, its type and the virtual machines
2352 which use it.<note>
2353 <para>For compatibility with earlier versions of VirtualBox, the
2354 "showvdiinfo" command is also supported and mapped internally to the
2355 "showhdinfo" command.</para>
2356 </note></para>
2357 <para>The disk image must be specified either by its UUID (if the medium
2358 is registered) or by its filename. Registered images can be listed by
2359 <computeroutput>VBoxManage list hdds</computeroutput> (see <xref linkend="vboxmanage-list" />
2360 for more information). A filename must be specified as valid path, either
2361 as an absolute path or as a relative path starting from the current
2362 directory.</para>
2363 </sect1>
2364
2365 <sect1 id="vboxmanage-createvdi">
2366 <title>VBoxManage createhd</title>
2367
2368 <para>This command creates a new virtual hard disk image. The syntax is as
2369 follows:</para>
2370
2371 <screen>VBoxManage createhd --filename &lt;filename&gt;
2372 --size &lt;megabytes&gt;
2373 [--format VDI|VMDK|VHD] (default: VDI)
2374 [--variant Standard,Fixed,Split2G,Stream,ESX]</screen>
2375
2376 <para>where the parameters mean:<glosslist>
2377 <glossentry>
2378 <glossterm><computeroutput>--filename</computeroutput></glossterm>
2379
2380 <glossdef>
2381 <para>Allows to choose a file name. Mandatory.</para>
2382 </glossdef>
2383 </glossentry>
2384
2385 <glossentry>
2386 <glossterm><computeroutput>--size</computeroutput></glossterm>
2387
2388 <glossdef>
2389 <para>Allows to define the image capacity, in 1 MiB units.
2390 Mandatory.</para>
2391 </glossdef>
2392 </glossentry>
2393
2394 <glossentry>
2395 <glossterm><computeroutput>--format</computeroutput></glossterm>
2396
2397 <glossdef>
2398 <para>Allows to choose a file format for the output file different
2399 from the file format of the input file.</para>
2400 </glossdef>
2401 </glossentry>
2402
2403 <glossentry>
2404 <glossterm><computeroutput>--variant</computeroutput></glossterm>
2405
2406 <glossdef>
2407 <para>Allows to choose a file format variant for the output file.
2408 It is a comma-separated list of variant flags. Not all
2409 combinations are supported, and specifying inconsistent flags will
2410 result in an error message.</para>
2411 </glossdef>
2412 </glossentry>
2413 </glosslist> <note>
2414 <para>For compatibility with earlier versions of VirtualBox, the
2415 "createvdi" command is also supported and mapped internally to the
2416 "createhd" command.</para>
2417 </note></para>
2418 </sect1>
2419
2420 <sect1 id="vboxmanage-modifyvdi">
2421 <title>VBoxManage modifyhd</title>
2422
2423 <para>With the <computeroutput>modifyhd</computeroutput> command, you can
2424 change the characteristics of a disk image after it has been
2425 created:<screen>VBoxManage modifyhd &lt;uuid|filename&gt;
2426 [--type normal|writethrough|immutable|shareable|
2427 readonly|multiattach]
2428 [--autoreset on|off]
2429 [--compact]
2430 [--resize &lt;megabytes&gt;|--resizebyte &lt;bytes&gt;]</screen><note>
2431 <para>Despite the "hd" in the subcommand name, the command works with
2432 all disk images, not only hard disks. For compatibility with earlier
2433 versions of VirtualBox, the "modifyvdi" command is also supported and
2434 mapped internally to the "modifyhd" command.</para>
2435 </note></para>
2436
2437 <para>The disk image to modify must be specified either by its UUID
2438 (if the medium is registered) or by its filename. Registered images
2439 can be listed by <computeroutput>VBoxManage list hdds</computeroutput>
2440 (see <xref linkend="vboxmanage-list" /> for more information).
2441 A filename must be specified as valid path, either as an absolute path
2442 or as a relative path starting from the current directory.</para>
2443 <para>The following options are available:<itemizedlist>
2444 <listitem>
2445 <para>With the <computeroutput>--type</computeroutput> argument, you
2446 can change the type of an existing image between the normal,
2447 immutable, write-through and other modes; see <xref
2448 linkend="hdimagewrites" /> for details.</para>
2449 </listitem>
2450
2451 <listitem>
2452 <para>For immutable (differencing) hard disks only, the
2453 <computeroutput>--autoreset on|off</computeroutput> option
2454 determines whether the disk is automatically reset on every VM
2455 startup (again, see <xref linkend="hdimagewrites" />). The default
2456 is "on".</para>
2457 </listitem>
2458
2459 <listitem>
2460 <para>With the <computeroutput>--compact</computeroutput> option,
2461 can be used to compact disk images, i.e. remove blocks that only
2462 contains zeroes. This will shrink a dynamically allocated image
2463 again; it will reduce the <emphasis>physical</emphasis> size of the
2464 image without affecting the logical size of the virtual disk.
2465 Compaction works both for base images and for diff images created as
2466 part of a snapshot.</para>
2467
2468 <para>For this operation to be effective, it is required that free
2469 space in the guest system first be zeroed out using a suitable
2470 software tool. For Windows guests, you can use the
2471 <computeroutput>sdelete</computeroutput> tool provided by Microsoft.
2472 Execute <computeroutput>sdelete -z</computeroutput> in the guest to
2473 zero the free disk space before compressing the virtual disk
2474 image. For Linux, use the <code>zerofree</code> utility which
2475 supports ext2/ext3 filesystems. For Mac OS X guests, use the
2476 <emphasis>Erase Free Space</emphasis> feature of the built-in
2477 <emphasis>Disk Utility</emphasis>. Use
2478 <emphasis>Zero Out Data</emphasis> there.</para>
2479
2480 <para>Please note that compacting is currently only available for
2481 VDI images. A similar effect can be achieved by zeroing out free
2482 blocks and then cloning the disk to any other dynamically allocated
2483 format. You can use this workaround until compacting is also
2484 supported for disk formats other than VDI.</para>
2485 </listitem>
2486
2487 <listitem>
2488 <para>The <computeroutput>--resize x</computeroutput> option (where x
2489 is the desired new total space in <emphasis role="bold">megabytes</emphasis>)
2490 allows you to change the capacity of an existing image; this adjusts the
2491 <emphasis>logical</emphasis> size of a virtual disk without affecting
2492 the physical size much.<footnote>
2493 <para>Image resizing was added with VirtualBox 4.0.</para>
2494 </footnote> This currently works only for VDI and VHD formats, and only
2495 for the dynamically allocated variants, and can only be used to expand
2496 (not shrink) the capacity.
2497 For example, if you originally created a 10G disk which is now full,
2498 you can use the <computeroutput>--resize 15360</computeroutput>
2499 command to change the capacity to 15G (15,360MB) without having to create a new
2500 image and copy all data from within a virtual machine. Note however that
2501 this only changes the drive capacity; you will typically next need to use
2502 a partition management tool inside the guest to adjust the main partition
2503 to fill the drive.</para><para>The <computeroutput>--resizebyte x</computeroutput>
2504 option does almost the same thing, except that x is expressed in bytes
2505 instead of megabytes.</para>
2506 </listitem>
2507 </itemizedlist></para>
2508 </sect1>
2509
2510 <sect1 id="vboxmanage-clonevdi">
2511 <title>VBoxManage clonehd</title>
2512
2513 <para>This command duplicates a registered virtual hard disk image to a
2514 new image file with a new unique identifier (UUID). The new image can be
2515 transferred to another host system or imported into VirtualBox again using
2516 the Virtual Media Manager; see <xref linkend="vdis" /> and <xref
2517 linkend="cloningvdis" />. The syntax is as follows:</para>
2518
2519 <screen>VBoxManage clonehd &lt;uuid|inutfile&gt; &lt;uuid|outputfile&gt;
2520 [--format VDI|VMDK|VHD|RAW|&lt;other&gt;]
2521 [--variant Standard,Fixed,Split2G,Stream,ESX]
2522 [--existing]</screen>
2523
2524 <para>The disk image to clone as well as the target image must be described
2525 either by its UUIDs (if the mediums are registered) or by its filename.
2526 Registered images can be listed by <computeroutput>VBoxManage list hdds</computeroutput>
2527 (see <xref linkend="vboxmanage-list" /> for more information).
2528 A filename must be specified as valid path, either as an absolute path or
2529 as a relative path starting from the current directory.</para>
2530 <para>The following options are available:<glosslist>
2531 <glossentry>
2532 <glossterm><computeroutput>--format</computeroutput></glossterm>
2533
2534 <glossdef>
2535 <para>Allow to choose a file format for the output file different
2536 from the file format of the input file.</para>
2537 </glossdef>
2538 </glossentry>
2539
2540 <glossentry>
2541 <glossterm><computeroutput>--variant</computeroutput></glossterm>
2542
2543 <glossdef>
2544 <para>Allow to choose a file format variant for the output file.
2545 It is a comma-separated list of variant flags. Not all
2546 combinations are supported, and specifying inconsistent flags will
2547 result in an error message.</para>
2548 </glossdef>
2549 </glossentry>
2550
2551 <glossentry>
2552 <glossterm><computeroutput>--existing</computeroutput></glossterm>
2553
2554 <glossdef>
2555 <para>Perform the clone operation to an already existing
2556 destination medium. Only the portion of the source medium which
2557 fits into the destination medium is copied. This means if the
2558 destination medium is smaller than the source only a part of it is
2559 copied, and if the destination medium is larger than the source
2560 the remaining part of the destination medium is unchanged.</para>
2561 </glossdef>
2562 </glossentry>
2563 </glosslist> <note>
2564 <para>For compatibility with earlier versions of VirtualBox, the
2565 "clonevdi" command is also supported and mapped internally to the
2566 "clonehd" command.</para>
2567 </note></para>
2568 </sect1>
2569
2570 <sect1>
2571 <title>VBoxManage convertfromraw</title>
2572
2573 <para>This command converts a raw disk image to a VirtualBox Disk Image
2574 (VDI) file. The syntax is as follows:</para>
2575
2576 <screen>VBoxManage convertfromraw &lt;filename&gt; &lt;outputfile&gt;
2577 [--format VDI|VMDK|VHD]
2578 [--variant Standard,Fixed,Split2G,Stream,ESX]
2579 [--uuid &lt;uuid&gt;]
2580VBoxManage convertfromraw stdin &lt;outputfile&gt; &lt;bytes&gt;
2581 [--format VDI|VMDK|VHD]
2582 [--variant Standard,Fixed,Split2G,Stream,ESX]
2583 [--uuid &lt;uuid&gt;]</screen>
2584
2585 <para>where the parameters mean:<glosslist>
2586 <glossentry>
2587 <glossterm><computeroutput>--bytes</computeroutput></glossterm>
2588
2589 <glossdef>
2590 <para>The size of the image file, in bytes, provided through
2591 stdin.</para>
2592 </glossdef>
2593 </glossentry>
2594
2595 <glossentry>
2596 <glossterm><computeroutput>--format</computeroutput></glossterm>
2597
2598 <glossdef>
2599 <para>Select the disk image format to create. Default is
2600 VDI.</para>
2601 </glossdef>
2602 </glossentry>
2603
2604 <glossentry>
2605 <glossterm><computeroutput>--variant</computeroutput></glossterm>
2606
2607 <glossdef>
2608 <para>Allow to choose a file format variant for the output file.
2609 It is a comma-separated list of variant flags. Not all
2610 combinations are supported, and specifying inconsistent flags will
2611 result in an error message.</para>
2612 </glossdef>
2613 </glossentry>
2614
2615 <glossentry>
2616 <glossterm><computeroutput>--uuid</computeroutput></glossterm>
2617
2618 <glossdef>
2619 <para>Allow to specifiy the UUID of the output file.</para>
2620 </glossdef>
2621 </glossentry>
2622 </glosslist> The second form forces VBoxManage to read the content for
2623 the disk image from standard input (useful for using that command in a
2624 pipe).</para>
2625
2626 <para><note>
2627 <para>For compatibility with earlier versions of VirtualBox, the
2628 "convertdd" command is also supported and mapped internally to the
2629 "convertfromraw" command.</para>
2630 </note></para>
2631 </sect1>
2632
2633 <sect1>
2634 <title>VBoxManage getextradata/setextradata</title>
2635
2636 <para>These commands let you attach and retrieve string data to a virtual
2637 machine or to a VirtualBox configuration (by specifying
2638 <computeroutput>global</computeroutput> instead of a virtual machine
2639 name). You must specify a key (as a text string) to associate the data
2640 with, which you can later use to retrieve it. For example:</para>
2641
2642 <screen>VBoxManage setextradata Fedora5 installdate 2006.01.01
2643VBoxManage setextradata SUSE10 installdate 2006.02.02</screen>
2644
2645 <para>would associate the string "2006.01.01" with the key installdate for
2646 the virtual machine Fedora5, and "2006.02.02" on the machine SUSE10. You
2647 could retrieve the information as follows:</para>
2648
2649 <screen>VBoxManage getextradata Fedora5 installdate</screen>
2650
2651 <para>which would return</para>
2652
2653 <screen>VirtualBox Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
2654(C) 2005-$VBOX_C_YEAR $VBOX_VENDOR
2655All rights reserved.
2656
2657Value: 2006.01.01</screen>
2658 <para>To remove a key, the <computeroutput>setextradata</computeroutput>
2659 command must be run without specifying data (only the key), for example:
2660 </para>
2661
2662 <screen>VBoxManage setextradata Fedora5 installdate</screen>
2663
2664 </sect1>
2665
2666 <sect1 id="vboxmanage-setproperty">
2667 <title>VBoxManage setproperty</title>
2668
2669 <para>This command is used to change global settings which affect the
2670 entire VirtualBox installation. Some of these correspond to the settings
2671 in the "Global settings" dialog in the graphical user interface. The
2672 following properties are available:<glosslist>
2673 <glossentry>
2674 <glossterm><computeroutput>machinefolder</computeroutput></glossterm>
2675
2676 <glossdef>
2677 <para>This specifies the default folder in which virtual machine
2678 definitions are kept; see <xref linkend="vboxconfigdata" /> for
2679 details.</para>
2680 </glossdef>
2681 </glossentry>
2682
2683 <glossentry>
2684 <glossterm><computeroutput>hwvirtexclusive</computeroutput></glossterm>
2685 <para>This specifies whether VirtualBox will make exclusive use of
2686 the hardware virtualization extensions (Intel VT-x or AMD-V) of the
2687 host system's processor; see <xref linkend="hwvirt" />. If you wish to
2688 share these extensions with other hypervisors running at the same time,
2689 you must disable this setting. Doing so has negative performance implications.
2690 </para>
2691 </glossentry>
2692
2693
2694 <glossentry>
2695 <glossterm><computeroutput>vrdeauthlibrary</computeroutput></glossterm>
2696
2697 <glossdef>
2698 <para>This specifies which library to use when "external"
2699 authentication has been selected for a particular virtual machine;
2700 see <xref linkend="vbox-auth" /> for details.</para>
2701 </glossdef>
2702 </glossentry>
2703
2704 <glossentry>
2705 <glossterm><computeroutput>websrvauthlibrary</computeroutput></glossterm>
2706
2707 <glossdef>
2708 <para>This specifies which library the web service uses to
2709 authenticate users. For details about the VirtualBox web service,
2710 please refer to the separate VirtualBox SDK reference (see <xref
2711 linkend="VirtualBoxAPI" />).</para>
2712 </glossdef>
2713 </glossentry>
2714
2715 <glossentry>
2716 <glossterm><computeroutput>vrdeextpack</computeroutput></glossterm>
2717
2718 <glossdef>
2719 <para>This specifies which library implements the VirtualBox
2720 Remote Desktop Extension.</para>
2721 </glossdef>
2722 </glossentry>
2723
2724 <glossentry>
2725 <glossterm><computeroutput>loghistorycount</computeroutput></glossterm>
2726
2727 <glossdef>
2728 <para>This selects how many rotated (old) VM logs are kept.</para>
2729 </glossdef>
2730 </glossentry>
2731
2732 <glossentry>
2733 <glossterm><computeroutput>autostartdbpath</computeroutput></glossterm>
2734
2735 <glossdef>
2736 <para>This selects the path to the autostart database. See
2737 <xref linkend="autostart" />.</para>
2738 </glossdef>
2739 </glossentry>
2740
2741 <glossentry>
2742 <glossterm><computeroutput>defaultfrontend</computeroutput></glossterm>
2743
2744 <glossdef>
2745 <para>This selects the global default VM frontend setting. See
2746 <xref linkend="vboxmanage-startvm" />.</para>
2747 </glossdef>
2748 </glossentry>
2749 </glosslist></para>
2750 </sect1>
2751
2752 <sect1>
2753 <title>VBoxManage usbfilter add/modify/remove</title>
2754
2755 <para>The <computeroutput>usbfilter</computeroutput> commands are used for
2756 working with USB filters in virtual machines, or global filters which
2757 affect the whole VirtualBox setup. Global filters are applied before
2758 machine-specific filters, and may be used to prevent devices from being
2759 captured by any virtual machine. Global filters are always applied in a
2760 particular order, and only the first filter which fits a device is
2761 applied. So for example, if the first global filter says to hold (make
2762 available) a particular Kingston memory stick device and the second to
2763 ignore all Kingston devices, that memory stick will be available to any
2764 machine with an appropriate filter, but no other Kingston device
2765 will.</para>
2766
2767 <para>When creating a USB filter using <computeroutput>usbfilter
2768 add</computeroutput>, you must supply three or four mandatory parameters.
2769 The index specifies the position in the list at which the filter should be
2770 placed. If there is already a filter at that position, then it and the
2771 following ones will be shifted back one place. Otherwise the new filter
2772 will be added onto the end of the list. The
2773 <computeroutput>target</computeroutput> parameter selects the virtual
2774 machine that the filter should be attached to or use "global" to apply it
2775 to all virtual machines. <computeroutput>name</computeroutput> is a name
2776 for the new filter and for global filters,
2777 <computeroutput>action</computeroutput> says whether to allow machines
2778 access to devices that fit the filter description ("hold") or not to give
2779 them access ("ignore"). In addition, you should specify parameters to
2780 filter by. You can find the parameters for devices attached to your system
2781 using <computeroutput>VBoxManage list usbhost</computeroutput>. Finally,
2782 you can specify whether the filter should be active, and for local
2783 filters, whether they are for local devices, remote (over an RDP
2784 connection) or either.</para>
2785
2786 <para>When you modify a USB filter using <computeroutput>usbfilter
2787 modify</computeroutput>, you must specify the filter by index (see the
2788 output of <computeroutput>VBoxManage list usbfilters</computeroutput> to
2789 find global filter indexes and that of <computeroutput>VBoxManage
2790 showvminfo</computeroutput> to find indexes for individual machines) and
2791 by target, which is either a virtual machine or "global". The properties
2792 which can be changed are the same as for <computeroutput>usbfilter
2793 add</computeroutput>. To remove a filter, use <computeroutput>usbfilter
2794 remove</computeroutput> and specify the index and the target.</para>
2795 </sect1>
2796
2797 <sect1 id="vboxmanage-sharedfolder">
2798 <title>VBoxManage sharedfolder add/remove</title>
2799
2800 <para>This command allows you to share folders on the host computer with
2801 guest operating systems. For this, the guest systems must have a version
2802 of the VirtualBox Guest Additions installed which supports this
2803 functionality.</para>
2804
2805 <para>Shared folders are described in detail in <xref
2806 linkend="sharedfolders" />.</para>
2807 </sect1>
2808
2809 <sect1 id="vboxmanage-guestproperty">
2810 <title>VBoxManage guestproperty</title>
2811
2812 <para>The "guestproperty" commands allow you to get or set properties of a
2813 running virtual machine. Please see <xref linkend="guestadd-guestprops" />
2814 for an introduction. As explained there, guest properties are arbitrary
2815 key/value string pairs which can be written to and read from by either the
2816 guest or the host, so they can be used as a low-volume communication
2817 channel for strings, provided that a guest is running and has the Guest
2818 Additions installed. In addition, a number of values whose keys begin with
2819 "/VirtualBox/" are automatically set and maintained by the Guest
2820 Additions.</para>
2821
2822 <para>The following subcommands are available (where
2823 <computeroutput>&lt;vm&gt;</computeroutput>, in each case, can either be a
2824 VM name or a VM UUID, as with the other VBoxManage commands):<itemizedlist>
2825 <listitem>
2826 <para><computeroutput>enumerate &lt;vm&gt; [--patterns
2827 &lt;pattern&gt;]</computeroutput>: This lists all the guest
2828 properties that are available for the given VM, including the value.
2829 This list will be very limited if the guest's service process cannot
2830 be contacted, e.g. because the VM is not running or the Guest
2831 Additions are not installed.</para>
2832
2833 <para>If <computeroutput>--patterns &lt;pattern&gt;</computeroutput>
2834 is specified, it acts as a filter to only list properties that match
2835 the given pattern. The pattern can contain the following wildcard
2836 characters:<itemizedlist>
2837 <listitem>
2838 <para><computeroutput>*</computeroutput> (asterisk):
2839 represents any number of characters; for example,
2840 "<computeroutput>/VirtualBox*</computeroutput>" would match
2841 all properties beginning with "/VirtualBox".</para>
2842 </listitem>
2843
2844 <listitem>
2845 <para><computeroutput>?</computeroutput> (question mark):
2846 represents a single arbitrary character; for example,
2847 "<computeroutput>fo?</computeroutput>" would match both "foo"
2848 and "for".</para>
2849 </listitem>
2850
2851 <listitem>
2852 <para><computeroutput>|</computeroutput> (pipe symbol): can be
2853 used to specify multiple alternative patterns; for example,
2854 "<computeroutput>s*|t*</computeroutput>" would match anything
2855 starting with either "s" or "t".</para>
2856 </listitem>
2857 </itemizedlist></para>
2858 </listitem>
2859
2860 <listitem>
2861 <para><computeroutput>get &lt;vm&gt; &lt;property&gt;
2862 </computeroutput>: This
2863 retrieves the value of a single property only. If the property
2864 cannot be found (e.g. because the guest is not running), this will
2865 print <screen>No value set!</screen></para>
2866 </listitem>
2867
2868 <listitem>
2869 <para><computeroutput>set &lt;vm&gt; &lt;property&gt; [&lt;value&gt;
2870 [--flags &lt;flags&gt;]]</computeroutput>: This allows you to set a
2871 guest property by specifying the key and value. If
2872 <computeroutput>&lt;value&gt;</computeroutput> is omitted, the
2873 property is deleted. With <computeroutput>--flags</computeroutput>
2874 you can optionally specify additional behavior (you can combine
2875 several by separating them with commas):<itemizedlist>
2876 <listitem>
2877 <para><computeroutput>TRANSIENT</computeroutput>: the value
2878 will not be stored with the VM data when the VM exits;</para>
2879 </listitem>
2880
2881 <listitem>
2882 <para><computeroutput>TRANSRESET</computeroutput>: the value
2883 will be deleted as soon as the VM restarts and/or exits;</para>
2884 </listitem>
2885
2886 <listitem>
2887 <para><computeroutput>RDONLYGUEST</computeroutput>: the value
2888 can only be changed by the host, but the guest can only read
2889 it;</para>
2890 </listitem>
2891
2892 <listitem>
2893 <para><computeroutput>RDONLYHOST</computeroutput>: reversely,
2894 the value can only be changed by the guest, but the host can
2895 only read it;</para>
2896 </listitem>
2897
2898 <listitem>
2899 <para><computeroutput>READONLY</computeroutput>: a combination
2900 of the two, the value cannot be changed at all.</para>
2901 </listitem>
2902 </itemizedlist></para>
2903 </listitem>
2904
2905 <listitem>
2906 <para><computeroutput>wait &lt;vm&gt; &lt;pattern&gt; --timeout
2907 &lt;timeout&gt;</computeroutput>: This waits for a particular value
2908 described by "pattern" to change or to be deleted or created. The
2909 pattern rules are the same as for the "enumerate" subcommand
2910 above.</para>
2911 </listitem>
2912
2913 <listitem>
2914 <para><computeroutput>delete &lt;vm&gt; &lt;property&gt;
2915 </computeroutput>: Deletes a formerly set guest property.
2916 </para></listitem>
2917 </itemizedlist></para>
2918 </sect1>
2919
2920 <sect1 id="vboxmanage-guestcontrol">
2921 <title>VBoxManage guestcontrol</title>
2922
2923 <para>The <computeroutput>guestcontrol</computeroutput> commands allow you
2924 to control certain things inside a guest from the host. Please see <xref
2925 linkend="guestadd-guestcontrol" /> for an introduction.</para>
2926
2927 <para>Generally, the syntax is as follows:</para>
2928
2929 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; &lt;command&gt;</screen>
2930
2931 <para>The following subcommands are available (where
2932 <computeroutput>&lt;uuid|vmname&gt;</computeroutput>, in each case, can either be a
2933 VM name or a VM UUID, as with the other VBoxManage commands):<itemizedlist>
2934 <listitem>
2935 <para><emphasis role="bold"><computeroutput>execute</computeroutput></emphasis>,
2936 which allows for
2937 executing a program/script (process) which already is installed and
2938 runnable on the guest. This command only works while a VM is up and
2939 running and has the following syntax:</para>
2940
2941 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; exec[ute]
2942 --image &lt;path to program&gt; --username &lt;name&gt;
2943 [--passwordfile &lt;file&gt; | --password &lt;password&gt;]
2944 [--environment "&lt;NAME&gt;=&lt;VALUE&gt; [&lt;NAME&gt;=&lt;VALUE&gt;]"]
2945 [--verbose] [--timeout &lt;msec&gt;]
2946 [--wait-exit] [--wait-stdout] [--wait-stderr]
2947 [--dos2unix] [--unix2dos]
2948 -- [[&lt;argument1&gt;] ... [&lt;argumentN&gt;]]</screen>
2949
2950 <para>where the parameters mean: <glosslist>
2951 <glossentry>
2952 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
2953
2954 <glossdef>
2955 <para>The VM UUID or VM name. Mandatory.</para>
2956 </glossdef>
2957 </glossentry>
2958
2959 <glossentry>
2960 <glossterm><computeroutput>--image "&lt;path to program&gt;"</computeroutput></glossterm>
2961
2962 <glossdef>
2963 <para>Absolute path and process name of process to execute
2964 in the guest, e.g.
2965 <computeroutput>C:\Windows\System32\calc.exe</computeroutput></para>
2966 </glossdef>
2967 </glossentry>
2968
2969 <glossentry>
2970 <glossterm><computeroutput>--username &lt;name&gt;</computeroutput></glossterm>
2971
2972 <glossdef>
2973 <para>Name of the user the process should run under. This
2974 user must exist on the guest OS.</para>
2975 </glossdef>
2976 </glossentry>
2977
2978 <glossentry>
2979 <glossterm><computeroutput>--passwordfile &lt;file&gt;</computeroutput></glossterm>
2980
2981 <glossdef>
2982 <para>Password of the user account specified to be read from
2983 the given file. If not given, an empty password is
2984 assumed.</para>
2985 </glossdef>
2986 </glossentry>
2987
2988 <glossentry>
2989 <glossterm><computeroutput>--password &lt;password&gt;</computeroutput></glossterm>
2990
2991 <glossdef>
2992 <para>Password of the user account specified with
2993 <computeroutput>--username</computeroutput>. If not given,
2994 an empty password is assumed.</para>
2995 </glossdef>
2996 </glossentry>
2997
2998 <glossentry>
2999 <glossterm><computeroutput>--dos2unix</computeroutput></glossterm>
3000
3001 <glossdef>
3002 Converts output from DOS/Windows guests to UNIX-compatible
3003 line endings (CR + LF -> LF). Not implemented yet.
3004 </glossdef>
3005 </glossentry>
3006
3007 <glossentry>
3008 <glossterm><computeroutput>--environment
3009 "&lt;NAME&gt;=&lt;VALUE&gt;"</computeroutput></glossterm>
3010
3011 <glossdef>
3012 <para>One or more environment variables to be set or
3013 unset.</para>
3014
3015 <para>By default, the new process in the guest will be
3016 created with the standard environment of the guest OS. This
3017 option allows for modifying that environment. To set/modify
3018 a variable, a pair of
3019 <computeroutput>NAME=VALUE</computeroutput> must be
3020 specified; to unset a certain variable, the name with no
3021 value must set, e.g.
3022 <computeroutput>NAME=</computeroutput>.</para>
3023
3024 <para>Arguments containing spaces must be enclosed in
3025 quotation marks. More than one
3026 <computeroutput>--environment</computeroutput> at a time can
3027 be specified to keep the command line tidy.</para>
3028 </glossdef>
3029 </glossentry>
3030
3031 <glossentry>
3032 <glossterm><computeroutput>--timeout &lt;msec&gt;</computeroutput></glossterm>
3033
3034 <glossdef>
3035 <para>Value (in milliseconds) that specifies the time how
3036 long the started process is allowed to run and how long
3037 VBoxManage waits for getting output from that process. If no
3038 timeout is specified, VBoxManage will wait forever until the
3039 started process ends or an error occured.</para>
3040 </glossdef>
3041 </glossentry>
3042
3043 <glossentry>
3044 <glossterm><computeroutput>--unix2dos</computeroutput></glossterm>
3045
3046 <glossdef>
3047 Converts output from a UNIX/Linux guests to DOS-/Windows-compatible
3048 line endings (LF -> CR + LF). Not implemented yet.
3049 </glossdef>
3050 </glossentry>
3051
3052 <glossentry>
3053 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3054
3055 <glossdef>
3056 <para>Tells VBoxManage to be more verbose.</para>
3057 </glossdef>
3058 </glossentry>
3059
3060 <glossentry>
3061 <glossterm><computeroutput>--wait-exit</computeroutput></glossterm>
3062
3063 <glossdef>
3064 <para>Waits until the process ends and outputs its
3065 exit code along with the exit reason/flags.</para>
3066 </glossdef>
3067 </glossentry>
3068
3069 <glossentry>
3070 <glossterm><computeroutput>--wait-stdout</computeroutput></glossterm>
3071
3072 <glossdef>
3073 <para>Waits until the process ends and outputs its
3074 exit code along with the exit reason/flags. While waiting
3075 VBoxManage retrieves the process output collected from stdout.</para>
3076 </glossdef>
3077 </glossentry>
3078
3079 <glossentry>
3080 <glossterm><computeroutput>--wait-stderr</computeroutput></glossterm>
3081
3082 <glossdef>
3083 <para>Waits until the process ends and outputs its
3084 exit code along with the exit reason/flags. While waiting
3085 VBoxManage retrieves the process output collected from stderr.</para>
3086 </glossdef>
3087 </glossentry>
3088
3089 <glossentry>
3090 <glossterm><computeroutput>[-- [&lt;argument1s&gt;] ... [&lt;argumentNs&gt;]]</computeroutput></glossterm>
3091
3092 <glossdef>
3093 <para>One or more arguments to pass to the process being
3094 executed.</para>
3095 <para>Arguments containing spaces must be enclosed in
3096 quotation marks.</para>
3097 </glossdef>
3098 </glossentry>
3099
3100 </glosslist></para>
3101
3102 <para><note>
3103 <para>On Windows there are certain limitations for graphical
3104 applications; please see <xref linkend="KnownIssues" /> for more
3105 information.</para>
3106 </note> Examples: <screen>VBoxManage --nologo guestcontrol "My VM" execute --image "/bin/ls"
3107 --username foo --passwordfile bar.txt --wait-exit --wait-stdout -- -l /usr</screen> <screen>VBoxManage --nologo guestcontrol "My VM" execute --image "c:\\windows\\system32\\ipconfig.exe"
3108 --username foo --passwordfile bar.txt --wait-exit --wait-stdout</screen> Note that
3109 the double backslashes in the second example are only required on
3110 Unix hosts.</para>
3111
3112 <para><note>
3113 <para>For certain commands a user name of an existing user account on the guest
3114 must be specified; anonymous executions are not supported for security reasons. A
3115 user account password, however, is optional and depends on the guest's OS security
3116 policy or rules. If no password is specified for a given user name, an empty password
3117 will be used. On certain OSes like Windows the security policy may needs to be adjusted
3118 in order to allow user accounts with an empty password set. Also, global domain rules might
3119 apply and therefore cannot be changed.</para>
3120 </note></para>
3121
3122 <para>Starting at VirtualBox 4.1.2 guest process execution by default is limited
3123 to serve up to 5 guest processes at a time. If a new guest process gets started
3124 which would exceed this limit, the oldest not running guest process will be discarded
3125 in order to be able to run that new process. Also, retrieving output from this
3126 old guest process will not be possible anymore then. If all 5 guest processes
3127 are still active and running, starting a new guest process will result in an
3128 appropriate error message.</para>
3129
3130 <para>To raise or lower the guest process execution limit, either the guest
3131 property <computeroutput>/VirtualBox/GuestAdd/VBoxService/--control-procs-max-kept</computeroutput>
3132 or VBoxService' command line by specifying <computeroutput>--control-procs-max-kept</computeroutput>
3133 needs to be modified. A restart of the guest OS is required afterwards. To serve unlimited
3134 guest processes, a value of <computeroutput>0</computeroutput> needs to be set (not recommended).</para>
3135 </listitem>
3136
3137 <listitem>
3138 <para><emphasis role="bold"><computeroutput>copyto</computeroutput></emphasis>,
3139 which allows copying
3140 files from the host to the guest (only with installed Guest
3141 Additions 4.0 and later).</para>
3142
3143 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; copyto|cp
3144 &lt;guest source&gt; &lt;host dest&gt; --username &lt;name&gt;
3145 [--passwordfile &lt;file&gt; | --password &lt;password&gt;]
3146 [--dryrun] [--follow] [--recursive] [--verbose]</screen>
3147
3148 <para>where the parameters mean: <glosslist>
3149 <glossentry>
3150 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3151
3152 <glossdef>
3153 <para>The VM UUID or VM name. Mandatory.</para>
3154 </glossdef>
3155 </glossentry>
3156
3157 <glossentry>
3158 <glossterm><computeroutput>source on host</computeroutput></glossterm>
3159
3160 <glossdef>
3161 <para>Absolute path of source file(s) on host to copy over
3162 to the guest, e.g.
3163 <computeroutput>C:\Windows\System32\calc.exe</computeroutput>.
3164 This also can be a wildcard expression, e.g.
3165 <computeroutput>C:\Windows\System32\*.dll</computeroutput></para>
3166 </glossdef>
3167 </glossentry>
3168
3169 <glossentry>
3170 <glossterm><computeroutput>destination on guest</computeroutput></glossterm>
3171
3172 <glossdef>
3173 <para>Absolute destination path on the guest, e.g.
3174 <computeroutput>C:\Temp</computeroutput></para>
3175 </glossdef>
3176 </glossentry>
3177
3178 <glossentry>
3179 <glossterm><computeroutput>--username &lt;name&gt;</computeroutput></glossterm>
3180
3181 <glossdef>
3182 <para>Name of the user the copy process should run under.
3183 This user must exist on the guest OS.</para>
3184 </glossdef>
3185 </glossentry>
3186
3187 <glossentry>
3188 <glossterm><computeroutput>--passwordfile &lt;file&gt;</computeroutput></glossterm>
3189
3190 <glossdef>
3191 <para>Password of the user account specified to be read from
3192 the given file. If not given, an empty password is
3193 assumed.</para>
3194 </glossdef>
3195 </glossentry>
3196
3197 <glossentry>
3198 <glossterm><computeroutput>--password &lt;password&gt;</computeroutput></glossterm>
3199
3200 <glossdef>
3201 <para>Password of the user account specified with
3202 <computeroutput>--username</computeroutput>. If not given,
3203 an empty password is assumed.</para>
3204 </glossdef>
3205 </glossentry>
3206
3207 <glossentry>
3208 <glossterm><computeroutput>--dryrun</computeroutput></glossterm>
3209
3210 <glossdef>
3211 <para>Tells VBoxManage to only perform a dry run instead of
3212 really copying files to the guest.</para>
3213 </glossdef>
3214 </glossentry>
3215
3216 <glossentry>
3217 <glossterm><computeroutput>--follow</computeroutput></glossterm>
3218
3219 <glossdef>
3220 <para>Enables following symlinks on the host's
3221 source.</para>
3222 </glossdef>
3223 </glossentry>
3224
3225 <glossentry>
3226 <glossterm><computeroutput>--recursive</computeroutput></glossterm>
3227
3228 <glossdef>
3229 <para>Recursively copies files/directories of the specified
3230 source.</para>
3231 </glossdef>
3232 </glossentry>
3233
3234 <glossentry>
3235 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3236
3237 <glossdef>
3238 <para>Tells VBoxManage to be more verbose.</para>
3239 </glossdef>
3240 </glossentry>
3241
3242 <glossentry>
3243 <glossterm><computeroutput>--flags &lt;flags&gt;</computeroutput></glossterm>
3244
3245 <glossdef>
3246 <para>Additional flags to set. This is not used at the
3247 moment.</para>
3248 </glossdef>
3249 </glossentry>
3250 </glosslist></para>
3251 </listitem>
3252
3253 <listitem>
3254 <para><emphasis role="bold"><computeroutput>copyfrom</computeroutput></emphasis>,
3255 which allows copying
3256 files from the guest to the host (only with installed Guest
3257 Additions 4.0 and later). It has the same parameters as
3258 <computeroutput>copyto</computeroutput> above.</para>
3259 </listitem>
3260
3261 <listitem>
3262 <para><emphasis role="bold"><computeroutput>createdirectory</computeroutput></emphasis>,
3263 which allows
3264 copying files from the host to the guest (only with installed Guest
3265 Additions 4.0 and later).</para>
3266
3267 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; createdir[ectory]|mkdir|md
3268 &lt;guest directory&gt;... --username &lt;name&gt;
3269 [--passwordfile &lt;file&gt; | --password &lt;password&gt;]
3270 [--parents] [--mode &lt;mode&gt;] [--verbose]</screen>
3271
3272 <para>where the parameters mean: <glosslist>
3273 <glossentry>
3274 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3275
3276 <glossdef>
3277 <para>The VM UUID or VM name. Mandatory.</para>
3278 </glossdef>
3279 </glossentry>
3280
3281 <glossentry>
3282 <glossterm><computeroutput>directory to create on guest</computeroutput></glossterm>
3283
3284 <glossdef>
3285 <para>Absolute path of directory/directories to create on
3286 guest, e.g. <computeroutput>D:\Foo\Bar</computeroutput>.
3287 Parent directories need to exist (e.g. in this example
3288 <computeroutput>D:\Foo</computeroutput>) when switch
3289 <computeroutput>--parents</computeroutput> is omitted. The
3290 specified user must have appropriate rights to create the
3291 specified directory.</para>
3292 </glossdef>
3293 </glossentry>
3294
3295 <glossentry>
3296 <glossterm><computeroutput>--username &lt;name&gt;</computeroutput></glossterm>
3297
3298 <glossdef>
3299 <para>Name of the user the copy process should run under.
3300 This user must exist on the guest OS.</para>
3301 </glossdef>
3302 </glossentry>
3303
3304 <glossentry>
3305 <glossterm><computeroutput>--passwordfile &lt;file&gt;</computeroutput></glossterm>
3306
3307 <glossdef>
3308 <para>Password of the user account specified to be read from
3309 the given file. If not given, an empty password is
3310 assumed.</para>
3311 </glossdef>
3312 </glossentry>
3313
3314 <glossentry>
3315 <glossterm><computeroutput>--password &lt;password&gt;</computeroutput></glossterm>
3316
3317 <glossdef>
3318 <para>Password of the user account specified with
3319 <computeroutput>--username</computeroutput>. If not given,
3320 an empty password is assumed.</para>
3321 </glossdef>
3322 </glossentry>
3323
3324 <glossentry>
3325 <glossterm><computeroutput>--parents</computeroutput></glossterm>
3326
3327 <glossdef>
3328 <para>Also creates not yet existing parent directories of
3329 the specified directory, e.g. if the directory
3330 <computeroutput>D:\Foo</computeroutput> of
3331 <computeroutput>D:\Foo\Bar</computeroutput> does not exist
3332 yet it will be created. Without specifying
3333 <computeroutput>--parent</computeroutput> the action would
3334 have failed.</para>
3335 </glossdef>
3336 </glossentry>
3337
3338 <glossentry>
3339 <glossterm><computeroutput>--mode &lt;mode&gt;</computeroutput></glossterm>
3340
3341 <glossdef>
3342 <para>Sets the permission mode of the specified directory.
3343 Only octal modes (e.g.
3344 <computeroutput>0755</computeroutput>) are supported right
3345 now.</para>
3346 </glossdef>
3347 </glossentry>
3348
3349 <glossentry>
3350 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3351
3352 <glossdef>
3353 <para>Tells VBoxManage to be more verbose.</para>
3354 </glossdef>
3355 </glossentry>
3356 </glosslist></para>
3357 </listitem>
3358
3359 <listitem>
3360 <para><emphasis role="bold"><computeroutput>removedirectory</computeroutput></emphasis>,
3361 which allows deletion of guest directories (only with installed Guest
3362 Additions 4.3.2 and later).</para>
3363
3364 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; removedir[ectory]|rmdir
3365 &lt;guest directory&gt;... --username &lt;name&gt;
3366 [--passwordfile &lt;file&gt; | --password &lt;password&gt;]
3367 [--recursive|-R|-r] [--verbose]</screen>
3368
3369 <para>where the parameters mean: <glosslist>
3370 <glossentry>
3371 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3372
3373 <glossdef>
3374 <para>The VM UUID or VM name. Mandatory.</para>
3375 </glossdef>
3376 </glossentry>
3377
3378 <glossentry>
3379 <glossterm><computeroutput>directory to remove on guest</computeroutput></glossterm>
3380
3381 <glossdef>
3382 <para>Absolute path of directory/directories to remove on
3383 guest, e.g. <computeroutput>D:\Foo\Bar</computeroutput>. The
3384 specified user must have appropriate rights to delete the
3385 specified guest directories.</para>
3386 </glossdef>
3387 </glossentry>
3388
3389 <glossentry>
3390 <glossterm><computeroutput>--username &lt;name&gt;</computeroutput></glossterm>
3391
3392 <glossdef>
3393 <para>Name of the user the copy process should run under.
3394 This user must exist on the guest OS.</para>
3395 </glossdef>
3396 </glossentry>
3397
3398 <glossentry>
3399 <glossterm><computeroutput>--passwordfile &lt;file&gt;</computeroutput></glossterm>
3400
3401 <glossdef>
3402 <para>Password of the user account specified to be read from
3403 the given file. If not given, an empty password is
3404 assumed.</para>
3405 </glossdef>
3406 </glossentry>
3407
3408 <glossentry>
3409 <glossterm><computeroutput>--password &lt;password&gt;</computeroutput></glossterm>
3410
3411 <glossdef>
3412 <para>Password of the user account specified with
3413 <computeroutput>--username</computeroutput>. If not given,
3414 an empty password is assumed.</para>
3415 </glossdef>
3416 </glossentry>
3417
3418 <glossentry>
3419 <glossterm><computeroutput>--recursive</computeroutput></glossterm>
3420
3421 <glossdef>
3422 <para>Remove directories and their contents recursively.</para>
3423 </glossdef>
3424 </glossentry>
3425
3426 <glossentry>
3427 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3428
3429 <glossdef>
3430 <para>Tells VBoxManage to be more verbose.</para>
3431 </glossdef>
3432 </glossentry>
3433 </glosslist></para>
3434 </listitem>
3435
3436 <listitem>
3437 <para><emphasis role="bold"><computeroutput>removefile</computeroutput></emphasis>,
3438 which allows deletion of guest files (only with installed Guest
3439 Additions 4.3.2 and later).</para>
3440
3441 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; removefile|rm
3442 &lt;guest file&gt;... --username &lt;name&gt;
3443 [--passwordfile &lt;file&gt; | --password &lt;password&gt;]
3444 [--verbose]</screen>
3445
3446 <para>where the parameters mean: <glosslist>
3447 <glossentry>
3448 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3449
3450 <glossdef>
3451 <para>The VM UUID or VM name. Mandatory.</para>
3452 </glossdef>
3453 </glossentry>
3454
3455 <glossentry>
3456 <glossterm><computeroutput>file to remove on guest</computeroutput></glossterm>
3457
3458 <glossdef>
3459 <para>Absolute path of a file/files to remove on
3460 guest, e.g. <computeroutput>D:\Foo\Bar\text.txt</computeroutput>. The
3461 specified user must have appropriate rights to delete the
3462 specified guest files.</para>
3463 </glossdef>
3464 </glossentry>
3465
3466 <glossentry>
3467 <glossterm><computeroutput>--username &lt;name&gt;</computeroutput></glossterm>
3468
3469 <glossdef>
3470 <para>Name of the user the copy process should run under.
3471 This user must exist on the guest OS.</para>
3472 </glossdef>
3473 </glossentry>
3474
3475 <glossentry>
3476 <glossterm><computeroutput>--passwordfile &lt;file&gt;</computeroutput></glossterm>
3477
3478 <glossdef>
3479 <para>Password of the user account specified to be read from
3480 the given file. If not given, an empty password is
3481 assumed.</para>
3482 </glossdef>
3483 </glossentry>
3484
3485 <glossentry>
3486 <glossterm><computeroutput>--password &lt;password&gt;</computeroutput></glossterm>
3487
3488 <glossdef>
3489 <para>Password of the user account specified with
3490 <computeroutput>--username</computeroutput>. If not given,
3491 an empty password is assumed.</para>
3492 </glossdef>
3493 </glossentry>
3494
3495 <glossentry>
3496 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3497
3498 <glossdef>
3499 <para>Tells VBoxManage to be more verbose.</para>
3500 </glossdef>
3501 </glossentry>
3502 </glosslist></para>
3503 </listitem>
3504
3505 <listitem>
3506 <para><emphasis role="bold"><computeroutput>ren[ame]|mv</computeroutput></emphasis>,
3507 which allows renaming of guest files and/or directories (only with installed Guest
3508 Additions 4.3.2 and later).</para>
3509
3510 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; ren[ame]|mv
3511 &lt;source&gt;... &lt;dest&gt; --username &lt;name&gt;
3512 [--passwordfile &lt;file&gt; | --password &lt;password&gt;]
3513 [--verbose]</screen>
3514
3515 <para>where the parameters mean: <glosslist>
3516 <glossentry>
3517 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3518
3519 <glossdef>
3520 <para>The VM UUID or VM name. Mandatory.</para>
3521 </glossdef>
3522 </glossentry>
3523
3524 <glossentry>
3525 <glossterm><computeroutput>source</computeroutput></glossterm>
3526
3527 <glossdef>
3528 <para>Absolute path of one or more source(s) to move to
3529 destination. If more than one source is specified, destination
3530 must be an existing directory on the guest. The specified user
3531 must have appropriate rights to access source and destination
3532 files and directories.</para>
3533 </glossdef>
3534 </glossentry>
3535
3536 <glossentry>
3537 <glossterm><computeroutput>dest</computeroutput></glossterm>
3538
3539 <glossdef>
3540 <para>Absolute path of the destination to move the source(s)
3541 to. This can be a directory or a file, depending if one or more
3542 sources have been specified. The specified user
3543 must have appropriate rights to access the destination
3544 file and directory.</para>
3545 </glossdef>
3546 </glossentry>
3547
3548 <glossentry>
3549 <glossterm><computeroutput>--username &lt;name&gt;</computeroutput></glossterm>
3550
3551 <glossdef>
3552 <para>Name of the user the copy process should run under.
3553 This user must exist on the guest OS.</para>
3554 </glossdef>
3555 </glossentry>
3556
3557 <glossentry>
3558 <glossterm><computeroutput>--passwordfile &lt;file&gt;</computeroutput></glossterm>
3559
3560 <glossdef>
3561 <para>Password of the user account specified to be read from
3562 the given file. If not given, an empty password is
3563 assumed.</para>
3564 </glossdef>
3565 </glossentry>
3566
3567 <glossentry>
3568 <glossterm><computeroutput>--password &lt;password&gt;</computeroutput></glossterm>
3569
3570 <glossdef>
3571 <para>Password of the user account specified with
3572 <computeroutput>--username</computeroutput>. If not given,
3573 an empty password is assumed.</para>
3574 </glossdef>
3575 </glossentry>
3576
3577 <glossentry>
3578 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3579
3580 <glossdef>
3581 <para>Tells VBoxManage to be more verbose.</para>
3582 </glossdef>
3583 </glossentry>
3584 </glosslist></para>
3585 </listitem>
3586
3587 <listitem>
3588 <para><emphasis role="bold"><computeroutput>createtemporary</computeroutput></emphasis>,
3589 which allows
3590 copying files from the host to the guest (only with installed Guest
3591 Additions 4.2 and later).</para>
3592
3593 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; createtemp[orary]|mktemp
3594 &lt;template&gt; --username &lt;name&gt;
3595 [--passwordfile &lt;file&gt; | --password &lt;password&gt;]
3596 [--directory] [--secure] [--tmpdir &lt;directory&gt;]
3597 [--domain &lt;domain&gt;] [--mode &lt;mode&gt;] [--verbose]</screen>
3598
3599 <para>where the parameters mean: <glosslist>
3600 <glossentry>
3601 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3602
3603 <glossdef>
3604 <para>The VM UUID or VM name. Mandatory.</para>
3605 </glossdef>
3606 </glossentry>
3607
3608 <glossentry>
3609 <glossterm><computeroutput>template</computeroutput></glossterm>
3610
3611 <glossdef>
3612 <para>A file name without a path and with at least three consecutive 'X'
3613 characters or ending in 'X'
3614 </para>
3615 </glossdef>
3616 </glossentry>
3617
3618 <glossentry>
3619 <glossterm><computeroutput>--username &lt;name&gt;</computeroutput></glossterm>
3620
3621 <glossdef>
3622 <para>Name of the user the copy process should run under.
3623 This user must exist on the guest OS.</para>
3624 </glossdef>
3625 </glossentry>
3626
3627 <glossentry>
3628 <glossterm><computeroutput>--passwordfile &lt;file&gt;</computeroutput></glossterm>
3629
3630 <glossdef>
3631 <para>Password of the user account specified to be read from
3632 the given file. If not given, an empty password is
3633 assumed.</para>
3634 </glossdef>
3635 </glossentry>
3636
3637 <glossentry>
3638 <glossterm><computeroutput>--password &lt;password&gt;</computeroutput></glossterm>
3639
3640 <glossdef>
3641 <para>Password of the user account specified with
3642 <computeroutput>--username</computeroutput>. If not given,
3643 an empty password is assumed.</para>
3644 </glossdef>
3645 </glossentry>
3646
3647 <glossentry>
3648 <glossterm><computeroutput>--directory</computeroutput></glossterm>
3649
3650 <glossdef>
3651 <para>Create a temporary directory instead of a file.</para>
3652 </glossdef>
3653 </glossentry>
3654
3655 <glossentry>
3656 <glossterm><computeroutput>--secure</computeroutput></glossterm>
3657
3658 <glossdef>
3659 <para>
3660 Secure creation. The file mode is fixed to
3661 <computeroutput>0755</computeroutput>. And the operation
3662 will fail if it cannot performed securely.
3663 </para>
3664 </glossdef>
3665 </glossentry>
3666
3667 <glossentry>
3668 <glossterm><computeroutput>--tmpdir &lt;directory&gt;</computeroutput></glossterm>
3669
3670 <glossdef>
3671 <para>
3672 Directory where the file / directory is created. If not
3673 specified, the platform-specific temp directory is used.
3674 </para>
3675 </glossdef>
3676 </glossentry>
3677
3678 <glossentry>
3679 <glossterm><computeroutput>--mode &lt;mode&gt;</computeroutput></glossterm>
3680
3681 <glossdef>
3682 <para>Sets the permission mode of the specified directory.
3683 Only octal modes (e.g.
3684 <computeroutput>0755</computeroutput>) are supported right
3685 now.</para>
3686 </glossdef>
3687 </glossentry>
3688
3689 <glossentry>
3690 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3691
3692 <glossdef>
3693 <para>Tells VBoxManage to be more verbose.</para>
3694 </glossdef>
3695 </glossentry>
3696 </glosslist></para>
3697 </listitem>
3698
3699 <listitem>
3700 <para><emphasis role="bold"><computeroutput>list</computeroutput></emphasis>,
3701 which lists various guest control information such as open guest sessions,
3702 guest processes and guest files.</para>
3703
3704 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; list
3705 &lt;all|sessions|processes|files&gt; [--verbose]</screen>
3706
3707 <para>where the parameters mean: <glosslist>
3708 <glossentry>
3709 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3710
3711 <glossdef>
3712 <para>The VM UUID or VM name. Mandatory.</para>
3713 </glossdef>
3714 </glossentry>
3715
3716 <glossentry>
3717 <glossterm><computeroutput>all|sessions|processes|files</computeroutput></glossterm>
3718
3719 <glossdef>
3720 <para>Whether to list guest sessions, guest processes, guest files
3721 or all information available. Mandatory.</para>
3722 </glossdef>
3723 </glossentry>
3724
3725 <glossentry>
3726 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3727
3728 <glossdef>
3729 <para>Tells VBoxManage to be more verbose.</para>
3730 </glossdef>
3731 </glossentry>
3732 </glosslist></para>
3733 </listitem>
3734
3735 <listitem>
3736 <para><emphasis role="bold"><computeroutput>process kill</computeroutput></emphasis>,
3737 which terminates specific guest processes of a guest session, based on either the
3738 session's ID or the session's name.</para>
3739
3740 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; process kill
3741 --session-id &lt;ID&gt;
3742 | --session-name &lt;name or pattern&gt;
3743 [--verbose]
3744 &lt;PID&gt; ... &lt;PID n&gt;</screen>
3745
3746 <para>where the parameters mean: <glosslist>
3747 <glossentry>
3748 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3749
3750 <glossdef>
3751 <para>The VM UUID or VM name. Mandatory.</para>
3752 </glossdef>
3753 </glossentry>
3754
3755 <glossentry>
3756 <glossterm><computeroutput>--session-id</computeroutput></glossterm>
3757
3758 <glossdef>
3759 <para>Specifies the guest session to use by its ID.</para>
3760 </glossdef>
3761 </glossentry>
3762
3763 <glossentry>
3764 <glossterm><computeroutput>--session-name</computeroutput></glossterm>
3765
3766 <glossdef>
3767 <para>Specifies the guest session to use by its name. Multiple
3768 sessions can be closed when specifying * or ? wildcards.</para>
3769 </glossdef>
3770 </glossentry>
3771
3772 <glossentry>
3773 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3774
3775 <glossdef>
3776 <para>Tells VBoxManage to be more verbose.</para>
3777 </glossdef>
3778 </glossentry>
3779
3780 <glossentry>
3781 <glossterm><computeroutput>&lt;PID&gt; ... &lt;PID n&gt;</computeroutput></glossterm>
3782
3783 <glossdef>
3784 <para>List of process identifiers (PIDs) to terminate.</para>
3785 </glossdef>
3786 </glossentry>
3787 </glosslist></para>
3788 </listitem>
3789
3790 <listitem>
3791 <para><emphasis role="bold"><computeroutput>[p[s]]kill</computeroutput></emphasis>,
3792 which terminates specific guest processes of a guest session, based on either the
3793 session's ID or the session's name.</para>
3794
3795 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; process kill
3796 --session-id &lt;ID&gt;
3797 | --session-name &lt;name or pattern&gt;
3798 [--verbose]
3799 &lt;PID&gt; ... &lt;PID n&gt;</screen>
3800
3801 <para>where the parameters mean: <glosslist>
3802 <glossentry>
3803 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3804
3805 <glossdef>
3806 <para>The VM UUID or VM name. Mandatory.</para>
3807 </glossdef>
3808 </glossentry>
3809
3810 <glossentry>
3811 <glossterm><computeroutput>--session-id</computeroutput></glossterm>
3812
3813 <glossdef>
3814 <para>Specifies the guest session to use by its ID.</para>
3815 </glossdef>
3816 </glossentry>
3817
3818 <glossentry>
3819 <glossterm><computeroutput>--session-name</computeroutput></glossterm>
3820
3821 <glossdef>
3822 <para>Specifies the guest session to use by its name. Multiple
3823 sessions can be closed when specifying * or ? wildcards.</para>
3824 </glossdef>
3825 </glossentry>
3826
3827 <glossentry>
3828 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3829
3830 <glossdef>
3831 <para>Tells VBoxManage to be more verbose.</para>
3832 </glossdef>
3833 </glossentry>
3834
3835 <glossentry>
3836 <glossterm><computeroutput>&lt;PID&gt; ... &lt;PID n&gt;</computeroutput></glossterm>
3837
3838 <glossdef>
3839 <para>List of process identifiers (PIDs) to terminate.</para>
3840 </glossdef>
3841 </glossentry>
3842 </glosslist></para>
3843 </listitem>
3844
3845 <listitem>
3846 <para><emphasis role="bold"><computeroutput>session close</computeroutput></emphasis>,
3847 which closes specific guest sessions, based on either the session's ID or the
3848 session's name.</para>
3849
3850 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; session close
3851 --session-id &lt;ID&gt;
3852 | --session-name &lt;name or pattern&gt;
3853 | --all
3854 [--verbose]</screen>
3855
3856 <para>where the parameters mean: <glosslist>
3857 <glossentry>
3858 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3859
3860 <glossdef>
3861 <para>The VM UUID or VM name. Mandatory.</para>
3862 </glossdef>
3863 </glossentry>
3864
3865 <glossentry>
3866 <glossterm><computeroutput>--session-id</computeroutput></glossterm>
3867
3868 <glossdef>
3869 <para>Close a guest session specified by its ID.</para>
3870 </glossdef>
3871 </glossentry>
3872
3873 <glossentry>
3874 <glossterm><computeroutput>--session-name</computeroutput></glossterm>
3875
3876 <glossdef>
3877 <para>Close a guest session specified by its name. Multiple sessions
3878 can be closed when specifying * or ? wildcards.</para>
3879 </glossdef>
3880 </glossentry>
3881
3882 <glossentry>
3883 <glossterm><computeroutput>--all</computeroutput></glossterm>
3884
3885 <glossdef>
3886 <para>Close all guest sessions.</para>
3887 </glossdef>
3888 </glossentry>
3889
3890 <glossentry>
3891 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3892
3893 <glossdef>
3894 <para>Tells VBoxManage to be more verbose.</para>
3895 </glossdef>
3896 </glossentry>
3897 </glosslist></para>
3898 </listitem>
3899
3900 <listitem>
3901 <para><emphasis role="bold"><computeroutput>stat</computeroutput></emphasis>,
3902 which displays file
3903 or file system status on the guest.</para>
3904
3905 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; stat
3906 &lt;file&gt;... --username &lt;name&gt;
3907 [--passwordfile &lt;file&gt; | --password &lt;password&gt;]
3908 [--verbose]</screen>
3909
3910 <para>where the parameters mean: <glosslist>
3911 <glossentry>
3912 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3913
3914 <glossdef>
3915 <para>The VM UUID or VM name. Mandatory.</para>
3916 </glossdef>
3917 </glossentry>
3918
3919 <glossentry>
3920 <glossterm><computeroutput>file element(s) to check on guest</computeroutput></glossterm>
3921
3922 <glossdef>
3923 <para>Absolute path of directory/directories to check on
3924 guest, e.g. <computeroutput>/home/foo/a.out</computeroutput>.
3925 The specified user must have appropriate rights to access
3926 the given file element(s).</para>
3927 </glossdef>
3928 </glossentry>
3929
3930 <glossentry>
3931 <glossterm><computeroutput>--username &lt;name&gt;</computeroutput></glossterm>
3932
3933 <glossdef>
3934 <para>Name of the user the copy process should run under.
3935 This user must exist on the guest OS.</para>
3936 </glossdef>
3937 </glossentry>
3938
3939 <glossentry>
3940 <glossterm><computeroutput>--passwordfile &lt;file&gt;</computeroutput></glossterm>
3941
3942 <glossdef>
3943 <para>Password of the user account specified to be read from
3944 the given file. If not given, an empty password is
3945 assumed.</para>
3946 </glossdef>
3947 </glossentry>
3948
3949 <glossentry>
3950 <glossterm><computeroutput>--password &lt;password&gt;</computeroutput></glossterm>
3951
3952 <glossdef>
3953 <para>Password of the user account specified with
3954 <computeroutput>--username</computeroutput>. If not given,
3955 an empty password is assumed.</para>
3956 </glossdef>
3957 </glossentry>
3958
3959 <glossentry>
3960 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
3961
3962 <glossdef>
3963 <para>Tells VBoxManage to be more verbose.</para>
3964 </glossdef>
3965 </glossentry>
3966 </glosslist></para>
3967 </listitem>
3968
3969 <listitem>
3970 <para><emphasis role="bold"><computeroutput>updateadditions</computeroutput></emphasis>,
3971 which allows
3972 for updating an already installed Guest Additions version on the
3973 guest (only already installed Guest Additions 4.0 and later).</para>
3974
3975 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; updateadditions
3976 [--source "&lt;guest additions .ISO file to use&gt;"] [--verbose]
3977 [--wait-start] [-- [&lt;argument1&gt;] ... [&lt;argumentN&gt;]]</screen>
3978
3979 <para>where the parameters mean: <glosslist>
3980 <glossentry>
3981 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
3982
3983 <glossdef>
3984 <para>The VM UUID or VM name. Mandatory.</para>
3985 </glossdef>
3986 </glossentry>
3987
3988 <glossentry>
3989 <glossterm><computeroutput>--source</computeroutput> "&lt;guest additions .ISO file to
3990 use&gt;"</glossterm>
3991
3992 <glossdef>
3993 <para>Full path to an alternative VirtualBox Guest Additions
3994 .ISO file to use for the Guest Additions update.</para>
3995 </glossdef>
3996 </glossentry>
3997
3998 <glossentry>
3999 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
4000
4001 <glossdef>
4002 <para>Tells VBoxManage to be more verbose.</para>
4003 </glossdef>
4004 </glossentry>
4005
4006 <glossentry>
4007 <glossterm><computeroutput>--wait-start</computeroutput></glossterm>
4008 <glossdef>
4009 <para>Starts the regular updating process and waits until the
4010 actual Guest Additions update inside the guest was started.
4011 This can be necessary due to needed interaction with the
4012 guest OS during the installation phase.</para>
4013 <para>When omitting this flag VBoxManage will wait for the
4014 whole Guest Additions update to complete.</para>
4015 </glossdef>
4016 </glossentry>
4017
4018 <glossentry>
4019 <glossterm><computeroutput>[-- [&lt;argument1s&gt;] ... [&lt;argumentNs&gt;]]</computeroutput></glossterm>
4020
4021 <glossdef>
4022 <para>Optional command line arguments to use for the Guest Additions
4023 installer. Useful for retrofitting features which weren't installed
4024 before on the guest.</para>
4025 <para>Arguments containing spaces must be enclosed in
4026 quotation marks.</para>
4027 </glossdef>
4028 </glossentry>
4029 </glosslist></para>
4030 </listitem>
4031 <listitem>
4032 <para><emphasis role="bold"><computeroutput>watch</computeroutput></emphasis>,
4033 which prints current guest control activity.</para>
4034
4035 <screen>VBoxManage guestcontrol &lt;uuid|vmname&gt; watch
4036 [--verbose]</screen>
4037
4038 <para>where the parameters mean: <glosslist>
4039 <glossentry>
4040 <glossterm><computeroutput>uuid|vmname</computeroutput></glossterm>
4041
4042 <glossdef>
4043 <para>The VM UUID or VM name. Mandatory.</para>
4044 </glossdef>
4045 </glossentry>
4046
4047 <glossentry>
4048 <glossterm><computeroutput>--verbose</computeroutput></glossterm>
4049
4050 <glossdef>
4051 <para>Tells VBoxManage to be more verbose.</para>
4052 </glossdef>
4053 </glossentry>
4054 </glosslist></para>
4055 </listitem>
4056 </itemizedlist></para>
4057 </sect1>
4058
4059 <sect1 id="vboxmanage-debugvm">
4060 <title>VBoxManage debugvm</title>
4061
4062 <para>The "debugvm" commands are for experts who want to tinker with the
4063 exact details of virtual machine execution. Like the VM debugger described
4064 in <xref linkend="ts_debugger" />, these commands are only useful if you are
4065 very familiar with the details of the PC architecture and how to debug
4066 software.</para>
4067
4068 <para>The subcommands of "debugvm" all operate on a running virtual
4069 machine. The following are available:<itemizedlist>
4070 <listitem>
4071 <para>With <computeroutput>dumpguestcore --filename
4072 &lt;name&gt;</computeroutput>, you can create a system dump of the
4073 running VM, which will be written into the given file. This file
4074 will have the standard ELF core format (with custom sections); see
4075 <xref linkend="ts_guest-core-format" />.</para>
4076
4077 <para>This corresponds to the
4078 <computeroutput>writecore</computeroutput> command in the debugger.
4079 </para>
4080 </listitem>
4081
4082 <listitem>
4083 <para>The <computeroutput>info</computeroutput> command is used to
4084 display info items relating to the VMM, device emulations and
4085 associated drivers. This command takes one or two arguments: the
4086 name of the info item, optionally followed by a string containing
4087 arguments specific to the info item.
4088 The <computeroutput>help</computeroutput> info item provides a
4089 listning of the available items and hints about any optional
4090 arguments.</para>
4091
4092 <para>This corresponds to the <computeroutput>info</computeroutput>
4093 command in the debugger.</para>
4094 </listitem>
4095
4096 <listitem>
4097 <para>The <computeroutput>injectnmi</computeroutput> command causes
4098 a non-maskable interrupt (NMI) in the guest, which might be useful
4099 for certain debugging scenarios. What happens exactly is dependent
4100 on the guest operating system, but an NMI can crash the whole guest
4101 operating system. Do not use unless you know what you're
4102 doing.</para>
4103 </listitem>
4104
4105 <listitem>
4106 <para>The <computeroutput>osdetect</computeroutput> command makes the
4107 VMM's debugger facility (re-)detection the guest operation
4108 system.</para>
4109
4110 <para>This corresponds to the <computeroutput>detect</computeroutput>
4111 command in the debugger.</para>
4112 </listitem>
4113
4114 <listitem>
4115 <para>The <computeroutput>osinfo</computeroutput> command is used to
4116 display info about the operating system (OS) detected by the VMM's
4117 debugger facility.</para>
4118 </listitem>
4119
4120 <listitem>
4121 <para>The <computeroutput>getregisters</computeroutput> command is
4122 used to display CPU and device registers. The command takes a list
4123 of registers, each having one of the following forms:
4124 <itemizedlist>
4125 <listitem><computeroutput>register-set.register-name.sub-field</computeroutput></listitem>
4126 <listitem><computeroutput>register-set.register-name</computeroutput></listitem>
4127 <listitem><computeroutput>cpu-register-name.sub-field</computeroutput></listitem>
4128 <listitem><computeroutput>cpu-register-name</computeroutput></listitem>
4129 <listitem><computeroutput>all</computeroutput></listitem>
4130 </itemizedlist>
4131 The <computeroutput>all</computeroutput> form will cause all
4132 registers to be shown (no sub-fields). The registers names are
4133 case-insensitive. When requesting a CPU register the register set
4134 can be omitted, it will be selected using the value of the
4135 <computeroutput>--cpu</computeroutput> option (defaulting to 0).
4136 </para>
4137 </listitem>
4138
4139 <listitem>
4140 <para>The <computeroutput>setregisters</computeroutput> command is
4141 used to change CPU and device registers. The command takes a list
4142 of register assignments, each having one of the following forms:
4143 <itemizedlist>
4144 <listitem><computeroutput>register-set.register-name.sub-field=value</computeroutput></listitem>
4145 <listitem><computeroutput>register-set.register-name=value</computeroutput></listitem>
4146 <listitem><computeroutput>cpu-register-name.sub-field=value</computeroutput></listitem>
4147 <listitem><computeroutput>cpu-register-name=value</computeroutput></listitem>
4148 </itemizedlist>
4149 The value format should be in the same style as what
4150 <computeroutput>getregisters</computeroutput> displays, with the
4151 exception that both octal and decimal can be used instead of
4152 hexadecimal. The register naming and the default CPU register set
4153 are handled the same way as with the
4154 <computeroutput>getregisters</computeroutput> command.</para>
4155 </listitem>
4156
4157 <listitem>
4158 <para>The <computeroutput>statistics</computeroutput> command can be
4159 used to display VMM statistics on the command line. The
4160 <computeroutput>--reset</computeroutput> option will reset
4161 statistics. The affected statistics can be filtered with the
4162 <computeroutput>--pattern</computeroutput> option, which accepts
4163 DOS/NT-style wildcards (<computeroutput>?</computeroutput> and
4164 <computeroutput>*</computeroutput>).</para>
4165 </listitem>
4166 </itemizedlist></para>
4167 </sect1>
4168
4169 <sect1 id="metrics">
4170 <title>VBoxManage metrics</title>
4171
4172 <para>This command supports monitoring the usage of system resources.
4173 Resources are represented by various metrics associated with the host
4174 system or a particular VM. For example, the host system has a
4175 <computeroutput>CPU/Load/User</computeroutput> metric that shows the
4176 percentage of time CPUs spend executing in user mode over a specific
4177 sampling period.</para>
4178
4179 <para>Metric data is collected and retained internally; it may be
4180 retrieved at any time with the <computeroutput>VBoxManage metrics
4181 query</computeroutput> subcommand. The data is available as long as the
4182 background <computeroutput>VBoxSVC</computeroutput> process is alive. That
4183 process terminates shortly after all VMs and frontends have been
4184 closed.</para>
4185
4186 <para>By default no metrics are collected at all. Metrics collection does
4187 not start until <computeroutput>VBoxManage metrics setup</computeroutput>
4188 is invoked with a proper sampling interval and the number of metrics to be
4189 retained. The interval is measured in seconds. For example, to enable
4190 collecting the host processor and memory usage metrics every second and
4191 keeping the 5 most current samples, the following command can be
4192 used:</para>
4193
4194 <screen>VBoxManage metrics setup --period 1 --samples 5 host CPU/Load,RAM/Usage</screen>
4195
4196 <para>Metric collection can only be enabled for started VMs. Collected
4197 data and collection settings for a particular VM will disappear as soon as
4198 it shuts down. Use <computeroutput>VBoxManage metrics list
4199 </computeroutput> subcommand to see which metrics are currently available.
4200 You can also use <computeroutput>--list</computeroutput> option with any
4201 subcommand that modifies metric settings to find out which metrics were
4202 affected.</para>
4203
4204 <para>Note that the <computeroutput>VBoxManage metrics
4205 setup</computeroutput> subcommand discards all samples that may have been
4206 previously collected for the specified set of objects and metrics.</para>
4207
4208 <para>To enable or disable metrics collection without discarding the data
4209 <computeroutput>VBoxManage metrics enable</computeroutput> and
4210 <computeroutput>VBoxManage metrics disable</computeroutput> subcommands
4211 can be used. Note that these subcommands expect metrics, not submetrics,
4212 like <code>CPU/Load</code> or <code>RAM/Usage</code> as parameters. In
4213 other words enabling <code>CPU/Load/User</code> while disabling
4214 <code>CPU/Load/Kernel</code> is not supported.</para>
4215
4216 <para>The host and VMs have different sets of associated metrics.
4217 Available metrics can be listed with <computeroutput>VBoxManage metrics
4218 list</computeroutput> subcommand.</para>
4219
4220 <para>A complete metric name may include an aggregate function. The name
4221 has the following form:
4222 <computeroutput>Category/Metric[/SubMetric][:aggregate]</computeroutput>.
4223 For example, <computeroutput>RAM/Usage/Free:min</computeroutput> stands
4224 for the minimum amount of available memory over all retained data if
4225 applied to the host object.</para>
4226
4227 <para>Subcommands may apply to all objects and metrics or can be limited
4228 to one object or/and a list of metrics. If no objects or metrics are given
4229 in the parameters, the subcommands will apply to all available metrics of
4230 all objects. You may use an asterisk
4231 ("<computeroutput>*</computeroutput>") to explicitly specify that the
4232 command should be applied to all objects or metrics. Use "host" as the
4233 object name to limit the scope of the command to host-related metrics. To
4234 limit the scope to a subset of metrics, use a metric list with names
4235 separated by commas.</para>
4236
4237 <para>For example, to query metric data on the CPU time spent in user and
4238 kernel modes by the virtual machine named "test", you can use the
4239 following command:</para>
4240
4241 <screen>VBoxManage metrics query test CPU/Load/User,CPU/Load/Kernel</screen>
4242
4243 <para>The following list summarizes the available subcommands:</para>
4244
4245 <glosslist>
4246 <glossentry>
4247 <glossterm><computeroutput>list</computeroutput></glossterm>
4248
4249 <glossdef>
4250 <para>This subcommand shows the parameters of the currently existing
4251 metrics. Note that VM-specific metrics are only available when a
4252 particular VM is running.</para>
4253 </glossdef>
4254 </glossentry>
4255
4256 <glossentry>
4257 <glossterm><computeroutput>setup</computeroutput></glossterm>
4258
4259 <glossdef>
4260 <para>This subcommand sets the interval between taking two samples
4261 of metric data and the number of samples retained internally. The
4262 retained data is available for displaying with the
4263 <code>query</code> subcommand. The <computeroutput>--list
4264 </computeroutput> option shows which metrics have been modified as
4265 the result of the command execution.</para>
4266 </glossdef>
4267 </glossentry>
4268
4269 <glossentry>
4270 <glossterm><computeroutput>enable</computeroutput></glossterm>
4271
4272 <glossdef>
4273 <para>This subcommand "resumes" data collection after it has been
4274 stopped with <code>disable</code> subcommand. Note that specifying
4275 submetrics as parameters will not enable underlying metrics. Use
4276 <computeroutput>--list</computeroutput> to find out if the command
4277 did what was expected.</para>
4278 </glossdef>
4279 </glossentry>
4280
4281 <glossentry>
4282 <glossterm><computeroutput>disable</computeroutput></glossterm>
4283
4284 <glossdef>
4285 <para>This subcommand "suspends" data collection without affecting
4286 collection parameters or collected data. Note that specifying
4287 submetrics as parameters will not disable underlying metrics. Use
4288 <computeroutput>--list</computeroutput> to find out if the command
4289 did what was expected.</para>
4290 </glossdef>
4291 </glossentry>
4292
4293 <glossentry>
4294 <glossterm><computeroutput>query</computeroutput></glossterm>
4295
4296 <glossdef>
4297 <para>This subcommand retrieves and displays the currently retained
4298 metric data.<note>
4299 <para>The <code>query</code> subcommand does not remove or
4300 "flush" retained data. If you query often enough you will see
4301 how old samples are gradually being "phased out" by new
4302 samples.</para>
4303 </note></para>
4304 </glossdef>
4305 </glossentry>
4306
4307 <glossentry>
4308 <glossterm><computeroutput>collect</computeroutput></glossterm>
4309
4310 <glossdef>
4311 <para>This subcommand sets the interval between taking two samples
4312 of metric data and the number of samples retained internally. The
4313 collected data is displayed periodically until Ctrl-C is pressed
4314 unless the <computeroutput>--detach</computeroutput> option is
4315 specified. With the <computeroutput>--detach</computeroutput>
4316 option, this subcommand operates the same way as <code>setup</code>
4317 does. The <computeroutput>--list</computeroutput> option shows which
4318 metrics match the specified filter.</para>
4319 </glossdef>
4320 </glossentry>
4321 </glosslist>
4322 </sect1>
4323
4324 <sect1>
4325 <title>VBoxManage hostonlyif</title>
4326
4327 <para>With "hostonlyif" you can change the IP configuration of a host-only
4328 network interface. For a description of host-only networking, please
4329 refer to <xref linkend="network_hostonly" />. Each host-only interface is
4330 identified by a name and can either use the internal DHCP server or a
4331 manual IP configuration (both IP4 and IP6).</para>
4332 </sect1>
4333
4334 <sect1 id="vboxmanage-dhcpserver">
4335 <title>VBoxManage dhcpserver</title>
4336
4337 <para>The "dhcpserver" commands allow you to control the DHCP server that
4338 is built into VirtualBox. You may find this useful when using internal or
4339 host-only networking. (Theoretically, you can enable it for a bridged
4340 network as well, but that will likely cause conflicts with other DHCP
4341 servers in your physical network.)</para>
4342
4343 <para>Use the following command line options:<itemizedlist>
4344 <listitem>
4345 <para>If you use internal networking for a virtual network adapter
4346 of a virtual machine, use <computeroutput>VBoxManage dhcpserver add
4347 --netname &lt;network_name&gt;</computeroutput>, where
4348 <computeroutput>&lt;network_name&gt;</computeroutput> is the same
4349 network name you used with <computeroutput>VBoxManage modifyvm
4350 &lt;vmname&gt; --intnet&lt;X&gt;
4351 &lt;network_name&gt;</computeroutput>.</para>
4352 </listitem>
4353
4354 <listitem>
4355 <para>If you use host-only networking for a virtual network adapter
4356 of a virtual machine, use <computeroutput>VBoxManage dhcpserver add
4357 --ifname &lt;hostonly_if_name&gt;</computeroutput> instead, where
4358 <computeroutput>&lt;hostonly_if_name&gt;</computeroutput> is the
4359 same host-only interface name you used with
4360 <computeroutput>VBoxManage modifyvm &lt;vmname&gt;
4361 --hostonlyadapter&lt;X&gt;
4362 &lt;hostonly_if_name&gt;</computeroutput>.</para>
4363
4364 <para>Alternatively, you can also use the --netname option as with
4365 internal networks if you know the host-only network's name; you can
4366 see the names with <computeroutput>VBoxManage list
4367 hostonlyifs</computeroutput> (see <xref linkend="vboxmanage-list" />
4368 above).</para>
4369 </listitem>
4370 </itemizedlist></para>
4371
4372 <para>The following additional parameters are required when first adding a
4373 DHCP server:<itemizedlist>
4374 <listitem>
4375 <para>With <computeroutput>--ip</computeroutput>, specify the IP
4376 address of the DHCP server itself.</para>
4377 </listitem>
4378
4379 <listitem>
4380 <para>With <computeroutput>--netmask</computeroutput>, specify the
4381 netmask of the network.</para>
4382 </listitem>
4383
4384 <listitem>
4385 <para>With <computeroutput>--lowerip</computeroutput> and
4386 <computeroutput>--upperip</computeroutput>, you can specify the
4387 lowest and highest IP address, respectively, that the DHCP server
4388 will hand out to clients.</para>
4389 </listitem>
4390 </itemizedlist></para>
4391
4392 <para>Finally, you must specify <computeroutput>--enable</computeroutput>
4393 or the DHCP server will be created in the disabled state, doing
4394 nothing.</para>
4395
4396 <para>After this, VirtualBox will automatically start the DHCP server for
4397 given internal or host-only network as soon as the first virtual machine
4398 which uses that network is started.</para>
4399
4400 <para>Reversely, use <computeroutput>VBoxManage dhcpserver
4401 remove</computeroutput> with the given <computeroutput>--netname
4402 &lt;network_name&gt;</computeroutput> or <computeroutput>--ifname
4403 &lt;hostonly_if_name&gt;</computeroutput> to remove the DHCP server again
4404 for the given internal or host-only network.</para>
4405
4406 <para>To modify the settings of a DHCP server created earlier with
4407 <computeroutput>VBoxManage dhcpserver add</computeroutput>, you can use
4408 <computeroutput>VBoxManage dhcpserver modify</computeroutput> for a given
4409 network or host-only interface name.</para>
4410 </sect1>
4411
4412 <sect1 id="vboxmanage-extpack">
4413 <title>VBoxManage extpack</title>
4414
4415 <para>The "extpack" command allows you to add or remove VirtualBox
4416 extension packs, as described in <xref
4417 linkend="intro-installing" />.<itemizedlist>
4418 <listitem>
4419 <para>To add a new extension pack, use <computeroutput>VBoxManage
4420 extpack install &lt;.vbox-extpack&gt;</computeroutput>. This command
4421 will fail if an older version of the same extension pack is already
4422 installed. The optional <computeroutput>--replace</computeroutput>
4423 parameter can be used to uninstall the old package before the new
4424 package is installed.</para>
4425 </listitem>
4426
4427 <listitem>
4428 <para>To remove a previously installed extension pack, use
4429 <computeroutput>VBoxManage extpack uninstall
4430 &lt;name&gt;</computeroutput>. You can use
4431 <computeroutput>VBoxManage list extpacks</computeroutput> to show
4432 the names of the extension packs which are currently installed;
4433 please see <xref linkend="vboxmanage-list" /> also. The optional
4434 <computeroutput>--force</computeroutput> parameter can be used to
4435 override the refusal of an extension pack to be uninstalled.</para>
4436 </listitem>
4437
4438 <listitem>
4439 <para>The <computeroutput>VBoxManage extpack
4440 cleanup</computeroutput> command can be used to remove temporary
4441 files and directories that may have been left behind if a previous
4442 install or uninstall command failed.</para>
4443 </listitem>
4444 </itemizedlist></para>
4445 <para>The following commands show examples how to list extension packs and
4446 remove one:<screen>
4447$ VBoxManage list extpacks
4448Extension Packs: 1
4449Pack no. 0: Oracle VM VirtualBox Extension Pack
4450Version: 4.1.12
4451Revision: 77218
4452Edition:
4453Description: USB 2.0 Host Controller, VirtualBox RDP, PXE ROM with E1000 support.
4454VRDE Module: VBoxVRDP
4455Usable: true
4456Why unusable:
4457$ VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack"
44580%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
4459Successfully uninstalled "Oracle VM VirtualBox Extension Pack".</screen></para>
4460 </sect1>
4461</chapter>
Note: See TracBrowser for help on using the repository browser.

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