def METHOD_NAME(test, params, vm, session):
    """
    Setup environment configuration modification.
    Operation includds disable kdumpservice, configure
    unknown_nmi_panic for linux, or modify the register value for
    windows, in order to trigger crash.
    :param test: test object
    :param params: parameters
    :vm: target vm
    :session: session created by loggin the vm
    """
    timeout = int(params.get("timeout", 360))
    if params.get("os_type") == "linux":
        # stop kdump service and enable unknown_nmi_panic
        setup_cmds = [params.get("set_kdump_cmd"),
                      params.get("set_panic_cmd")]
    else:
        # modify the register for windows
        setup_cmds = [params.get("set_panic_cmd")]
    for cmd in setup_cmds:
        status, output = session.cmd_status_output(cmd, timeout)
        if status:
            test.error("Command '%s' failed, status: %s, output: %s" %
                       (cmd, status, output))
    if params.get("os_type") == "windows":
        vm.reboot(session, timeout=timeout)