Proto-Indo-European *weh₂g- "to break; split, bite" (AHD) (or "cover, sheath") became Latin uāgīna "sheath", because sheaths were probably made from a simple split piece of wood.
Latin uāgīna became Spanish vaina, the diminutive of which is vaynilla/vainilla, borrowed into English as the word for the sheath-shaped vanilla bean. Cf. Italian vainiglia, Portuguese bainilha, French vanille.
Also: etymological vaginas (seen on the Valve).