windows - vagrant package creates a copy of the original box with no changes I have made -
this may noob question, after making changes image vagrant up
, installing something, call vagrant package --box [name] --output [new.box]
.
after create new vagrant init new.box
, doesn't have new things installed on box packaged.
anyone know doing wrong?
the reason used same box name.
as described, you've done this:
created
vagrantfile
:vagrant.configure(vagrantfile_api_version) |config| config.vm.box = 'base' config.vm.box_url = 'http://the-url-of-box-you-used-as-base.com/precise.box' end
vagrant up
vagrant ssh
=> there you've made changesvagrant package --box [name] --output [new.box]
edit original
vagrant
file (or create new one) load new box:vagrant.configure(vagrantfile_api_version) |config| config.vm.box = 'base' config.vm.box_url = 'my-new.box' end
and here i'm assuming kept config.vm.box
same, means vagrant didn't use box, original previous box there's downloaded box name in ~/.vagrant.d/boxes
.
there might 2 solutions:
- change name in
vagrantfile
(if have used different name when generating custom box) - delete cached box name = remove
~/.vagrant.d/boxes/[name]
Comments
Post a Comment