I installed a VirtualBox and then installed a Ubuntu 12.10 Server Base OS in it. I have installed all kinds of php packages and other packages in it. My friends recommended me t
The packaging guide in "Getting Started" you are referring to assumes you have started from a vagrant base box and initialized it with vagrant up, which you have not. This allows you to package any customizations you have made to a vagrant base box.
If you start from scratch or from a "plain" VirtualBox
VM, as you do, you need to create a vagrant base box. You should be fine following the guide, which is based on Ubuntu.
The important thing to realize (and the vagrant docs are not overly clear on that) is that there are two "flavors" of packaging:
vagrant up
, which you have not. This allows you to package any customizations you have made to a vagrant base box.There's a detailed guide for creating vagrant boxes from scratch using Oracle Enterprise Linux, which might be helpful. You could also try VeeWee.
Alternatively, you could start with a Ubuntu 12.10 base box and port your customizations, in which case you could use the simpler first way of packaging.
The above refers to Vagrant 1.0. Things have changed slightly in 1.1 and in particular the docs have been rewritten:
vagrant package
command allows you to package any customizations you have made to an existing vagrant base box in the same way as in 1.0.metadata.json
file is required as Vagrant 1.1 supports multiple providers.Look at the updated documentation to find all the caracteristics your box should have if you want it to work seamlessly with vagrant :
http://docs.vagrantup.com/v2/virtualbox/boxes.html
You should also take a look at a great project called veewee, wich permits you to script the generation of vagrant box from scractch. It means veewee will actually download the ISO from your distribution and install it on a virgin virtualbox machine and then configure and install all dependencies.
It comes with a lot of recipes for all different kind of linux distribution :
https://github.com/jedi4ever/veewee
Here comes even more boxes. They say they are puppet boxes but they work with all providers (chef, puppet and shell script) :
https://github.com/puppetlabs/puppet-vagrant-boxes