VMDK: inconsistency between grain table and backup grain table

Hi, in the middle of a project, drives did not eject properly when I had to restart the computer. I restarted the computer and now flywheel will not start. I ran virtualbox and got this message:

"VMDK: inconsistency between grain table and backup grain table"
"VD: error VERR_VD_VMDK_INVALID_HEADER opening image file"
"NS_ERROR_FAILURE (0x80004005)"

The following is the log and I'm really, REALLY hoping someone can help me!!  Thank you!!!!!


Mar 7, 2018, 1:01 PM EST - info: [main/index] Existing Pressmatic data does not exist.
Mar 7, 2018, 1:01 PM EST - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Stopped\n', stderr: '' }
Mar 7, 2018, 1:01 PM EST - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined, 'machine-halted' ]
Mar 7, 2018, 1:01 PM EST - info: [main/docker-machine] Checking Boot2Docker.iso hash
Mar 7, 2018, 1:01 PM EST - info: [main/docker-machine] Running  /Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine start local-by-flywheel
Mar 7, 2018, 1:01 PM EST - info: [main/docker-machine] Starting "local-by-flywheel"...
Mar 7, 2018, 1:01 PM EST - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
Mar 7, 2018, 1:01 PM EST - warn: [main/docker-machine] Unable to start the VM: /usr/local/bin/VBoxManage startvm local-by-flywheel --type headless failed:
Mar 7, 2018, 1:01 PM EST - warn: [main/docker-machine] VBoxManage: error: Could not open the medium '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk'.
Mar 7, 2018, 1:01 PM EST - warn: [main/docker-machine] VBoxManage: error: VMDK: inconsistency between grain table and backup grain table in '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk' (VERR_VD_VMDK_INVALID_HEADER).
Mar 7, 2018, 1:01 PM EST - warn: [main/docker-machine] VBoxManage: error: VD: error VERR_VD_VMDK_INVALID_HEADER opening image file '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk' (VERR_VD_VMDK_INVALID_HEADER)
Mar 7, 2018, 1:01 PM EST - warn: [main/docker-machine] VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium
Mar 7, 2018, 1:01 PM EST - warn: [main/docker-machine]  
Mar 7, 2018, 1:01 PM EST - warn: [main/docker-machine] Details: 00:00:00.091116 Power up failed (vrc=VINF_SUCCESS, rc=NS_ERROR_FAILURE (0X80004005))
Mar 7, 2018, 1:34 PM EST - info: [main/index] Existing Pressmatic data does not exist.
Mar 7, 2018, 1:34 PM EST - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Stopped\n', stderr: '' }
Mar 7, 2018, 1:34 PM EST - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined, 'machine-halted' ]
Mar 7, 2018, 1:34 PM EST - info: [main/docker-machine] Checking Boot2Docker.iso hash
Mar 7, 2018, 1:34 PM EST - info: [main/docker-machine] Running  /Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine start local-by-flywheel
Mar 7, 2018, 1:34 PM EST - info: [main/docker-machine] Starting "local-by-flywheel"...
Mar 7, 2018, 1:34 PM EST - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
Mar 7, 2018, 1:34 PM EST - warn: [main/docker-machine] Unable to start the VM: /usr/local/bin/VBoxManage startvm local-by-flywheel --type headless failed:
Mar 7, 2018, 1:34 PM EST - warn: [main/docker-machine] VBoxManage: error: Could not open the medium '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk'.
Mar 7, 2018, 1:34 PM EST - warn: [main/docker-machine] VBoxManage: error: VMDK: inconsistency between grain table and backup grain table in '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk' (VERR_VD_VMDK_INVALID_HEADER).
Mar 7, 2018, 1:34 PM EST - warn: [main/docker-machine] VBoxManage: error: VD: error VERR_VD_VMDK_INVALID_HEADER opening image file '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk' (VERR_VD_VMDK_INVALID_HEADER)
Mar 7, 2018, 1:34 PM EST - warn: [main/docker-machine] VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium
Mar 7, 2018, 1:34 PM EST - warn: [main/docker-machine]  
Mar 7, 2018, 1:34 PM EST - warn: [main/docker-machine] Details: 00:00:00.035688 Power up failed (vrc=VINF_SUCCESS, rc=NS_ERROR_FAILURE (0X80004005))
Mar 7, 2018, 1:38 PM EST - info: [main/index] Existing Pressmatic data does not exist.
Mar 7, 2018, 1:38 PM EST - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Stopped\n', stderr: '' }
Mar 7, 2018, 1:38 PM EST - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined, 'machine-halted' ]
Mar 7, 2018, 1:38 PM EST - info: [main/docker-machine] Checking Boot2Docker.iso hash
Mar 7, 2018, 1:38 PM EST - info: [main/docker-machine] Running  /Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine start local-by-flywheel
Mar 7, 2018, 1:38 PM EST - info: [main/docker-machine] Starting "local-by-flywheel"...
Mar 7, 2018, 1:38 PM EST - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
Mar 7, 2018, 1:38 PM EST - warn: [main/docker-machine] Unable to start the VM: /usr/local/bin/VBoxManage startvm local-by-flywheel --type headless failed:
Mar 7, 2018, 1:38 PM EST - warn: [main/docker-machine] VBoxManage: error: Could not open the medium '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk'.
Mar 7, 2018, 1:38 PM EST - warn: [main/docker-machine] VBoxManage: error: VMDK: inconsistency between grain table and backup grain table in '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk' (VERR_VD_VMDK_INVALID_HEADER).
Mar 7, 2018, 1:38 PM EST - warn: [main/docker-machine] VBoxManage: error: VD: error VERR_VD_VMDK_INVALID_HEADER opening image file '/Users/bbq797_SSD/.docker/machine/machines/local-by-flywheel/disk.vmdk' (VERR_VD_VMDK_INVALID_HEADER)
Mar 7, 2018, 1:38 PM EST - warn: [main/docker-machine] VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium
Mar 7, 2018, 1:38 PM EST - warn: [main/docker-machine]  
Mar 7, 2018, 1:38 PM EST - warn: [main/docker-machine] Details: 00:00:00.060342 Power up failed (vrc=VINF_SUCCESS, rc=NS_ERROR_FAILURE (0X80004005))

Please see my reply here: Power up failed - Can't restart Local

Sorry for the trouble!

Whew!! Thanks, that did the trick.

1 Like

Nope. Spoke to soon, flywheel starts, but now it says “Error establishing a database connection” ugh

Is it still showing? Sometimes it can take a little bit of time for MySQL to start.

If so, is the database error showing for all of your Local sites or only one?

So far just one. Thank you so, so much for the quick reply!!!

No problem!

Have you tried restarting that particular site in Local?

Another thing you may want to check is the MySQL error log in the site’s logs folder.

This is the latest log, but no idea what it means:

2018-03-07 19:51:15 7fe2784b1740 InnoDB: Error: page 438 log sequence number 19845589
InnoDB: is in the future! Current system log sequence number 19833765.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 290.
InnoDB: You may have to recover from a backup.
2018-03-07 19:51:15 7fe2784b1740 InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex

Thanks for the log.

Is this site running on the Custom or Preferred environment?

I’m not sure, how can I check?

If there’s a “Dev Mode” switch in the top-right of the site’s page in Local it’s Preferred. Otherwise, it’s Custom.

As of Local 2.2.0 it shows the site environment and environment version above the site’s web server, PHP version, and MySQL version.

It’s preferred

I also have a db backup, if that helps

Please don’t leave me hanging! I’m so close to figuring out how to fix it! :slightly_smiling_face:

Anyone to help? @clay?

Hi @bbq797,

Unfortunately, InnoDB corruption is a tough one.

You can use MySQL’s recovery functionality but considering you have a backup, I think you’re better off creating a new site in Local, copying the files over and then re-importing the database backup.