I have a Java application that I'd like to distribute as a virtual machine appliance image (ovf or ova) for VMware and VirtualBox using Ubuntu 14.04 LTS. The image would include the operating system itself, required OS packages, my Java application, all pre-configured and ready-to-run when powered on.
What's the best way to create OVF and OVA files?
I have been working with VirtualBox some and do not feel expert, but here is what I would do.
The VM should boot to the ISO DVD image that is in the virtual CD/DVD drive. Respond to all of the prompts. Save the username and password for later.
When the build is done and Ubuntu boots to the virtual harddrive, then apply all new updates: (you will need your password created earlier)
sudo apt-get update
sudo apt-get upgrade
Then after the reboot, use the "Devices" menu at the top of the VirtualBox window for your VM to "Insert Guest Additions CD Image ..." to install the extras that makes the Ubuntu image work better in the VirtualBox environment.
Now install all of the Java extras and your applications. I can't say much here.
Lastly, using the File > Export Appliances menu option, select your VM from the list and Click Next. I usually accept the format OVF 1.0 and Click Next. Fill in the settings information with links to your support web page if available. I have seen people put the username / password information in the description field for distribution. Then Click Export.
You should have a new OVA VirtualBox Appliance.