Issue
VirtualBox ignores IDE/SATA disk flush requests.
Cause
This is by design. To improve performance VirtualBox ignores these requests. This can create an issue with filesystems that do not have fsck-like tools (ZFS is an example) create a situation where the on disk information is inconsistent due to data held in RAM.
Solution
To enable flushing for IDE disks, issue the following command:
VBoxManage setextradata VMNAME
"VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0
The value [x]
that selects the disk is 0
for the master device on the first channel, 1
for the slave device on the first channel, 2
for the master device on the second channel or 3
for the master device on the second channel.
To enable flushing for SATA disks, issue the following command:
VBoxManage setextradata VMNAME
"VBoxInternal/Devices/ahci/0/LUN#[x]/Config/IgnoreFlush" 0
The value [x]
that selects the disk can be a value between 0
and 29
.