The magnetic field distribution, the magnetic flux, and the free energy of an Abrikosov vortex loop near a flat surface of type--II superconductors are calculated in the London approximation. The shape of such a vortex line is a semicircle of arbitrary radius. The interaction of the vortex half--ring and an external homogeneous magnetic field applied along the surface is studied. The magnitude of the energy barrier against the vortex expansion into superconductor is found. The possibilities of formation of an equilibrium vortex line determined by the structure of the applied magnetic field by creating the expanding vortex loops near the surface of type--II superconductor are discussed.