By Fat Bloke on Mar 09, 2012
Lots of people use VirtualBox to create virtual appliances or vm's which they can share with others. There's a whole host of them over at the OTN Developer VM's page, BTW.
But someone asked me how they would go about about redistributing a vm which required a "click to accept" type of license. Here's how:
When you are happy with the vm that you want to redistribute, you can use the GUI or command-line interface of VirtualBox to export the vm.
Choose "File...Export Appliance..." to bring up the Export wizard, then select the vm's that make up your appliance. (Note that you can export multiple vm's here. For example, the database vm may be separate from the business logic vm, etc).
Choose the flavor of appliance: ovf or ova, and whether to create a manifest (hashes which can be used to determine if the appliance components arrived intact). Note that VirtualBox uses the extension to decide which type (ovf or ova) of appliance to create:
When you get to the Appliance Export Settings dialog you can describe who you are, what the appliance is called as well as specifying license text:
You can leave any of these fields empty, however, it is the presence of the License text field that causes VirtualBox to present the License at Import-time.
BTW The command line interface syntax that achieves the same thing is:
$ VBoxManage export Usage: VBoxManage export <machines> --output|-o <ovf/ova> [--legacy09|--ovf09|--ovf10|--ovf20] [--manifest] [--vsys <number of virtual system>] [--product <product name>] [--producturl <product url>] [--vendor <vendor name>] [--vendorurl <vendor url>] [--version <version info>] [--eula <license text>] [--eulafile <filename>]
So you can create scripts to automate the building of this.
The end result is the same: an ova file or an ovf file with stream-optimized disk images and an optional manifest file.
Here's what this appliance would then look like on import:
From the File...Import... menu in the VirtualBox Manager you select the ova or ovf file and you're show what the appliance contains:
At this point you can modify the devices if required, or change the MAC address (to avoid clashes with existing vm's).
But on continuing, if there is a License, it gets presented thus:
That's all there is to it.