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 you were a Virginia part year resident and had Virginia source income both while a part-year resident and nonresident of Virginia, you must file both the Part-Year return reporting your Virginia source income while you lived in VA and the nonresident return reporting your Virginia source income while you were a Nonresident of the state.
Within the program, you cannot file both a part-year and nonresident return for the same state on the same account. You can download one of the forms from the Virginia website and file the return by mail.
What if I am a resident and my spouse is not?
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: