3cddd63 qemu_cgroup: Only try to allow devices if devices CGroup's available

Authored and Committed by mprivozn 7 years ago
    qemu_cgroup: Only try to allow devices if devices CGroup's available
    
    When a domain needs an access to some device (be it a disk, RNG,
    chardev, whatever), we have to allow it in the devices CGroup (if
    it is available), because by default we disallow all the devices.
    But some of the functions that are responsible for setting up
    devices CGroup are lacking check whether there is any CGroup
    available. Thus users might be unable to hotplug some devices:
    
      virsh # attach-device fedora rng.xml
      error: Failed to attach device from rng.xml
      error: internal error: Controller 'devices' is not mounted
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    
        
file modified
+21 -0