[libvirt] [PATCH] qemu: move the guest status check before agent config and status check