Pakistani President Pervez Musharraf has canceled a scheduled trip to China for the opening of the Olympic games .