Bug 526913

Summary: QEMU driver does not lock disk files
Product: [Community] Virtualization Tools Reporter: jbrackinshaw
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: unspecifiedCC: berrange, crobinso, jtomko, mbooth, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-16 14:36:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jbrackinshaw 2009-10-02 13:40:21 UTC
libvirt will not prevent two hosts running the same guest.

Situation:
1. You have a guest on node1
2. You migrate the guest to node2
3. The status according to virsh is:
 node1:guest shut off
 node2:guest running

So here "guest" refers to the same virtual machine, same disk file.

4. You wonder what would happen if a user tried to power on the guest on node1.

root@node2: virtsh start guest

5. It works :(

No warning, no error, no critical error. Just silent data corruption :(

Comment 1 jbrackinshaw 2009-10-05 08:13:21 UTC
libirt 0.6.3-20.

Comment 2 Ján Tomko 2015-03-16 14:36:11 UTC
Libvirt has supported disk locking for a while now, see:
http://libvirt.org/locking.html