Va. Code Ann. § 18.2-308.1:8
D. At such person's sentencing hearing, the court shall advise any person prohibited from purchasing, possessing, or transporting a firearm pursuant to clause (i) of subsection A that a law-enforcement officer may obtain a search warrant to search for any firearms from such person if such law-enforcement officer has probable cause that such person has not relinquished all firearms in his possession.
Any person prohibited from purchasing, possessing, or transporting a firearm pursuant to clause (i) of subsection A shall (i) within 24 hours after such person's sentencing hearing or release from custody, if such person is taken into custody at the conclusion of the sentencing hearing, (a) surrender any firearm possessed by such person to a designated local law-enforcement agency, (b) sell or transfer any firearm possessed by such person to a dealer as defined in § 18.2-308.2:2, or (c) sell or transfer any firearm possessed by such person to any person who is not otherwise prohibited by law from possessing such firearm, provided that such person who is not otherwise prohibited by law from possessing such firearm is 21 years of age or older and does not reside with such person who is prohibited from purchasing, possessing, or transporting a firearm pursuant to clause (i) of subsection A, and (ii) within 48 hours after such person's sentencing hearing or release from custody, if such person is taken into custody at the conclusion of the sentencing hearing, certify in writing, on a form provided by the Office of the Executive Secretary of the Supreme Court, that such person does not possess any firearms or that all firearms possessed by such person have been surrendered, sold, or transferred and file such certification with the clerk of the court where the conviction order was entered.
In the event of a surrender, sale, or transfer of a firearm, the person who is prohibited from purchasing, possessing, or transporting a firearm pursuant to clause (i) of subsection A shall provide, on such form, the name, address, and signature of the transferee, the federally licensed firearms dealer, or the law-enforcement agency in possession of the firearm. The person who is prohibited from purchasing, possessing, or transporting a firearm pursuant to clause (i) of subsection A shall provide a copy of such form to the transferee at the time of such firearm transfer.
The willful failure of any person to certify in writing in accordance with this section that all firearms possessed by such person have been surrendered, sold, or transferred or that such person does not possess any firearms shall constitute contempt of court.
2021, Sp. Sess. I, c. 555; 2026, cc. 527, 528, 533, 534.