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