Did Virginia and West Virginia remain in the union?

Virginia split into two states (west Virginia , Virginia) Virginia become a free state while west Virginia went under union