# Creating a new vagrant package not working

**URL:** <https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669>\
**Category:** Bahmni\
**Tags:** virtualbox, vagrant\
**Created:** [May 25, 2020, 6:05am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669 "2020-05-25T06:05:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![degbenedio](https://talk.openmrs.org/letter_avatar/degbenedio/32/5_5575768a8748004e209b776fc1b2916d.png) [@degbenedio](https://talk.openmrs.org/u/degbenedio)\
**Post date:** [May 25, 2020, 6:05am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/1 "2020-05-25T06:05:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![yusto](https://talk.openmrs.org/letter_avatar/yusto/32/5_5575768a8748004e209b776fc1b2916d.png) [@yusto](https://talk.openmrs.org/u/yusto)\
**Post date:** [May 25, 2020, 9:34am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/2 "2020-05-25T09:34:07Z")

</div>

Any errors? when running vagrant package

---

<div class="post-metadata">

**Author:** ![degbenedio](https://talk.openmrs.org/letter_avatar/degbenedio/32/5_5575768a8748004e209b776fc1b2916d.png) [@degbenedio](https://talk.openmrs.org/u/degbenedio)\
**Post date:** [May 25, 2020, 9:36am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/3 "2020-05-25T09:36:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yusto](https://talk.openmrs.org/letter_avatar/yusto/32/5_5575768a8748004e209b776fc1b2916d.png) [@yusto](https://talk.openmrs.org/u/yusto)\
**Post date:** [May 25, 2020, 9:41am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/4 "2020-05-25T09:41:21Z")

</div>

How did you share? if I may ask

- Try to `vagrant halt` and then `vagrant package`

---

<div class="post-metadata">

**Author:** ![degbenedio](https://talk.openmrs.org/letter_avatar/degbenedio/32/5_5575768a8748004e209b776fc1b2916d.png) [@degbenedio](https://talk.openmrs.org/u/degbenedio)\
**Post date:** [May 25, 2020, 9:43am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/5 "2020-05-25T09:43:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yusto](https://talk.openmrs.org/letter_avatar/yusto/32/5_5575768a8748004e209b776fc1b2916d.png) [@yusto](https://talk.openmrs.org/u/yusto)\
**Post date:** [May 25, 2020, 9:55am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/6 "2020-05-25T09:55:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![degbenedio](https://talk.openmrs.org/letter_avatar/degbenedio/32/5_5575768a8748004e209b776fc1b2916d.png) [@degbenedio](https://talk.openmrs.org/u/degbenedio)\
**Post date:** [May 25, 2020, 8:54pm UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/7 "2020-05-25T20:54:41Z")

</div>

Really strange. Done all that.

---

<div class="post-metadata">

**Author:** ![amolsatvix](https://talk.openmrs.org/user_avatar/talk.openmrs.org/amolsatvix/32/8696_2.png) [@amolsatvix](https://talk.openmrs.org/u/amolsatvix)\
**Post date:** [May 26, 2020, 4:42am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/8 "2020-05-26T04:42:14Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![degbenedio](https://talk.openmrs.org/letter_avatar/degbenedio/32/5_5575768a8748004e209b776fc1b2916d.png) [@degbenedio](https://talk.openmrs.org/u/degbenedio)\
**Post date:** [May 28, 2020, 1:33am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/9 "2020-05-28T01:33:27Z")

</div>

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

 ![Screenshot (2)](https://talk.openmrs.org/uploads/default/original/2X/b/b5100c3ec06cfb0e7403bcae14f565acf87420f4.png)

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?

---

<div class="post-metadata">

**Author:** ![amolsatvix](https://talk.openmrs.org/user_avatar/talk.openmrs.org/amolsatvix/32/8696_2.png) [@amolsatvix](https://talk.openmrs.org/u/amolsatvix)\
**Post date:** [May 28, 2020, 5:45am UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/10 "2020-05-28T05:45:32Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![degbenedio](https://talk.openmrs.org/letter_avatar/degbenedio/32/5_5575768a8748004e209b776fc1b2916d.png) [@degbenedio](https://talk.openmrs.org/u/degbenedio)\
**Post date:** [June 7, 2020, 10:24pm UTC](https://talk.openmrs.org/t/creating-a-new-vagrant-package-not-working/28669/11 "2020-06-07T22:24:24Z")

</div>

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.
