Born in Turin, he entered the Sardinian army in 1823, and was a captain in March 1848, when he gained distinction and the rank of major at the . On 5 August 1848 he liberated Charles Albert of Sardinia from a revolutionary mob in Milan, and in October was promoted general and appointed Minister of War. After suppressing the revolt of Genoa in 1849, he again assumed in November 1849 the portfolio of war, which, save during the period of his command of the Crimean expedition, he retained until 1859.