[happy@happy-B400AV personal]$ vagrant package --base arch-github --output mynew.box
==> arch-github: Exporting VM...
==> arch-github: Compressing package to: /data/happy/code/personal/mynew.box
Explain:
–bare <the name display on your virtualbox>
–output <User definition>
NOTE :
1. If want box more small must ssh into your box. Delete some file or garbage.
2. Please make sure sshd can use your box.
Test :
[happy@happy-B400AV personal]$ vagrant box add mynewbox mynew.box
==> box: Adding box 'mynewbox' (v0) for provider:
box: Downloading: file:///data/happy/code/personal/mynew.box
==> box: Successfully added box 'mynewbox' (v0) for 'virtualbox'!
vagrant init mynewbox
Start up the virtual machine
vagrant up
Login virtual machine by using ssh
vagrant ssh
Reference:
1. How to Create a Vagrant Base Box from an Existing One
2. Building a Vagrant Box from Start to Finish
0 意見:
張貼留言