Creating a new vagrant package not working

Tags: #<Tag:0x00007f01c31f7c98> #<Tag:0x00007f01c31f7b30>

Hello all.

I’m running my fully functional vagrant box . Unfortunately I cannot seem to be able to get a working backup using the “vagrant package” command.

Running the command “vagrant package” does not back up my current work. It only makes a brand new box without my customisations and modifications. Can anyone please help? where did I go wrong?

Any errors? when running vagrant package

no errors at all. the new box opens fine, but without my former modifications. i doubt if it is a problem with the shared folders

How did you share? if I may ask

  • Try to vagrant halt and then vagrant package

thanks you for the response.

i did exactly that.

  1. vagrant halt
  2. vagrant package

i then copied the package.box to another PC along with the Vagrantfile

still looks like a brand new box, without my edits

Strange

  • Try to run vagrant destroy

  • delete this file( .vagrant) in bahmni-vagrant file if you cant see that file! make sure you check hidden files( windows file system)

*Then run vagrant up again

Really strange. Done all that.

@degbenedio,

Can you share your folder structure screenshot where you have kept your vagrant file and also share your Vagrant file.

vagrant package straightforward command which should create package.box in your vagrant file directory.

1 Like

thank you very much. Here is my folder structure. its ib c:/bahmni/bahmni-vagrant

my vagrant file contents are below

-- mode: ruby --

vi: set ft=ruby :

Vagrant.configure(2) do |config| config.vm.box = “bahmni-team/bahmni” config.vm.box_url = “file:///C:/bahmni/bahmni.box” config.vm.network “forwarded_port”, guest: 8069, host: 8069 config.vm.box_check_update = true config.ssh.insert_key = false config.vm.network “private_network”, ip: “192.168.33.10”

config.vm.synced_folder “…”, “/bahmni”, :owner => “vagrant” config.vm.provider “virtualbox” do |v| v.customize [“modifyvm”, :id, “–memory”, 3092, “–cpus”, 2, “–name”, “Bahmni-RPM”] end end

any pointers for me, please?

@degbenedio,

I have gone through with your folder structure and Vagrant file these look good. Can you please remove the package.box from your folder “bahmni-vagrant”. and run the command

vagrant halt
vagrant package 

Also, send the screenshot of the steps your followed and the output you got.

And while using the new package box and creating the Vagrant file be aware to change the following configuration value to a different value like “my-bahmni-box”

config.vm.box = “bahmni-team/bahmni” 

Hoping the above steps will help you.

Hello, I fixed the issue. In my windows users directory (c:/users/myusername), i cleared the contents of these 2 folders “.vagrant.d” “.VirtualBox”

My box now packs and unpacks with all changes reflected now. Thanks for the assistance.