When using a shared disk on the KVM guest, set [Shareable] and then set [none] (cache='none') to [cache model].
The setting procedure is as follows:
Stop the guest OS.
Select the stopped guest OS from the Virtual Machine Manager and click the [Open] button in the tool bar.
Click in the tool bar of the displayed window to display the detailed information of hardware.
Select a virtual disk [VirtIO Disk] from the hardware list in the left.
In the [Virtual disk] window, perform the following settings and click the [Apply] button.
Select the [Shareable] check box.
Select [none] for the [cache model] list.
Describe "shareable" and "cache='none'" in the guest configuration file (/etc/libvirt/qemu/guest_name.xml) on the host OS according to the following description while a guest OS is being stopped.
# virsh edit guest_name |
Example;
<disk type='block' device='lun'> <driver name='qemu' type='raw' cache='none'/> <source dev='/dev/disk/by-id/scsi-36000b5d0006a0000006a1296001f0000'/> <target dev='sdh' bus='scsi'/> <shareable/> <address type='drive' controller='0' bus='0' target='0' unit='7'/> </disk> |