VirtualBox

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

最後變更 在這個檔案從43992是 43992,由 vboxsync 提交於 12 年 前

doc/manual: fix losing spaces when translating to latex, and also more style fixes

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

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