In any case in which the accused is convicted of an offense, on the conviction of which the law requires or permits revocation or suspension of the driver's license of the person so convicted, the court shall order the surrender of such license, which shall remain in the custody of the court during the period of revocation or suspension if the period does not exceed 30 days.
If the revocation or suspension period exceeds 30 days, and the conviction was obtained in a court not of record, the license shall remain in the custody of that court (i) until the time allowed by law for an appeal to the circuit court has elapsed, when it shall be forwarded to the Commissioner, or (ii) until an appeal to the circuit court is noted, at which time it shall be returned to the accused.
If the revocation or suspension period exceeds 30 days, and the conviction was obtained in the circuit court, the circuit court shall forward the license to the Commissioner forthwith upon the conviction.
For any revocation or suspension of a privilege to drive in Virginia of a person who does not have a Virginia driver's license but who does have a valid driver's license from another jurisdiction, the court shall not order the physical surrender of such license.
Va. Code § 46.2-398