Data centers based on Passive Optical Networks (PONs) can offer scalability, low cost and high energy-efficiency. Application in data centers can use Virtual Machines (VMs) to provide efficient utilization of the physical resources. This paper investigates the impact of VM placement on the energy-efficiency in a PON-based data center architecture that utilizes cascaded Arrayed Waveguide Grating Routers (AWGRs). In this paper, we develop a Mixed Integer Linear Programming (MILP) optimization model to optimize the VM placement in the proposed PON-based data center architecture. This optimization aims to minimize the power consumption of the networking and computing by placing the VMs and their demands in the optimum number of resources (i.e., servers and networking devices) in the data center. To date, we consider three objective functions in our optimization framework: 1) an objective function that serves the VM requests randomly, 2) an objective function that only minimizes the processing power consumption, and 3) an objective function that jointly minimizes processing and networking power consumption. The results showed that the total power consumption can be reduced by up to 50% when performing the joint minimization of processing and networking power consumption compared to the random VM allocation approach. In addition, a reduction in the networking power consumption by up to 74% can be achieved when performing joint minimization of processing and networking power consumption compared to considering the minimization of the processing power consumption only.