According to the Virginia website:
A Resident is an individual that lives in Virginia or maintains a permanent place of abode for 183 days or more. There are two types of Virginia residents actual and domicilary. See Virginia website for the definitions of the two types of residents and the various examples.
A Nonresident is an individual that does not meet the requirements to be considered a resident or a part-year resident, although they receive Virginia source income.
A Part-Year Resident is an individual that moved into or out of the state during the tax year.
If one spouse is a resident and the other is not, file separate returns. To do this within your account, you can file the federal return and wait for the return to be accepted. Then, change the filing status for the primary taxpayer and file a separate return for the first spouse. The second spouse will need to create a new account and file the separate state return in that account (if required to file).
For more information: