“Can a foreign national, here on a visa, legally buy a gun in Virginia?”
It’s not a matter of Virginia, it’s the same Federal law everywhere. Permanent Resident Aliens may purchase arms. In some states, they can also get concealed carry permits. Foreign nationals with other types of visas can’t purchase firearms.
all I can say is - as a result of this case, the details on this are going to be cleared up - fast.