Using ZFS Storage Pools in VirtualBox

  • Virtual Box is configured to ignore cache flush commands from the underlying storage by default. This means that in the event of a system crash or a hardware failure, data could be lost.

  • Enable cache flushing on Virtual Box by issuing the following command:

    VBoxManage setextradata vm-name "VBoxInternal/Devices/type/0/LUN#n/Config/IgnoreFlush" 0
    • vm-name – the name of the virtual machine

    • type – the controller type, either piix3ide (if you're using the usual IDE virtual controller) or ahci, if you're using a SATA controller

    • n – the disk number