8 VBoxManage reference

VBoxManage import WindowsXp.ovf --dry-run

Interpreting WindowsXp.ovf...

OK.

Virtual system 0:

0:Suggested OS type: "WindowsXP"

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

1:Suggested VM name "Windows XP Professional_1"

(change with "--vsys 0 --vmname <name>")

3:Number of CPUs (ignored): 1

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

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 {BusLogicLsiLogic}"; 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 <id>"; 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

8.7 VBoxManage export

This command exports one or more virtual machines from VirtualBox into a virtual appliance in OVF format, including copying their virtual disk images to compressed

113

Page 113
Image 113
Sun Microsystems 3.0.0 user manual VBoxManage export