VirtualBox

source: vbox/trunk/doc/manual/en_US/man_VBoxManage-import.xml@ 91421

Last change on this file since 91421 was 91204, checked in by vboxsync, 3 years ago

doc, Frontends/VBoxManage: Integrate several refentry documentation pieces, bringing them up to date (making sure everything documented is actually understood). Remove the corresponding old style documentation and also the manually written help text in VBoxManage. Also fixes the synopsis printing when showing a syntax error message for new style documentation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 manpage, user manual, usage: VBoxManage import
4
5 Copyright (C) 2006-2020 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14 -->
15<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
16 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
17<!ENTITY % all.entities SYSTEM "all-entities.ent">
18%all.entities;
19]>
20<refentry id="vboxmanage-import" lang="en">
21 <refentryinfo>
22 <pubdate>$Date: 2021-09-10 14:59:21 +0000 (Fri, 10 Sep 2021) $</pubdate>
23 <title>VBoxManage import</title>
24 </refentryinfo>
25
26 <refmeta>
27 <refentrytitle>VBoxManage-import</refentrytitle>
28 <manvolnum>1</manvolnum>
29 </refmeta>
30
31 <refnamediv>
32 <refname>VBoxManage-import</refname>
33 <refpurpose>import a virtual appliance in OVF format or from a cloud service and create virtual machines</refpurpose>
34 <refclass>Oracle VM VirtualBox</refclass>
35 </refnamediv>
36
37 <refsynopsisdiv>
38 <cmdsynopsis id="synopsis-vboxmanage-import-ovf">
39<!-- The 'id' is mandatory and must start with 'synopsis-'. -->
40 <command>VBoxManage import</command>
41 <group choice="req">
42 <arg choice="plain"><replaceable>ovfname</replaceable></arg>
43 <arg choice="plain"><replaceable>ovaname</replaceable></arg>
44 </group>
45 <arg>--dry-run</arg>
46 <arg>--options=<group choice="plain">
47 <arg choice="plain">keepallmacs</arg>
48 <arg choice="plain">keepnatmacs</arg>
49 <arg choice="plain">importtovdi</arg>
50 </group></arg>
51 <arg>--vsys=<replaceable>n</replaceable></arg>
52 <arg>--ostype=<replaceable>ostype</replaceable></arg>
53 <arg>--vmname=<replaceable>name</replaceable></arg>
54 <arg>--settingsfile=<replaceable>file</replaceable></arg>
55 <arg>--basefolder=<replaceable>folder</replaceable></arg>
56 <arg>--group=<replaceable>group</replaceable></arg>
57 <arg>--memory=<replaceable>MB</replaceable></arg>
58 <arg>--cpus=<replaceable>n</replaceable></arg>
59 <arg>--description=<replaceable>text</replaceable></arg>
60 <arg>--eula=<group choice="plain">
61 <arg choice="plain">show</arg>
62 <arg choice="plain">accept</arg>
63 </group></arg>
64 <arg>--unit=<replaceable>n</replaceable></arg>
65 <arg>--ignore</arg>
66 <arg>--scsitype=<group choice="plain">
67 <arg choice="plain">BusLogic</arg>
68 <arg choice="plain">LsiLogic</arg>
69 </group></arg>
70 <!-- <arg>&#45;&#45;controller=<replaceable>n</replaceable></arg> -->
71 <arg>--disk=<replaceable>path</replaceable></arg>
72 </cmdsynopsis>
73
74 <cmdsynopsis id="synopsis-vboxmanage-import-cloud">
75<!-- The 'id' is mandatory and must start with 'synopsis-'. -->
76 <command>VBoxManage import</command>
77 <arg choice="plain">OCI://</arg>
78 <arg choice="plain">--cloud</arg>
79 <arg>--ostype=<replaceable>ostype</replaceable></arg>
80 <arg>--vmname=<replaceable>name</replaceable></arg>
81 <arg>--basefolder=<replaceable>folder</replaceable></arg>
82 <arg>--memory=<replaceable>MB</replaceable></arg>
83 <arg>--cpus=<replaceable>n</replaceable></arg>
84 <arg>--description=<replaceable>text</replaceable></arg>
85 <arg choice="req">--cloudprofile=<replaceable>profile</replaceable></arg>
86 <arg choice="req">--cloudinstanceid=<replaceable>id</replaceable></arg>
87 <arg>--cloudbucket=<replaceable>bucket</replaceable></arg>
88 </cmdsynopsis>
89 </refsynopsisdiv>
90
91 <refsect1>
92 <title>Description</title>
93 <para>
94 The <command>VBoxManage import</command> command imports a virtual
95 appliance either in OVF format or from a cloud service such as &oci;.
96 The import is performed by copying virtual disk images (by default using
97 the VMDK image format) and by creating virtual machines (VMs) in
98 &product-name;. See <xref linkend="ovf" />.
99 </para>
100 <para>
101 You must specify the path name of an OVF file or OVA archive to
102 use as input, or a placeholder for the cloud case. For OVF appliances
103 ensure that any disk images are in the same directory as the OVF file.
104 </para>
105 <para>
106 Note that any options you specify to control the imported virtual
107 appliance or to modify the import parameters rely on the contents
108 of the OVF file or the information from the cloud service.
109 </para>
110 <para>
111 Before you use the import operation to create the VM, perform a
112 dry run to verify the correctness of your configuration. This is more
113 useful with an OVF or OVA appliance, because with a cloud service even
114 a dry run needs to perform most of the time consuming steps.
115 </para>
116 <para>
117 The import from a cloud service downloads a temporary file containing
118 both the boot image and some metadata describing the details of the
119 VM instance. The temporary file is deleted after successful import.
120 </para>
121 <refsect2>
122 <title>Common Options</title>
123 <variablelist>
124 <varlistentry>
125 <term><replaceable>ovfname</replaceable> | <replaceable>ovaname</replaceable></term>
126 <listitem><para>
127 Specifies the name of the OVF file or OVA archive that
128 describes the appliance. In the cloud case this is usually
129 a fixed string such as <literal>OCI://</literal>.
130 </para></listitem>
131 </varlistentry>
132 <varlistentry>
133 <term><option>--dry-run</option></term>
134 <!-- Does this option really work for cloud import? -->
135 <listitem><para>
136 Performs a dry run of the <command>VBoxManage
137 import</command> command before you perform the actual
138 import operation. A dry run operation does the following:
139 </para><itemizedlist>
140 <listitem><para>
141 Outputs a description of the appliance's contents
142 based on the specified OVF or OVA file.
143 </para></listitem>
144 <listitem><para>
145 Shows how the appliance would be imported into
146 &product-name;. In addition, the output shows any
147 options that you can use to change the import
148 behavior.
149 </para></listitem>
150 </itemizedlist><para>
151 The shortened form of this option is <option>-n</option>.
152 </para></listitem>
153 </varlistentry>
154 <varlistentry>
155 <term><option>--options=keepallmacs | keepnatmacs | importtovdi</option></term>
156 <!-- Does this option really work for cloud import? -->
157 <listitem><para>
158 Enables you to fine tune the import operation.
159 </para><para>
160 Valid arguments are as follows:
161 </para><itemizedlist>
162 <listitem><para>
163 <literal>keepallmacs</literal>: Specifies that the MAC
164 addresses of every virtual network card are left
165 unchanged.
166 </para></listitem>
167 <listitem><para>
168 <literal>keepnatmacs</literal>: Specifies that the MAC
169 addresses of every virtual network card are left
170 unchanged if the network type is NAT.
171 </para></listitem>
172 <listitem><para>
173 <literal>importtovdi</literal>: Specifies that all new
174 disk images are in VDI file format.
175 </para></listitem>
176 </itemizedlist></listitem>
177 </varlistentry>
178 <varlistentry>
179 <term><option>--ostype=<replaceable>ostype</replaceable></option></term>
180 <listitem><para>
181 Specifies the guest operating system (OS) information for
182 the VM. Use the <command>VBoxManage list ostypes</command>
183 command to view the OS type identifiers.
184 </para></listitem>
185 </varlistentry>
186 <varlistentry>
187 <term><option>--vmname=<replaceable>name</replaceable></option></term>
188 <listitem><para>
189 Specifies the name of the VM to be used by &product-name;.
190 </para></listitem>
191 </varlistentry>
192 <varlistentry>
193 <term><option>--basefolder=<replaceable>folder</replaceable></option></term>
194 <!-- Does this option really work for cloud import? -->
195 <listitem><para>
196 Specifies the folder where the files of the imported VM
197 are stored.
198 </para></listitem>
199 </varlistentry>
200 <varlistentry>
201 <term><option>--memory=<replaceable>MB</replaceable></option></term>
202 <listitem><para>
203 Specifies the memory size in Megabytes for the imported VM.
204 </para></listitem>
205 </varlistentry>
206 <varlistentry>
207 <term><option>--cpus=<replaceable>n</replaceable></option></term>
208 <listitem><para>
209 Specifies the number of CPUs for the imported VM.
210 </para></listitem>
211 </varlistentry>
212 <varlistentry>
213 <term><option>--description=<replaceable>text</replaceable></option></term>
214 <listitem><para>
215 Specifies the description text visible in the GUI and
216 CLI when checking the VM details.
217 </para></listitem>
218 </varlistentry>
219 </variablelist>
220 </refsect2>
221
222 <refsect2 id="vboxmanage-import-ovf">
223 <title>OVF / OVA Import Options</title>
224 <para>
225 The following options are specific for importing a virtual appliance
226 in OVF or OVA format. Such an appliance can contain one or more VMs,
227 which requires specifying which VM configuration should be adjusted
228 in case you want to change it. See <xref linkend="ovf-import-appliance" />.
229 </para>
230 <remark role="help-copy-synopsis"/>
231 <variablelist>
232 <varlistentry>
233 <term><option>--vsys=<replaceable>n</replaceable></option></term>
234 <listitem><para>
235 Specifies the index selecting a specific VM within the
236 appliance. Affects the following options.
237 </para></listitem>
238 </varlistentry>
239 <varlistentry>
240 <term><option>--unit=<replaceable>n</replaceable></option></term>
241 <listitem><para>
242 Specifies the index selecting a specific unit of a VM
243 within the appliance. Affects the following options.
244 </para></listitem>
245 </varlistentry>
246 <varlistentry>
247 <term><option>--settingsfile=<replaceable>file</replaceable></option></term>
248 <listitem><para>
249 Specifies the name (with or without path) of the VM config
250 file which will be created as part of the import. Usually
251 the preferred way is overriding the VM name with
252 <option>--vmname</option> and if necessary specify the
253 folder in which to create the VM with
254 <option>--basefolder</option>.
255 </para></listitem>
256 </varlistentry>
257 <varlistentry>
258 <term><option>--group=<replaceable>group</replaceable></option></term>
259 <listitem><para>
260 Specifies the primary group of the imported VM.
261 </para></listitem>
262 </varlistentry>
263 <varlistentry>
264 <term><option>--eula=show | accept</option></term>
265 <listitem><para>
266 Enables you to show or accept the license conditions of a
267 VM within the appliance,
268 </para><para>
269 Valid arguments are as follows:
270 </para><itemizedlist>
271 <listitem><para>
272 <literal>show</literal>: Shows the EULA of a VM.
273 </para></listitem>
274 <listitem><para>
275 <literal>accepts</literal>: Accepts the EULA of a VM.
276 Any VMs in an appliance which have an EULA require
277 accepting it, otherwise the import will fail.
278 </para></listitem>
279 </itemizedlist></listitem>
280 </varlistentry>
281 <varlistentry>
282 <term><option>--ignore</option></term>
283 <listitem><para>
284 Ignores the current unit of an imported VM, effectively
285 removing the associated hardware.
286 </para></listitem>
287 </varlistentry>
288 <varlistentry>
289 <term><option>--scsitype=BusLogic | LsiLogic</option></term>
290 <listitem><para>
291 Enables you to select the type of the SCSI controller for
292 the current unit of an imported VM.
293 </para><para>
294 Valid arguments are as follows:
295 </para><itemizedlist>
296 <listitem><para>
297 <literal>BusLogic</literal>: Uses the (very old) BusLogic
298 SCSI controller type.
299 </para></listitem>
300 <listitem><para>
301 <literal>LsiLogic</literal>: Uses the (more modern)
302 LsiLogic SCSI controller type.
303 </para></listitem>
304 </itemizedlist></listitem>
305 </varlistentry>
306 </variablelist>
307 </refsect2>
308
309 <refsect2 id="vboxmanage-import-cloud">
310 <title>Cloud Import Options</title>
311 <para>
312 The following options are specific for importing a VM instance
313 from a cloud service provider. It always deals with a single VM.
314 See <xref linkend="cloud-import-oci" />.
315 </para>
316 <remark role="help-copy-synopsis"/>
317 <variablelist>
318 <varlistentry>
319 <term><option>--cloud</option></term>
320 <listitem><para>
321 Specifies that the import should be from the cloud.
322 </para></listitem>
323 </varlistentry>
324 <varlistentry>
325 <term><option>--cloudprofile=<replaceable>profile</replaceable></option></term>
326 <listitem><para>
327 Specifies the cloud profile which is used to connect to the
328 cloud service provider. The cloud profile contains your &oci;
329 account details, such as your user OCID and the fingerprint
330 for your public key. To use a cloud profile, you must have
331 the required permissions on &oci;.
332 </para></listitem>
333 </varlistentry>
334 <varlistentry>
335 <term><option>--cloudinstanceid=<replaceable>id</replaceable></option></term>
336 <listitem><para>
337 Specifies the ID of an existing instance in the cloud.
338 </para></listitem>
339 </varlistentry>
340 <varlistentry>
341 <term><option>--cloudbucket=<replaceable>bucket</replaceable></option></term>
342 <listitem><para>
343 Specifies the bucket name in which to store the object created
344 from the instance. In &oci;, a bucket is a logical container
345 for storing objects. By default the first bucket available with
346 the cloud profile is used.
347 </para></listitem>
348 </varlistentry>
349 </variablelist>
350 </refsect2>
351 </refsect1>
352
353 <refsect1>
354 <title>Examples</title>
355 <remark role="help-scope" condition="GLOBAL"/>
356 <para>
357 The following example performs the dry run of an OVF import operation
358 for a sample appliance that contains a Windows 10 guest:
359 </para>
360<screen>$ VBoxManage import Windows10.ovf --dry-run
361Interpreting Windows10.ovf...
362OK.
363Virtual system 0:
364 0: Suggested OS type: "Windows10_64"
365 (change with "--vsys 0 --ostype &lt;type&gt;"; use "list ostypes" to list all)
366 1: Suggested VM name "win10-appliance"
367 (change with "--vsys 0 --vmname &lt;name&gt;")
368 2: Suggested VM group "/"
369 (change with "--vsys 0 --group &lt;group&gt;")
370 3: Suggested VM settings file name "/home/user1/VirtualBox VMs/win10-appliance/win10-appliance.vbox"
371 (change with "--vsys 0 --settingsfile &lt;filename&gt;")
372 4: Suggested VM base folder "/home/user1/VirtualBox VMs"
373 (change with "--vsys 0 --basefolder &lt;path&gt;")
374 5: End-user license agreement
375 (display with "--vsys 0 --eula show";
376 accept with "--vsys 0 --eula accept")
377 6: Number of CPUs: 1
378 (change with "--vsys 0 --cpus &lt;n&gt;")
379 7: Guest memory: 2048 MB (change with "--vsys 0 --memory &lt;MB&gt;")
380 8: Sound card (appliance expects "ensoniq1371", can change on import)
381 (disable with "--vsys 0 --unit 5 --ignore")
382 9: USB controller
383 (disable with "--vsys 0 --unit 6 --ignore")
38410: Network adapter: orig bridged, config 2, extra type=bridged
38511: Floppy
386 (disable with "--vsys 0 --unit 8 --ignore")
38712: SCSI controller, type BusLogic
388 (change with "--vsys 0 --unit 9 --scsitype {BusLogic|LsiLogic}";
389 disable with "--vsys 0 --unit 9 --ignore")
39013: IDE controller, type PIIX4
391 (disable with "--vsys 0 --unit 10 --ignore")
39214: Hard disk image: source image=Windows10.vmdk,
393 target path=/home/user1/disks/Windows10.vmdk, controller=9;channel=0
394 (change target path with "--vsys 0 --unit 11 --disk &lt;path&gt;";
395 disable with "--vsys 0 --unit 11 --ignore")</screen>
396 <para>
397 The dry run output lists and numbers the individual configuration
398 items that are described in the <filename>Windows10.ovf</filename>
399 file. Some of the items include information about how to disable
400 or change the configuration of the item.
401 </para>
402 <para>
403 You can disable many of the items by using the <option>--vsys
404 <replaceable>X</replaceable> --unit <replaceable>Y</replaceable>
405 --ignore</option> options. <replaceable>X</replaceable> is the
406 number of the virtual system. The value is <literal>0</literal>
407 unless the appliance includes several virtual system descriptions.
408 <replaceable>Y</replaceable> is the configuration item number.
409 </para>
410 <para>
411 Item 1 in the example command output specifies the name of the
412 target machine. Items 12 and 13 specify the IDE and SCSI hard disk
413 controllers, respectively.
414 </para>
415 <para>
416 Item 14 indicates the hard disk image and the
417 <option>--disk</option> option specifies the target path where the
418 image will be stored. The default value is specified in the OVF file.
419 </para>
420 <para>
421 You can combine several items for the same virtual system by
422 specifying the same value for the <option>--vsys</option> option.
423 For example use the following command to import a machine as
424 described in the OVF, exclude the sound card and USB controller
425 and specify that the disk image is stored with a different name.
426 </para>
427<screen>$ VBoxManage import Windows10.ovf --vsys 0 --unit 8 --ignore \
428 --unit 9 --ignore --unit 14 --disk Windows10_disk0.vmdk</screen>
429 <para>
430 The following example illustrates how to import a VM from &oci;. To find
431 the &oci; VM instances and its ID you can list all available instances
432 with:
433 </para>
434<screen>$ VBoxManage cloud --provider=OCI --profile=<replaceable>cloud-profile-name</replaceable> list instances</screen>
435 <para>
436 Once you know the ID the following command imports the instance from
437 &oci;:
438 </para>
439<screen>$ VBoxManage import OCI:// --cloud --vmname OCI_FreeBSD_VM --memory 4000 \
440 --cpus 3 --ostype FreeBSD_64 --cloudprofile "standard user" \
441 --cloudinstanceid ocid1.instance.oc1.iad.abuwc... --cloudbucket myBucket</screen>
442 </refsect1>
443</refentry>
Note: See TracBrowser for help on using the repository browser.

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