In order to carry out the purposes of the Code and any regulations or standards adopted in pursuance thereof, the local fire official, upon presenting appropriate credentials to the owner, operator, or agent in charge, is authorized, with the consent of the owner, operator, or agent in charge to enter a building, structure, property or premises for the purpose of conducting an inspection, examination, testing, or collection of samples for testing, during regular working hours and at other reasonable times, and in a reasonable manner, to determine if the building, structures, systems, machines, apparatus, devices, equipment, and materials stored, used or handled, and all pertinent conditions therein, are in compliance with the requirements, regulations or standards set forth in the Code.
Va. Code § 27-98.1