The conditions necessary in metals for the presence or absence of localized moments on solute ions containing inner shell electrons are analyzed. A self-consistent Hartree-Fock treatment shows that there is a sharp transition between the magnetic state and the nonmagnetic state, depending on the density of states of free electrons, the s-d admixture matrix elements, and the Coulomb correlation integral in the d shell; that in the magnetic state the d polarization can be reduced rather severely to nonintegral values, without appreciable free electron polarization because of a compensation effect; and that in the nonmagnetic state the virtual localized d level tends to lie near the Fermi surface. It is emphasized that the condition for the magnetic state depends on the Coulomb (i.e., exchange self-energy) integral, and that the usual type of exchange alone is not large enough in d-shell ions to allow magnetic moments to be present. We show that the susceptibility and specific heat due to the inner shell electrons show strongly contrasting behavior even in the nonmagnetic state. A calculation including degenerate d orbitals and d-d exchange shows that the orbital angular momentum can be quenched, even when localized spin moments exist, and even on an isolated magnetic atom, by kinetic energy effects.