Packetized energy management (PEM) enables virtual power plants (VPPs) to manage a population of controllable and distributed loads and generators in a request-reply manner by encapsulating the energy into fixed-duration/fixed-power energy packets. To participate in and benefit from the energy market in a transactive energy system, the VPP with PEM technique should customize its trading strategy by considering the feature of PEM. With this goal, this paper develops a dedicated two-stage packetized energy trading and management (PETM) framework for VPPs facilitated by using a co-simulation platform for a transactive energy system. Particularly, VPP bids for the energy quantity as a participant of the market with an objective of maximizing its designed utility in the first stage; and then in the second stage, the VPP launches PEM to manage a bunch of controllable devices of its customers by tracking a balancing signal produced in the first stage. We validate the proposed PETM framework using the developed co-simulation platform (PEMT-CoSim), and the results demonstrate the feasibility of the proposed framework.