A number of staff were affected at Pedn Olva hotel in St Ives, a stone's throw from Tregenna Castle, where world leaders are to stay overnight during the summit.
The hotel closed on Thursday for deep cleaning following discussions with Public Health England after the outbreak was identified the previous day, a spokesperson for the hotel said.
Locals reported seeing people checking out of the hotel with bags at around 5pm on Thursday. Sky News said security staff for the German delegation, who were staying at the hotel, had "been told nothing" but might end up buying a tent and sleeping on the beach.
Simon Norris, 62, who lives near to the Pedn Olva Hotel, said his wife saw people checking out on Thursday evening.
"I feel very sorry for the staff that work there because they have done a lot of work to open the hotel up for the G7 and visitors. It's extremely disappointing," he told the PA news agency.
"When we've gone there they've met all the Covid protocols, I think they've just been very, very unlucky. It's a great shame really. Prior to this we have had no incidents of Covid in St Ives."
A spokesperson for the hotel said: "We fully appreciate the inconvenience given the limited accommodation options available in the area at the moment but the safety and security of our team and guests is our upmost priority.
"The hotel will reopen once a full Covid-19 deep clean has taken place and we have the available staff to run it."
World leaders are arriving in Cornwall ahead of the official opening of the summit on Friday. President Joe Biden arrived on Wednesday night and met Boris Johnson on Thursday. Canadian leader Justin Trudeau followed on Thursday evening.
Both are set to stay at the Tregenna Castle in St Ives along with the leaders of France, Germany, Japan and Italy.
Additional reporting by agencies