def METHOD_NAME(test, params, env):
    guest_vm = env.get_vm(params["guest_vm"])
    guest_vm.verify_alive()
    guest_session = guest_vm.wait_for_login(
        timeout=int(params.get("login_timeout", 360)))
    client_vm = env.get_vm(params["client_vm"])
    client_vm.verify_alive()
    client_session = client_vm.wait_for_login(
        timeout=int(params.get("login_timeout", 360)))
    if guest_session.cmd_status("ls %s" % params.get("audio_tgt")):
        test.log.info(params.get("audio_src"))
        test.log.info(params.get("audio_tgt"))
        guest_vm.copy_files_to(
            params.get("audio_src"),
            params.get("audio_tgt"))
    if client_session.cmd_status("ls %s" % params.get("audio_tgt")):
        client_vm.copy_files_to(
            params.get("audio_src"),
            params.get("audio_tgt"))
    if params.get("rv_record") == "yes":
        test.log.info("rv_record set; Testing recording")
        player = client_vm.wait_for_login(
            timeout=int(params.get("login_timeout", 360)))
        recorder_session = guest_vm.wait_for_login(
            timeout=int(params.get("login_timeout", 360)))
        recorder_session_vm = guest_vm
    else:
        test.log.info("rv_record not set; Testing playback")
        player = guest_vm.wait_for_login(
            timeout=int(params.get("login_timeout", 360)))
        recorder_session = client_vm.wait_for_login(
            timeout=int(params.get("login_timeout", 360)))
        recorder_session_vm = client_vm
    player.cmd("aplay %s &> /dev/null &" %  # starts playback
               params.get("audio_tgt"), timeout=30)
    if params.get("config_test", "no") == "migration":
        bg = utils_misc.InterruptedThread(guest_vm.migrate, kwargs={})
        bg.start()
    recorder_session.cmd("arecord -d %s -f cd -D hw:0,1 %s" % (  # records
        params.get("audio_time", "200"),  # duration
        params.get("audio_rec")),  # target
        timeout=500)
    if params.get("config_test", "no") == "migration":
        bg.join()
    recorder_session_vm.copy_files_from(
        params.get("audio_rec"), "./recorded.wav")
    if not verify_recording("./recorded.wav", params):
        test.fail("Test failed")