You are correct that Virginia had originally voted not to secede from the Union in 1861. However, even before the secession convention met, the Virginia General Assembly had passed an ordinance that opposed any type of federal coercion against states that wanted to withdraw from the Union. The Virginia Anti-Coercion Resolution of Jan. 1861 stated : “Resolved, that when any one or more of the states has determined or shall determine, under existing circumstances, to withdraw from the Union, we are unalterably opposed to any attempt on the part of the federal government to coerce the same into reunion or submission, and that we will resist the same by all the means in our power.”
The state of Virginia originally desired to remain a part of the Union. In fact, the Virginia Convention initially voted by a margin of 2 to 1 not to secede from the Union on April 4, 1861. However, after the attack on Ft. Sumter, certain events caused the Virginia Convention to reverse itself. They then voted to secede from the Union by a clear majority on April 17th. The reason for the change in the secession vote in such a brief period was Lincoln's Proclamation calling for troops on April 15th to suppress the other southern states. Virginia refused the request for troops because they considered it to be a violation of the Constitution and an abuse of power. Furthermore, the secession delegates reiterated that they were opposed to any type of federal coercion against the states. The sentiments of the citizens of Virginia were echoed in the response of Governor Letcher to Lincoln's Proclamation when he stated "Your object is to subjugate the Southern states....an object in my judgment, not within the purview of the Constitution or the act of 1795 - will not be complied with. You have chosen to inaugurate civil war, and having done so, we will meet it in a spirit as determined as the administration has exhibited toward the south." Governor Letcher's response to Lincoln was presented to the Virginia Convention and the next day (April 17th) they voted to secede from the Union.