beautypg.com

Sun Microsystems VIRTUALBOX VERSION 3.1.0_BETA2 User Manual

Page 119

background image

8 VBoxManage reference

It is therefore recommended to first run the import subcommand with the

--dry-run

or -n option. This will then print a description of the appliance’s contents

to the screen how it would be imported into VirtualBox, together with the optional
command-line options to influence the import behavior.

As an example, here is the screen output with a sample appliance containing a

Windows XP guest:

VBoxManage import WindowsXp.ovf --dry-run

Interpreting WindowsXp.ovf...

OK.

Virtual system 0:

0: Suggested OS type: "WindowsXP"

(change with "--vsys 0 --ostype "; use "list ostypes" to list all)

1: Suggested VM name "Windows XP Professional_1"

(change with "--vsys 0 --vmname ")

3: Number of CPUs (ignored): 1

4: Guest memory: 956 MB (change with "--vsys 0 --memory ")

5: Sound card (appliance expects "ensoniq1371", can change on import)

(disable with "--vsys 0 --unit 5 --ignore")

6: USB controller

(disable with "--vsys 0 --unit 6 --ignore")

7: Network adapter: orig bridged, config 2, extra type=bridged

8: Floppy

(disable with "--vsys 0 --unit 8 --ignore")

9: SCSI controller, type BusLogic

(change with "--vsys 0 --unit 9 --scsitype {BusLogic|LsiLogic}";

disable with "--vsys 0 --unit 9 --ignore")

10: IDE controller, type PIIX4

(disable with "--vsys 0 --unit 10 --ignore")

11: Hard disk image: source image=WindowsXp.vmdk,

target path=/home/user/disks/WindowsXp.vmdk, controller=9;channel=0

(change controller with "--vsys 0 --unit 11 --controller ";

disable with "--vsys 0 --unit 11 --ignore")

As you can see, the individual configuration items are numbered, and depending on

their type support different command-line options. The import subcommand can be
directed to ignore many such items with a --vsys X --unit Y --ignore option,
where X is the number of the virtual system (zero unless there are several virtual
system descriptions in the appliance) and Y the item number, as printed on the screen.

In the above example, Item #1 specifies the name of the target machine in

VirtualBox. Items #9 and #10 specify hard disk controllers, respectively. Item #11
describes a hard disk image; in this case, the additional --controller option indi-
cates which item the disk image should be connected to, with the default coming from
the OVF file.

You can combine several items for the same virtual system behind the same --vsys

option. For example, to import a machine as described in the OVF, but without the
sound card and without the USB controller, and with the disk image connected to the
IDE controller instead of the SCSI controller, use this:

VBoxManage import WindowsXp.ovf

--vsys 0 --unit 5 --ignore --unit 6 --ignore --unit 11 --controller 10

119