Marcus Furlong
2019-Jul-16 15:38 UTC
[libvirt-users] libvirtd failing on MacOS in setgroups
Hi, I get the following error when running libvirtd on MacOS as root: $ sudo libvirtd 2019-07-11 00:12:33.379+0000: 123145573953536: info : libvirt version: 5.5.0 2019-07-11 00:12:33.379+0000: 123145573953536: warning : virProcessGetStartTime:1070 : Process start time of pid 49746 not available on this platform 2019-07-11 00:12:33.379+0000: 123145573953536: error : virSysinfoReadDMI:1172 : internal error: Failed to find path for dmidecode binary 2019-07-11 00:12:33.380+0000: 123145573953536: error : virFileFindHugeTLBFS:3734 : this function is not supported by the connection driver: virFileFindHugeTLBFS 2019-07-11 00:12:33.382+0000: 123145573953536: warning : virQEMUCapsInit:919 : Failed to get host CPU cache info 2019-07-11 00:12:33.401+0000: 123145573953536: error : virHostCPUGetTscInfo:1405 : Probing TSC is not supported on this platform: Function not implemented 2019-07-11 00:12:33.401+0000: 123145573953536: error : virExec:521 : Cannot find 'pm-is-supported' in path: No such file or directory 2019-07-11 00:12:33.401+0000: 123145573953536: warning : virQEMUCapsInit:926 : Failed to get host power management capabilities 2019-07-11 00:12:33.401+0000: 123145573953536: error : virNumaGetPages:988 : Operation not supported: page info is not supported on this platform 2019-07-11 00:12:33.401+0000: 123145573953536: warning : virQEMUCapsInit:933 : Failed to get pages info 2019-07-11 00:12:33.407+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-alpha for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.407+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-alpha: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-alpha for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.413+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-arm for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.413+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-arm: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-arm for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.419+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-arm for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.419+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-arm: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-arm for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.424+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-aarch64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.424+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-aarch64: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-aarch64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.431+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-cris for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.431+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-cris: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-cris for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.437+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-i386 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.437+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-i386: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-i386 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.443+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-lm32 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.443+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-lm32: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-lm32 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.449+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-m68k for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.449+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-m68k: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-m68k for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.497+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-microblaze for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.497+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-microblaze: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-microblaze for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.503+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-microblazeel for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.503+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-microblazeel: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-microblazeel for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.509+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-mips for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.509+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-mips: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-mips for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.515+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-mipsel for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.515+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-mipsel: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-mipsel for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.521+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-mips64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.521+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-mips64: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-mips64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.527+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-mips64el for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.527+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-mips64el: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-mips64el for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.533+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-ppc for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.533+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-ppc: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-ppc for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.571+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-ppc64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.571+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-ppc64: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-ppc64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.576+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-ppc64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.576+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-ppc64: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-ppc64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.582+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-riscv32 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.582+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-riscv32: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-riscv32 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.588+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-riscv64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.588+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-riscv64: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-riscv64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.594+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-s390x for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.594+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-s390x: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-s390x for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.600+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-sh4 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.600+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-sh4: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-sh4 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.605+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-sh4eb for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.605+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-sh4eb: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-sh4eb for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.612+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-sparc for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.612+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-sparc: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-sparc for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.619+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-sparc64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.619+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-sparc64: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-sparc64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.667+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-unicore32 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.667+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-unicore32: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-unicore32 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.673+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-x86_64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.673+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-x86_64: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-x86_64 for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.679+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-xtensa for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.679+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-xtensa: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-xtensa for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.685+0000: 123145573953536: error : qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-xtensaeb for probing: libvirt: error : cannot set supplemental groups: Invalid argument 2019-07-11 00:12:33.685+0000: 123145573953536: warning : virQEMUCapsLogProbeFailure:4578 : Failed to probe capabilities for /usr/local/bin/qemu-system-xtensaeb: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-xtensaeb for probing: libvirt: error : cannot set supplemental groups: Invalid argument As a result `virsh capabilities` as root returns nothing: $ sudo virsh capabilities | grep qemu <baselabel type='qemu'>+0:+0</baselabel> whereas running as a regular user works fine: $ virsh capabilites | grep qemu <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> <domain type='qemu'/> and by extension, running VMs as regular user works fine via qemu:///session , but qemu:///system does not work. It seems like setgroups is failing: https://github.com/libvirt/libvirt/blob/v5.5.0/src/util/virutil.c#L1045-L1051 Is this the expected behaviour? Marcus. -- Marcus Furlong