• L
    qemu: move the guest status check before agent config and status check · 0b3fcfb1
    Luyao Huang 提交于
    When use setvcpus command with --guest option to a offline vm,
    we will get error:
    
     # virsh setvcpus test3 1 --guest
     error: Guest agent is not responding: QEMU guest agent is not connected
    
    However guest is not running, agent status could not be connected.
    In this case, report domain is not running will be better than agent is
    not connected. Move the guest status check more early to output error to
    point out guest status is not right.
    
    Also from the logic, a running vm is a basic requirement to use
    agent, we cannot use agent if vm is not running.
    Signed-off-by: NLuyao Huang <lhuang@redhat.com>
    Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
    0b3fcfb1
qemu_domain.c 98.8 KB