In this paper, we address the challenges of Data Centers (DCs) as ancillary service providers in the Smart Grid context. A DC power management methodology has been defined for scheduling of electrical and thermal components. As a result, the power demand of HVAC (Heating, Ventilation, Air-Conditioning) system and the power produced via back-up generators adapts to sudden changes in frequency of the grid. This methodology leverages on a detailed simulation of the DC, encompassing dynamic models of the thermal and electrical components. To demonstrate the viability of the proposed power management methodology, numerical simulation experiments have been carried out oriented to future application in real pilot DCs.