In linux qemu environment, one host server runs two virtual machines. I want to let two VMs write data into the same block device on host. Thus, I run the following two commands to expose host block device to two VMs.
sudo virsh attach-disk VM1 /dev/myblockdevice vdc
sudo virsh attach-disk VM2 /dev/myblockdevice vdc
Now, two VMs could see the block device and write to it. I was wondering if this approach works well. Since two VMs write data to the same block device simultaneously, I doubt if the block device could store the correct data?