VirtualBox

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

Last change on this file since 93737 was 93707, checked in by vboxsync, 3 years ago

doc/manual: Some metadata cleanup and a bit of consistency.

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