With E. Frenkel.  Geometric Realization of the Segal-Sugawara Construction.
We apply the technique of localization for vertex algebras to the Segal-Sugawara construction of an ``internal'' action of the Virasoro algebra on affine Kac-Moody algebras. The result is a lifting of twisted differential operators from the moduli of curves to the moduli of curves with bundles, with arbitrary decorations and complex twistings. This construction gives a uniform approach to a collection of phenomena describing the geometry of the moduli spaces of bundles over varying curves: the KZB equations and heat kernels on non-abelian theta functions, their critical level limit giving the quadratic parts of the Beilinson-Drinfeld quantization of the Hitchin system, and their infinite level limit giving a Hamiltonian description of the isomonodromy equations.