Abstract-This paper investigates the resource allocation problem for a virtualized wireless network (VWN) in which each base station (BS) is equipped with a large number of antennas and due to the pilot contamination error, the perfect estimation of channel state information (CSI) is not available. In this case, the duration of pilot sequence transmission plays a critical role on the achieved VWN throughput. Therefore, we consider this parameter as a new optimization variable and propose a novel utility function for the resource allocation problem. The proposed optimization problem is non-convex with high computational complexity. To address this issue, by applying relaxation and variable transformation techniques, we propose a two-step iterative algorithm in which the allocation of power, sub-carrier and number of antennas is first established and then used to optimize the pilot duration. Simulation results reveal that proper pilot duration design improves the VWN performance.Index Terms-Massive multiple-input multiple-output, pilot contamination error, virtualized wireless networks.