The Uniform Child Custody Jurisdiction and Enforcement Act (UCCJEA) governs where custody and visitation cases are litigated. If California was the first jurisdiction to litigate the issues of custody and visitation then it is the home state jurisdiction. This means that so long as one party remains in the state then California has the right to decline to transfer jurisdiction. That being said, it is not impossible to have the case transferred to Virginia.
First, if you are planning to relocate I strongly suggest that you provide 30 days advance written notice to the Father. I can't speak to California law but under the Virginia Code advance notice of any relocation is required. If you send notice and Father does not file any motions or petitions with the court to object to your relocation then move to Virginia. Then you must wait six months before filing any motion to amend in Virginia. During the first six months you can file to have the California order registered in Virginia for enforcement purposes only, but you cannot file a Motion to Amend or Modify the California order. If after six months you would like to amend the California order you may file a Motion to Amend. At the first hearing regarding the Motion to Amend the Court should attempt to communicate via telephone with the California Court that issued the previous ruling. The Virginia Court will ask if the California court would like to retain jurisdiction. If California decides to retain jurisdiction then Virginia cannot move forward on your Motion to Amend and it must be dismissed. If California relinquishes jurisdiction then the Virginia court can move forward. If no party remains in California then California cannot retain jurisdiction and should relinquish jurisdiction to a more appropriate state such as Virginia.
The UCCJEA is a complicated federal law which requires the assistance of counsel. Retain an attorney to assist you in the process to ensure that you have the best chance of the case being heard in Virginia.
If you have a case currently going it cannot be transferred. If the case was never started you can start a case requesting permission to relocate. If there are no court orders and the father consents you can move. If you do move, it will take 6 months for the new state to get jurisdiction over the children but only it there are no orders in effect from California or the father has also moved from CA.
This advice is not meant to create an attorney-client relationship and is a general anwer to the question posed.