Ok, tried with this:

    # Run virsh command in interactive mode
    session = virsh.VirshPersistent(readonly=readonly)
    session_id = session.__dict_get__("session_id")
    result = virsh.command(cmd, ignore_status=True, debug=True,
                           session_id=session_id)

It worked in interactive mode since session_id specified, and readonly also pass with PR #1391