Petkovic, a former world No. 9, meets countrywoman and No. 2 seed Angelique Kerber in Friday's second round. She was leading King 6-0, 2-0 before King was forced to stop.
Kerber is the highest remaining seed after No. 1 Serena Williams withdrew Wednesday because of a knee injury.
"That's definitely not how I want to win a match," Petkovic said during her on-court interview. "I just hope Vania gets better, she's such a great girl and obviously she couldn't perform at her best, which is unfortunate.
"But up until then I was actually happy with my performance. I guess I just have to focus on those few games we played and go to the practice court and hit more balls."
Kerber, who will regain her No. 1 ranking at the conclusion of the tournament, is 7-3 versus Petkovic.
In other first-round matches, former world No. 1 Jelena Jankovic of Serbia ousted Irina Falconi of the United States 6-2, 3-6, 6-3.
Also, Shelby Rogers defeated Jennifer Brady 6-4, 7-6 (4) in a matchup of Americans. Lauren Davis of the USA topped Switzerland's Viktorija Golubic 6-4, 4-6, 7-5, while Germany's Annika Beck defeated Canada's Eugenie Borchard 3-6, 6-2, 6-2.
Four qualifiers -- Spain's Magda Linette and Sara Sorribes Tormo, Colombia's Mariana Duque-Marino and American Varvara Lepchenko -- won their opening-round matches.