• D
    Report original error when QMP probing fails with new QEMU · 25bf888a
    Daniel P. Berrange 提交于
    If probing capabilities via QMP fails, we now have a check
    that prevents us falling back to -help parsing. Unfortunately
    the error message
    
      "Failed to probe capabilities for /usr/bin/qemu-kvm:
       unsupported configuration: QEMU 2.1.2 is too new for help parsing"
    
    is proving rather unhelpful to the user. We need to be telling
    them why QMP failed (the root cause), rather than they can't
    use -help (the side effect).
    
    To do this we should capture stderr during QMP probing, and
    if -help parsing then sees a new QEMU version, we know that
    QMP should have worked, and so we can show the messages from
    stderr. The message thus becomes
    
      "Failed to probe capabilities for /usr/bin/qemu-kvm:
       internal error: QEMU / QMP failed: Could not access
       KVM kernel module: No such file or directory
       failed to initialize KVM: No such file or directory"
    25bf888a
qemu_capabilities.h 18.7 KB