Installed packages not persisted in the Vagrant Box

63 views
Skip to first unread message

Gökhan Şengün

unread,
Nov 9, 2016, 6:03:53 PM11/9/16
to Packer
Hello everyone,

Seems to be a bug but I just can not believe that my simple use case fails for everyone, I must be doing something terribly wrong. Packer version I am using is 0.11.0 and VirtualBox version is 5.1.8r111374.

I would like to pack an image based on ubuntu 16.04.1 iso with virtualbox-iso provider and provision a few packages (jq and subversion) using shell provisioner (by calling apt). After Vagrant Box is produced, I use that box with Vagrant, sshing into the box shows that the installed packages are not there!!

I thought that this could be file system sync issue and added a few sync commands around and then wait for 30 seconds with no luck.

Please find the repo reproducing the issue below. I am also attaching the packer log file, it shows no error and tells that the packages installed OK.

Clone the repo below and issue the commands in order to reproduce the problem.

Repo:


Commands:

$ PACKER_LOG=1 packer build ubuntu1604.json
$ vagrant up virtualbox
$ vagrant ssh virtualbox
VM$ jq
The program 'jq' is currently not installed. You can install it by typing:
sudo apt install jq
VM$ svn
The program 'svn' is currently not installed. You can install it by typing:
sudo apt install subversion
log.txt

Alvaro Miranda Aguilera

unread,
Nov 9, 2016, 6:42:06 PM11/9/16
to packe...@googlegroups.com
whats the output of vagrant box list

are you re-adding or deleting/adding the new box file ?

Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/228465e2-e9d2-4fec-b8db-984153fe7a9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Gökhan Şengün

unread,
Nov 10, 2016, 5:12:26 AM11/10/16
to Packer
I am not adding the box Vagrant and directly using the .box file put by Packer under builds folder. In every build I delete the file to make sure it is recreated.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

Pete Brown

unread,
Nov 11, 2016, 6:18:28 AM11/11/16
to Packer
I had a similar issue a while ago and it turned out my cleanup script was uninstalling some of the packages I installed.
Check your build output to see what's going on.

Gökhan Şengün

unread,
Nov 18, 2016, 7:34:09 AM11/18/16
to Packer
No cleanup scripts here and build output shows nothing. Build output is attached to the mail and the project is on github below.

Thanks.

Gökhan Şengün

unread,
Nov 21, 2016, 12:34:09 AM11/21/16
to Packer
Please refer to the Github issue below. It is about remnant Vagrant box not updating, for details see below.

Reply all
Reply to author
Forward
0 new messages