Your income is considered source income for the state you were in when you earned the income. Where the company is based, is irrelevant (except California).
You will file a resident AZ return and a non-resident Virginia Return. Complete the Virginia return prior to completing your AZ return.