diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 671d613a51..9d6e88b1da 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -265,6 +265,12 @@ int qemuSetupCgroup(virQEMUDriverPtr driver, } for (i = 0; deviceACL[i] != NULL ; i++) { + if (access(deviceACL[i], F_OK) < 0) { + VIR_DEBUG("Ignoring non-existant device %s", + deviceACL[i]); + continue; + } + rc = virCgroupAllowDevicePath(cgroup, deviceACL[i], VIR_CGROUP_DEVICE_RW); virDomainAuditCgroupPath(vm, cgroup, "allow", deviceACL[i], "rw", rc);