To commission Monte Carlo beam models for five Varian megavoltage photon beams (4, 6, 10, 15, and 18 MV). The goal is to closely match measured dose distributions in water for a wide range of field sizes (from 2 x 2 to 35 x 35 cm2). The second objective is to reinvestigate the sensitivity of the calculated dose distributions to variations in the primary electron beam parameters. The GEPTS Monte Carlo code is used for photon beam simulations and dose calculations. The linear accelerator geometric models are based on (i) manufacturer specifications, (ii) corrections made by Chibani and Ma ["On the discrepancies between Monte Carlo dose calculations and measurements for the 18 MV Varian photon beam," Med. Phys. 34, 1206-1216 (2007)], and (iii) more recent drawings. Measurements were performed using pinpoint and Farmer ionization chambers, depending on the field size. Phase space calculations for small fields were performed with and without angle-based photon splitting. In addition to the three commonly used primary electron beam parameters (E(AV) is the mean energy, FWHM is the energy spectrum broadening, and R is the beam radius), the angular divergence (theta) of primary electrons is also considered. The calculated and measured dose distributions agreed to within 1% local difference at any depth beyond 1 cm for different energies and for field sizes varying from 2 x 2 to 35 x 35 cm2. In the penumbra regions, the distance to agreement is better than 0.5 mm, except for 15 MV (0.4-1 mm). The measured and calculated output factors agreed to within 1.2%. The 6, 10, and 18 MV beam models use theta = 0 degrees, while the 4 and 15 MV beam models require theta = 0.5 degrees and 0.6 degrees, respectively. The parameter sensitivity study shows that varying the beam parameters around the solution can lead to 5% differences with measurements for small (e.g., 2 x 2 cm2) and large (e.g., 35 x 35 cm2) fields, while a perfect agreement is maintained for the 10 x 10 cm2 field. The influence of R on the central-axis depth dose and the strong influence of theta on the lateral dose profiles are demonstrated. Dose distributions for very small and very large fields were proved to be more sensitive to variations in E(AV), R, and theta in comparison with the 10 x 10 cm2 field. Monte Carlo beam models need to be validated for a wide range of field sizes including small field sizes (e.g., 2 x 2 cm2).