The origin of dwarf ellipticals in the Virgo cluster