We show that the observed Velocity Dispersion Function of E/S0 galaxies matches strikingly well the distribution function of virial velocities of massive halos virializing at z \geq 1.5 , as predicted by the standard hierarchical clustering scenario in a \Lambda CDM cosmology , for a constant ratio \sigma / V _ { vir } \simeq 0.55 \pm 0.05 , close to the value expected at virialization if it typically occurred at z \lower 2.0 pt \hbox { $ { > \atop \hbox { \raise 4.0 pt \hbox { $ \sim$ } } } $ } 3 . This strongly suggests that dissipative processes and later merging events had little impact on the matter density profile . Adopting the above \sigma / V _ { vir } ratio , the observed relationships between photometric and dynamical properties which define the fundamental plane of elliptical galaxies , such as the luminosity- \sigma ( Faber-Jackson ) and the luminosity-effective radius relations , as well as the M _ { BH } - \sigma relation , are nicely reproduced . Their shapes turn out to be determined by the mutual feedback of star-formation ( and supernova explosions ) and nuclear activity , along the lines discussed by Granato et al . ( 2004 ) . To our knowledge , this is the first semi-analytic model for which simultaneous fits of the fundamental plane relations and of the epoch-dependent luminosity function of spheroidal galaxies have been presented .