Smart homes and virtual power plant (VPP) controls are growing fields of research with potential for improved electric power grid operation. A novel testbed for the co-simulation of electric power distribution systems and distributed energy resources (DERs) is employed to evaluate VPP scenarios and propose an optimization procedure. DERs of specific interest include behind-the-meter (BTM) solar photovoltaic (PV) systems as well as heating, ventilation, and air-conditioning (HVAC) systems. The simulation of HVAC systems is enabled by a machine learning procedure that produces ultra-fast models for electric power and indoor temperature of associated buildings that are up to 133 times faster than typical white-box implementations. Hundreds of these models, each with different properties, are randomly populated into a modified IEEE 123-bus test system to represent a typical U.S. community. Advanced VPP controls are developed based on the Consumer Technology Association (CTA) 2045 standard to leverage HVAC systems as generalized energy storage (GES) such that BTM solar PV is better utilized locally and occurrences of distribution system power peaks are reduced, while also maintaining occupant thermal comfort. An optimization is performed to determine the best control settings for targeted peak power and total daily energy increase minimization with example peak load reductions of 25+%.