def METHOD_NAME():
    """Save temporary file to snapshot."""
    sync_bin = params.get("sync_bin", "sync")
    while True:
        snapshot = yield
        test.log.debug("boot vm from image %s", snapshot.tag)
        vm = img_utils.boot_vm_with_images(test, params, env,
                                           images=(snapshot.tag,),
                                           vm_name="VM_%s" % snapshot.tag)
        guest_file = params["guest_tmp_filename"] % snapshot.tag
        test.log.debug("create tmp file %s in %s", guest_file, snapshot.tag)
        img_utils.save_random_file_to_vm(vm, guest_file, 2048, sync_bin)
        vm.destroy()