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. It was not immediately clear if that person was also shot to death.
TV footage showed heavily armed officers walking around campus. Caravans of SWAT vehicles and other police cars with emergency lights flashing patrolled nearby.
"The campus community should continue to shelter in place and visitors should not come to campus," the school said.
The suspect was described as a white man wearing gray sweat pants, a gray hat with neon green brim, a maroon hoodie and backpack.
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.
The shooting came the same day as Virginia Tech was appealing a $55,000 fine by the U.S. Education Department in connection with the university's response to the 2007 rampage.
A report of a possible gunman at Virginia Tech on Aug. 4 set off the longest, most extensive lockdown and search on campus since the 2007 bloodbath led the university to overhaul its emergency procedures. No gunman was found, and the school gave the all-clear about five hours after sirens began wailing and students and staff members started receiving warnings by phone, email and text message to lock themselves indoors. Alerts were also posted on the university's website and Twitter accounts.
That incident marked the first time the entire campus was locked down since the 2007 shooting.
The system was also put to the test in 2008, when an exploding nail gun cartridge was mistaken for gunfire. Only one dorm was locked down during that emergency, and it reopened two hours later.
Online: Virginia Tech website