This straight from Va State Police website-------------
§ 18.2-308.1. Possession of firearm, stun weapon, or other weapon on school property prohibited.
A. If any person possesses any (i) stun weapon as defined in this section; (ii) knife, except a pocket knife having a folding metal blade of less than three inches; or (iii) weapon, including a weapon of like kind, designated in subsection A of § 18.2-308, other than a firearm; upon (a) the property of any public, private or religious elementary, middle or high school, including buildings and grounds; (b) that portion of any property open to the public and then exclusively used for school-sponsored functions or extracurricular activities while such functions or activities are taking place; or (c) any school bus owned or operated by any such school, he shall be guilty of a Class 1 misdemeanor.
B. If any person possesses any firearm designed or intended to expel a projectile by action of an explosion of a combustible material while such person is upon (i) any public, private or religious elementary, middle or high school, including buildings and grounds; (ii) that portion of any property open to the public and then exclusively used for school-sponsored functions or extracurricular activities while such functions or activities are taking place; or (iii) any school bus owned or operated by any such school, he shall be guilty of a Class 6 felony; however, if the person possesses any firearm within a public, private or religious elementary, middle or high school building and intends to use, or attempts to use, such firearm, or displays such weapon in a threatening manner, such person shall be sentenced to a mandatory minimum term of imprisonment of five years to be served consecutively with any other sentence.
The exemptions set out in § 18.2-308 shall apply, mutatis mutandis, to the provisions of this section. The provisions of this section shall not apply to (i) persons who possess such weapon or weapons as a part of the school's curriculum or activities; (ii) a person possessing a knife customarily used for food preparation or service and using it for such purpose; (iii) persons who possess such weapon or weapons as a part of any program sponsored or facilitated by either the school or any organization authorized by the school to conduct its programs either on or off the school premises; (iv) any law-enforcement officer; (v) any person who possesses a knife or blade which he uses customarily in his trade; (vi) a person who possesses an unloaded firearm that is in a closed container, or a knife having a metal blade, in or upon a motor vehicle, or an unloaded shotgun or rifle in a firearms rack in or upon a motor vehicle; or (vii) a person who has a valid concealed handgun permit and possesses a concealed handgun while in a motor vehicle in a parking lot, traffic circle, or other means of vehicular ingress or egress to the school. For the purposes of this paragraph, "weapon" includes a knife having a metal blade of three inches or longer and "closed container" includes a locked vehicle trunk.
As used in this section:
"Stun weapon" means any device that emits a momentary or pulsed output, which is electrical, audible, optical or electromagnetic in nature and which is designed to temporarily incapacitate a person.