Guardiola's side were well below their best at the Etihad Stadium, but Ilkay Gundogan's second half strike put them on course to wrap up first place in Group C with one game to spare.
Although Manor Solomon equalised for Shakhtar, Atalanta's win over Dinamo Zagreb ensured City can't be knocked off top spot.
"We have qualified. We played so good in second half. The group stage is always tricky but the target was to qualify and we have done it," Guardiola said.
With the group clinched, Guardiola has the bonus of being able to rest players for the trip to Zagreb on December 11.
That is especially important as the Zagreb fixture comes between vital Premier League matches against Manchester United and Arsenal.