user2166351
user2166351

Reputation: 183

Create/edit Vagrant base box to pre-install cookbooks

My VM takes about 10 minutes to boot because of all the cookbooks it needs to install.

I'm looking for a way to edit an existing (or create a new) base box where I can have all the required cookbooks installed. So every time I boot my VM, the cookbooks will already be installed and I won't have to wait too long.

Is this possible?

If so, could someone please point me in the right direction?

I'm currently using the Lucid32 base box.

Upvotes: 3

Views: 2330

Answers (2)

Sairam
Sairam

Reputation: 2898

In Vagrant v2, you can use the following command to package the VM

vagrant package

Upvotes: 0

cmur2
cmur2

Reputation: 2624

Sounds like you need to tune your base box so install everything you need in a vagrant box and export this box as your new base box:

vagrant halt; vagrant package; vagrant box add new_basebox package.box

See here for more details on packaging, esp. the last section.

Upvotes: 7

Related Questions