vagrant package - files vanishing?

18 views
Skip to first unread message

bboe...@thoughtworks.com

unread,
Jan 20, 2016, 6:03:07 AM1/20/16
to Vagrant
Hi,

I have a Vagrant VM that I use as my local docker daemon and registry. To "cache" some of the docker base images I am using regularly, I created a VM, built the base images on it, now I want to package it and use it as the base box for day to day work.

But unfortunately, some of the docker images are vanishing in the vagrant package process.

- 'docker images' before package: lists about 25 images
- vagrant package --base ....
- vagrant up other-vm-that-has-this-local-base-box
- 'docker images' lists at least 5 images less

This could of course have something to do with the way my docker is set up. I just wanted to check here if there might be a reason why some files are vanishing as part of package --base? '/var/lib/docker/...' also has different contents before and after, e.g. the /graphs directory has less entries after than before.

Thanks a lot,
Birgitta


Alvaro Miranda Aguilera

unread,
Jan 21, 2016, 4:45:06 AM1/21/16
to vagra...@googlegroups.com
Hello.

if you run:

VBoxManage list vms

Are you using the correct VM?

and just to confirm, you are running this command with the VM powered on or off?

Thanks
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/67d7e35c-df69-4f39-bdc4-f2d2de3cdee7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Birgitta Böckeler

unread,
Jan 21, 2016, 6:59:43 AM1/21/16
to vagra...@googlegroups.com
Hi Alvaro,

I THINK I used the right VM - there was actually no other VM available at the time with the same/similar setup. But I could try again and really make sure.

And when I run 'vagrant package', the VM was running at the time. It looked like the command was shutting it down for the package, so I thought it was fine. Are you suggesting I try and halt it myself, then package, see if it makes a difference?

Thanks,
Birgitta



You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/7BUMD5iD0Cc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ez%2BkcnZW1_18Aieb5T9xaK-hHjmn2fLRGKybtu9z5snSw%40mail.gmail.com.

Alvaro Miranda Aguilera

unread,
Jan 21, 2016, 3:12:32 PM1/21/16
to vagra...@googlegroups.com
Hello Birgitta.

When Vagrant stop the VM, it does have a time out that usually is fit for 99% of the time.

But better be safe than sorry, so you can try this.

in the VM run : sudo sync  2 times
shutdown the VM.

If you got time, copy te VM in the Virtualbox GUI and inspect the copy over there.

run the package program, then impoort the new box.

Check the logs that vagrant may tell you you need to use --force if the box you are trying to import already exists

and check the new box


This is the normal sequence of steps, and works fine.

What may be happening, is at shutdown Vagrant is being to agressive, something is not allowing to shutdown the vm normally, or just take too long, so vagrant goes from gentle -> agressive and just poweroff the box (like taking the power cable out)

the 2nd part to check is when you import. If vagrant box already got a box with the same name, it wont import the new one, so you need to force the import. This would explain if you already got a previous version of this box, and you are running an script that is not showing all the logs. not sure this will be happening, just thinking loud

Hope this helps
alvaro

Reply all
Reply to author
Forward
0 new messages