Is it illegal in Virginia to live with a boyfriend while being the sole provider for a child who has been abandond by his father?
That is an interesting question, and I am sure the situation you are in is both difficult and emotionally draining. Unfortunately, what you probably need is the advice of a lawyer who specializes in family law. That is what I would first recommend...you need to know some important things and I wouldn't trust it to anyone less than an expert.
I am not such an expert, but I will venture a researched opinion.
There is some information missing from your question. First, what is your relationship to the child? Are you the child's mother? If so, your situation is very different than, say, if you are not the child's mother. From what I understand, abandonment in the state of Virginia happens after 6 months, at which time a person can begin to have the parental rights of the missing individual terminated. The trick is that in order to terminate his rights he has to be notified (or, at least, a good effort has to be put into finding him.) Then, a lawyer will often ask that parent to simply sign away his rights. If he does so, and you are the child's mother, that's the end of it. If he doesn't want to, well, then you have a fight on your hands.
This, of course, assumes you are the mother of the child. If you have no legal right to the child, you have a different situation. In that case, you must must contact the authorities and go through the proper channels if you want to be the child's foster parent. You should not keep in your house a child that is not legally yours and for which you don't have the legal power to make decisions. For example, what happens if the child gets sick? You would be unable to authorize treatment.
As for the boyfriend...as far as I know, there is nothing illegal about it. You are free to chose to live with whomever you please. The father would have the ability to object were the person you chose a criminal or had some history of child abuse, but it doesn't sound like he is around to do so (and I am guessing you are smart enough not to bring anyone around that poses a danger to the child.) I am also assuming you are not married to the missing parent, which would complicate things.
If you are on public assistance you will need to report to your caseworker that you are moving in with someone. Though it might not make a difference, it would be considered fraud if you were to fail to report it and be paid benefits to which you were not entitled.
Remember, I am not a lawyer but I hope this gets you started.