BERLIN — In a normal season, as many as 300,000 migrant workers from Eastern Europe make their way to Germany to harvest asparagus, pick strawberries and plant late-season crops.This season has been anything but normal.Just as the first harvest was to begin, Germany and its neighbors to the east slammed shut their borders to contain the coronavirus, cutting off a crucial supply of farm labor and putting crops at risk. Farmers pleaded with the government to find a solution to the resulting labor shortage, arguing that the nation’s food security was in jeopardy.The German government responded by allowing farmers to airlift workers from Romania and Bulgaria — another example of the sort of improvised solutions countries around the world have taken during the pandemic. The move has eased the labor shortage, but not solved it. It has also raised concerns about importing new infections.Under the agreement with the government in Berlin, German farmers were allowed to organize and pay for charter flights for up to 40,000 migrant workers a month in April and May. Yet the cost and logistical challenges have meant that only about 28,000 workers have been flown in so far, well short of the number needed.“It was difficult with all of the organization, the bureaucracy and the enormous costs associated with the action,” said Florian Bogensberger, whose farming operation in Bavaria’s Hallertau region has been crippled by the travel lockdown.Mr. Bogensberger said he spent more than 10,000 euros, about $11,000, to fly 23 Romanian workers to nearby Nuremberg. Though it meant pushing back other needed investments, he said the flight was worth it.“They need the money,” Mr. Bogensberger said of the migrant workers, “and we need their help.”German farmers have also turned to volunteers and part-time workers, and most say the patchwork has allowed them to harvest and plant close to schedule. But they await another uncertain stage in June, when the rules governing travel and migrant workers may shift yet again. And the most intense agricultural period, in late summer, is still to come.Many Germans have worried that the airlift program, which has not yet been extended, could risk the spread of infection through the arrival of migrant workers.Images from one of the first flights leaving Romania showed migrant workers moving from packed buses to an airport terminal jammed with hundreds of people, many without masks. Reports last month that a Romanian worker had contracted the virus and died on a farm in southwestern Germany further fanned public concern.Others say the airlifts exploit migrant workers desperate to make a living. Friedrich Ostendorff, a member of the opposition Greens party, denounced them as “scandalous and irresponsible in every respect.”Though they are not part of the airlift program, hundreds of Eastern Europeans working in German meatpacking plants have contracted the coronavirus, fueling concerns that foreign workers in difficult jobs are especially vulnerable. One Berlin-based migrant advocacy group has deployed representatives to give the organization’s contact information to farm workers arriving at airports.“Everybody feels a bit scared, but we also need to work,” said Gabriel Moraru, 47, a Romanian who has done seasonal work at the Bogensberger farm for the past decade. The work is familiar, he said, but the safety measures are decidedly not.“Until the moment we get into the crop lines we need to wear masks,” he said. He and other workers are assigned to dining tables and lodging based on when they arrived. They must eat in separate groups, and they are not allowed to leave the farm.Across the world, the pandemic has forced governments, institutions and individuals to improvise, sometimes rewriting rules on the fly or testing methods with little precedent.To fill its agricultural void, Germany looked for creative answers. After the government shut down most of the economy in mid-March, it encouraged students and people who lost their jobs in restaurants and bars to help in the fields.But farmers found that many were looking for part-time work, not the 12-hour days that seasonal workers typically put in, said Bernhard Krüsken, head of the German Farmers Association.And the redeployment of those people into the fields raised health questions, too. Mr. Krüsken said, “large numbers of people coming and going from the fields back to their communities every day” seemed only to encourage the spread of the virus.The airlift agreement came with a long set of rules and additional costs, all of which fell to the farmers.Farmers must register workers with local authorities, come up with a hygiene plan, house workers no more than two to a room and restrict workers’ movements. Hours are spent filling out forms, preparing the lodging and obtaining supplies needed to ensure hygiene.The rules, which are backed by fines of €2,500 to €25,000, were explained to a group of 200 farmers in a recent online meeting.In some places, officials will “want to see a written concept of how it will work,” said Simon Schumacher, manager of the Association of Southern German Asparagus and Strawberry Farmers. “You can include the receipts from the disinfectant as proof and explain how you will separate people if there is an outbreak.”The easiest part, Mr. Bogensberger said, has been maintaining social distancing in the fields, where his hops are grown in rows several feet apart, with one worker per row. But the evenings that workers have spent together over beer and barbecue won’t be happening this season. “That is a washout,” he said. “That’s the saddest part.”How the workers will return home, and how late-season reinforcements will arrive, are questions still to be answered.After the brief, but intense season of wrapping young hop plants to wires embedded in the ground, the Romanian workers at Mr. Bogensberger’s farm would normally drive back home in minivans through Austria and Hungary. Now, things are less certain.Nor is it clear how Mr. Bogensberger will get more workers later in the year. He is hoping that a recent decision to reopen the borders to Germany’s west and south will make it easier to find a solution.“It has to work,” he said. “Worse would be no harvest at all.”Kit Gillet contributed reporting from Bucharest.