When a foster parent who has a child placed in the foster parents' home by a licensed or duly authorized child-placing agency desires to adopt the child and (i) the child-placing agency holding custody of the child consents to the adoption after the child has resided in the home of such foster parent continuously for at least six months or the child-placing agency holding custody of the child does not consent to the adoption and the child has resided in the home of such foster parent continuously for at least 18 months and (ii) the birth parents' rights to the child have been terminated, the circuit court shall accept the petition filed by the foster parent and shall order a thorough investigation of the matter to be made pursuant to § 63.2-1208. The circuit court may refer the matter for investigation to a licensed or duly authorized child-placing agency other than the agency holding custody of the child. Upon completion of the investigation and report and filing of the consent of the agency holding custody of the child, or upon the finding contemplated by § 63.2-1205, the circuit court may enter a final order of adoption waiving visitation requirements, if the circuit court determines that the adoption is in the best interests of the child.
Va. Code § 63.2-1229