Fermi surface of Mg and Cd