Bug 2217885

Summary: Instance spawn failing with "Failed to build and run instance: libvirt.libvirtError: internal error: Process exited prior to exec: libvirt: QEMU Driver error : failed to umount devfs on /dev: Device or resource busy"
Product: [Fedora] Fedora Reporter: Malte Poll <malte.poll>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 38CC: berrange, clalancette, crobinso, jforbes, laine, libvirt-maint, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Malte Poll 2023-06-27 11:27:39 UTC
Description of problem:

Libvirt does not deal with nested mounts correctly when unmounting /dev.
This prevents libvirt from working in cases where /dev contains nested mounts (this is the case in containers),

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

v9.0.0 (fixed in v9.1.0 upstream)


How reproducible:


Steps to Reproduce:
1. mount -t tmpfs tmpfs /dev/shm && mount -t tmpfs tmpfs /dev/shm
2. try to create any VM with libvirt

Actual results:

libvirt fails with error:

Instance spawn failing with "Failed to build and run instance: libvirt.libvirtError: internal error: Process exited prior to exec: libvirt: QEMU Driver error : failed to umount devfs on /dev: Device or resource busy"


Expected results:

VM should be created.


Additional info:

- Tracking link for RHEL: https://bugzilla.redhat.com/show_bug.cgi?id=2167302
- Upstream fix was published here: https://listman.redhat.com/archives/libvir-list/2023-February/237603.html
- Upstream fix was released in libvirt >= 9.1