For the commands that are going to be executed: you need to add a guest_root_seesion instead of the normal user test:
    guest_root_session = guest_vm.wait_for_login(
            timeout=int(params.get("login_timeout", 360)),
            username="root", password="123456")