This comes after a police officer was killed and a second body was found on campus earlier Thursday.
Virginia Tech said there is no longer a threat on campus and normal activities can resume.
It was the first shooting on campus since 33 people were killed in 2007 in the deadliest mass shooting in modern U.S. history.
The school said a police officer pulled someone over for a traffic stop and was shot and killed. The shooter ran toward a nearby parking lot, where a second person was found dead.
TV footage showed heavily armed officers walking around campus. Caravans of SWAT vehicles and other police cars with emergency lights flashing patrolled nearby.
RELATED: Additional coverage from abcnews.com
"It's crazy that someone would go and do something like that with all the stuff that happened in 2007," said Corey Smith, a 19-year-old sophomore from Mechanicsville, Va., who was headed to a dining hall near the site of one of the shootings.
He told The Associated Press that he stayed inside after seeing the alerts from the school. "It's just weird to think about why someone would do something like this when the school's had so many problems," Smith said.
Harry White, 20, a junior physics major, said he was in line for a sandwich at a restaurant in a campus building when he received the text message alert.
White said he didn't panic, thinking instead about a false alarm about a possible gunman that locked down the campus in August. White used an indoor walkway to go to a computer lab in an adjacent building, where he checked news reports.
"I decided to just check to see how serious it was. I saw it's actually someone shooting someone, not something false, something that looks like a gun," White said.
Campus was quieter than usual because classes ended Wednesday and students were preparing for exams.
Online: Virginia Tech website