Either parent has the right to custody of a child until a court awards custody. The best thing to do would be to file a custody action in Virginia before you leave the state. The proper place to file a custody action is based on where the child has lived for the last six months so right now and for the six months after you move to another state Virginia is the place to file an action. The court will base custody on what is best for the child and normally award custody to the primary care giver for the child. If your support base is in another state, the court will normally allow the child to be taken out of state but the court will be concerned about the impact on the move on the father's rights to see the child.
Moving out of the state with your child is considered a relocation custody issue. It would be helpful to know your husband's current duty assignment and whether and/or when he may be leaving on an extended assignment. While no lawyer can definitively answer what a court may do with your situation, the probability is that if you are not moving to impede a relationship with the baby and it's father and you can show efforts to mitigate your husband's loss of contact with the child, the court is likely to ok your move. Check out the book "the women's child custody Survival guide" on the web which speaks about custody and relocation issues and is written by a Virginia Beach lawyer.
Sign up to receive a 10-part series of useful information and legal advice about the divorce process.