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 domiciliary. See Virginia website for the definitions of the two types of residents and the various examples.
A Nonresident is an individual who maintains legal domicile in another state and lives in Virginia less than 183 days of the taxable year (or does not live in Virginia at all), 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: