Bug 1006369

Summary: Don't autostart (or simple start) an instance when raw device is already mounted
Product: [Community] Virtualization Tools Reporter: Arthur Lutz <arthur.lutz>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DEFERRED QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-10 14:44:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Arthur Lutz 2013-09-10 14:01:15 UTC
Description of problem:

When autostarting an instance make sure that the devices used in the VM are not mounted on the host. 

Version-Release number of selected component (if applicable):


How reproducible:



Steps to Reproduce:
1. stop a machine for inspection
2. mount a device on the host for inspection
3. libvirtd gets restarted (either by monit or by hand) 
4. VM mounts the device which does not hand concurent mounts (ext4 for example)

Actual results:

kernel oops in the VM, damaged data on the disk device. 


Expected results:

the VM should not start and log a warning. 

Additional info:

Comment 1 Cole Robinson 2016-04-10 14:44:11 UTC
Sorry for the lack of a timely response, but Libvirt isn't really in the business of doing this type of checking... we don't even check if disk images are in use by other VMs which is the more likely case I suspect. Look into virtlockd daemon, it may be able to do what you want