Assuming you have a box running and you want to package it as test.box, you can run following command
1
$ vagrant package --output test.box
After running above command, you should have a test.box file in your folder.
Go to https://app.vagrantup.com/boxes/search and login.
Enter name, visibility and description and click “Create box”.
Click “Add a provider”, where you will be lead to a page you can upload your test.box.
Enter the provider name, most common is “virtualbox”. In my case, I’m uploading to my vagrant cloud, so I select “Upload to Vagrant Cloud” and click “Continue to upload”. Then select box on my local drive and click “Upload”. Wait it to be complete.
After uploading is complete, you can click “Finish”. I don’t know how it will take so long to finish and looks like it tries to upload the file again. Just wait patiently.
In order for you or others to discover this box, you need to release it.
Now you can test if it works. Create an empty folder and copy the new commands
1
2$ vagrant init ycshao/test --box-version 1
$ vagrant upYou will see it download the box from cload and bring it up correctly.
You are all set now.