Whenever any party in a civil action in any circuit court in this Commonwealth requires as a witness in his behalf, an inmate in a state or local correctional facility as defined in § 53.1-1, the court, on the application of such party or his attorney may, in its discretion and upon consideration of the importance of the personal appearance of the witness and the nature of the offense for which he is imprisoned, issue an order to the Director of the Department of Corrections to deliver such witness to the sheriff of the jurisdiction of the court issuing the order. If authorized by the court, the clerk of the circuit court or a deputy clerk may issue these orders on behalf of the court. The sheriff shall transport the inmate to the court to testify as such witness, and after he has testified and been released as such witness, the sheriff shall return the witness to the custody of the Department.
If necessary the sheriff may confine the inmate for the night in any convenient local correctional facility.
Under such rules and regulations as the superintendent of such an institution may prescribe, any party to a civil action in any circuit court in this Commonwealth may take the deposition of an inmate in the facility, which deposition, when taken, may be admissible in evidence as other depositions in civil actions.
The party seeking the testimony of such inmate shall advance a sum sufficient to defray the expenses and compensation of the correctional officers and sheriff, which the court shall tax as other costs.
For the purposes of this section, "correctional officers" shall have the same meaning as provided in § 53.1-1.
Va. Code § 8.01-410