If a person in any state which by its laws has made provision for commanding persons within its borders to attend and testify in criminal prosecutions or grand jury investigations commenced or about to commence in this Commonwealth is a material witness in a prosecution pending in a court of record in this Commonwealth, or in a grand jury investigation which has commenced or is about to commence, a judge of such court may issue a certificate under the seal of the court stating these facts and specifying the number of days the witness will be required. The certificate may include a recommendation that the witness be taken into immediate custody and delivered to an officer of this Commonwealth to assure his attendance in this Commonwealth. This certificate shall be presented to a judge of a court of record in the county in which the witness is found.
Va. Code § 19.2-277