Inconsistent Grain table error while doing a vagrant up

Bahmni: Version Number: *Question:

When I am running vagrant up system shows error “I got an error of inconsistency between grain table and backup grain table”

I googled your error message. Seems like the VM image got corrupted during download. You should ensure you have the latest VirtualBox, and then re-download the image. You can delete the current image from (on Windows) C:/Users/USERNAME/.vagrant.d/boxes. After deleting the image, again execute “vagrant up” so that it re-downloads the box.

Thanks for your Advice, You want me to completely delete the files under boxes ?

C:\Users\Sudhir Jha.vagrant.d\boxes\bahmni-team-VAGRANTSLASH-bahmni

There are metadata and other files, Kindly confirm

Yes, everything under boxes can be deleted.

Same error is being encountered

Command: [“startvm”, “573b2ade-bd31-44b6-967b-9953cce3f76f”, “–type”, “headless”] Stderr: VBoxManage.exe: error: Could not open the medium ‘C:\Users\Sudhir Jha\VirtualBox VMs\Bahmni-RPM\packer-virtualbox-iso-1459089960-disk1.vmdk’. VBoxManage.exe: error: VMDK: inconsistency between grain table and backup grain table in ‘C:\Users\Sudhir Jha\VirtualBox VMs\Bahmni-RPM\packer-virtualbox-iso-1459089960-disk1.vmdk’ (VERR_VD_VMDK_INVALID_HEADER). VBoxManage.exe: error: VD: error VERR_VD_VMDK_INVALID_HEADER opening image file ‘C:\Users\Sudhir Jha\VirtualBox VMs\Bahmni-RPM\packer-virtualbox-iso-1459089960-disk1.vmdk’ (VERR_VD_VMDK_INVALID_HEADER) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MediumWrap, interface IMedium

Please also delete the “Bahmni-RPM” folder under “C:\Users\Sudhir Jha\VirtualBox VMs”.

Now I am getting the mentioned error

" your vm has become inaccessible, Unfortunately this is a critical error with vagrant box that vagrant cannot cleanly recover from, Please open your virtual box and clear out your inaccessible virtual machines or find out a way to fix them."

I have also looked for fixing the header by downloading the vddk but didnot worked, can you suggest my friend and thanks for your dedicated help

Start the “Virtual Box” application from GUI, and see if it shows you any VMs there. If it does, just delete them from the UI, so that any left over VMs on your machine are also deleted. The idea is to delete all downloaded VMs, and then download fresh ones again. This stackoverflow discussion link should also help you:

Hi Gurpreet,

I have re-installed every piece and now my virtual box is up and running but after few seconds my system freezes automatically and then I have to forcefully restart the system.

FYI, I have i7 processor and 4 Gb of RAM Kindly suggest !!

Thanks for all your support

Good to know its all running!

The issue you are saying seem most likely because the VM is taking most of your RAM, and rest of your system is competing for RAM resources, and then it freezes. You need to exit any unnecessary processes (or applications) on your host machine, so that the host OS gets sufficient RAM. Also, you can try running Bahmni’s VM on lesser RAM. I think its currently configured to use 3GB RAM for your VM. You can set that to 2GB and try, although that would then mean the Bahmni VM gets less memory. If you for instance are only using EMR/OpenMRS, you can shut down the other services like OpenERP and OpenELIS for the time being inside your Bahmni VM.

To reduce the memory allocated to your VM, go to the “bahmni-vagrant” folder, and edit the “Vagrantfile” file. Its contents are this:

If you see on Line 11, the value “3092”, which represents the RAM given to the VM in mb. You can maybe change that to “2048”, and restart your vagrant (vagrant halt, vagrant up).

Hello Gurpreet,

Thanks for all your support !!

I am almost near to running the application, All the services are up and running, but when I access the application from the browser I am getting following message can you suggest-

SSH-2.0-OpenSSH_5.3 Can you suggest so that i can presume

Can you please attach a screenshot of the error you are seeing. You can attach your screenshot here, and paste a link.

Three images I have uploaded first 2 says that vagrant box is running as well as the services are also running, the third one is the issue which i am encountering while accessing the application from the browser

Awaiting your reply


Shows services are running fine

@sudhir007: Can you paste the hyperlinks of the uploaded images?

The URL you entered seems to be: Thats not the port / host where Bahmni is running. Bahmni runs on Vagrant on

I have used that IP too it has the same error, This IP is generated when I made the Vagrant up I got this as host a ddress in command prompt.

Is this error related to firewall.

Its possible. Can u check your firewall settings. The port also says 2222 in your screenshot. Usually bahmni runs on port 80. Please check.