I do not know exactly. In 2008, he was mentioned often as McCain’s potential running mate, but he said he had no interest. Now that he has left the Army and is running the CIA, he may have changed his mind.
We will need to vet Petraeus thoroughly to make sure this doesn't happen again.