def METHOD_NAME():
    """
    Define guest, start guest and check mem.
    """
    test.log.info("TEST_STEP1: Define guest")
    vmxml = vm_xml.VMXML.new_from_inactive_dumpxml(vm_name)
    vmxml.setup_attrs(**vm_attrs)
    cmd_result = virsh.define(vmxml.xml, debug=True)
    if define_error:
        # check scenario: 0
        libvirt.check_result(cmd_result, define_error)
        return
    test.log.info("TEST_STEP2: Start guest")
    try:
        vm.start()
        vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
        test.log.debug("After start vm, get vmxml is :%s", vmxml)
    except virt_vm.VMStartError as details:
        # check scenario: scarce_mem
        if not re.search(start_error, str(details)):
            test.fail("Failed to start guest: {}".format(str(details)))
        else:
            return
    test.log.info("TEST_STEP3: Check the huge page memory usage")
    hp_cfg = test_setup.HugePageConfig(params)
    if int(utils_memory.get_num_huge_pages()) != int(vm_nr_hugepages):
        test.fail("HugePages_Total should be %s instead of %s" % (
            vm_nr_hugepages, utils_memory.get_num_huge_pages()))
    actural_nr = hp_cfg.get_kernel_hugepages(set_pagesize)
    if int(actural_nr) != int(set_pagenum):
        test.fail("nr_hugepages should be %s instead of %s" % (
            set_pagenum, actural_nr))
    if int(utils_memory.get_num_huge_pages_free()) != int(HugePages_Free):
        test.fail("HugePages_Free should be %s instead of %s" % (
            HugePages_Free, utils_memory.get_num_huge_pages_free()))
    free_page_num = process.run(free_hugepages_cmd, shell=True,
                                verbose=True).stdout_text.strip()
    if int(free_page_num) != int(free_hugepages):
        test.fail("free_hugepages should be %s instead of %s" % (
            free_hugepages, free_page_num))
    test.log.info("TEST_STEP4: Check the huge page memory usage")
    virsh.suspend(vm.name, **VIRSH_ARGS)
    virsh.resume(vm.name, **VIRSH_ARGS)
    vm.wait_for_login().close()
    if os.path.exists(save_file):
        os.remove(save_file)
    virsh.save(vm.name, save_file, **VIRSH_ARGS)
    virsh.restore(save_file, **VIRSH_ARGS)
    vm.wait_for_login().close()
    virsh.managedsave(vm.name, **VIRSH_ARGS)
    vm.start()
    vm.wait_for_login().close()
    virsh.reboot(vm.name, **VIRSH_ARGS)
    session = vm.wait_for_login()
    test.log.info("TEST_STEP5: Verify guest memory could be consumed")
    mem_free = utils_memory.freememtotal(session)
    status, stdout = session.cmd_status_output("swapoff -a; memhog %s" % (
            mem_free - 204800))
    if status:
        raise test.fail("Failed to consume memory:%s", stdout)
    virsh.destroy(vm.name, **VIRSH_ARGS)