[Bug 535147] Re: libvirtd can't start qemu:///session domain - failed to set CPU affinity: Operation not permitted

Chris Bainbridge chris.bainbridge at gmail.com
Wed Mar 10 12:07:47 GMT 2010


from strace:

futex(0x80cde0, FUTEX_WAIT_PRIVATE, 2, NULL11:38:23.962: error : qemudInitCpus:1243 : failed to set CPU affinity: Operation not permitted
libvir: QEMU error : failed to set CPU affinity: Operation not permitted

qemudInitCpus:1243 does:

        if (sched_setaffinity(vm->vcpupids[i],
                              sizeof(mask), &mask) < 0) {
            virReportSystemError(conn, errno, "%s",
                                 _("failed to set CPU affinity"));
            return -1;
        }

$ man sched_setaffinity

       EPERM  (sched_setaffinity())  The calling process does not have appropriate privileges.  The caller
              needs an effective user ID equal to the user ID or effective user ID of the process  identi‐
              fied by pid, or it must possess the CAP_SYS_NICE capability.

So sched_setaffinity fails for qemu:///session because
/usr/sbin/libvirtd is run as a non-root user but the qemu VM is running
as root. In fact, this code could never have worked - has anyone ever
actually tested a qemu:///session VM before? It seems odd that this code
could ever get released.

-- 
libvirtd can't start qemu:///session domain - failed to set CPU affinity: Operation not permitted
https://bugs.launchpad.net/bugs/535147
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.



More information about the Ubuntu-server-bugs mailing list