VirtualBox

source: vbox/trunk/doc/manual/fr_FR/user_VBoxManage.xml@ 44123

最後變更 在這個檔案從44123是 38233,由 vboxsync 提交於 13 年 前

doc/manual: more French translation, contributed by Jean-Philippe Mengual

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

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