• D
    Log taint warnings in QEMU driver · 718ac9b5
    Daniel P. Berrange 提交于
    Wire up logging of VM tainting to the QEMU driver
    
     - If running QEMU as root user/group or without capabilities
       being cleared
     - If passing custom QEMU command line args
     - If issuing custom QEMU monitor commands
     - If using a network interface config with an associated
       shell script
     - If using a disk config relying on format probing
    
    The warnings, per-VM appear in the main libvirtd logs
    
      11:56:17.571: 10832: warning : qemuDomainObjTaint:712 : Domain id=1 name='l2' uuid=c7a3edbd-edaf-9455-926a-d65c16db1802 is tainted: high-privileges
      11:56:17.571: 10832: warning : qemuDomainObjTaint:712 : Domain id=1 name='l2' uuid=c7a3edbd-edaf-9455-926a-d65c16db1802 is tainted: disk-probing
    
    The taint flags are reset when the VM is stopped.
    
    * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Helper APIs
      for logging taint warnings
    * src/qemu/qemu_driver.c: Log tainting with custom QEMU monitor
      commands and disk/net hotplug with unsupported configs
    * src/qemu/qemu_process.c: Log tainting at startup based on
      unsupported configs
    718ac9b5
qemu_domain.h 4.9 KB