We consider a superconducting qubit coupled to the nonstationary transmission line cavity with modulated frequency taking into account energy dissipation. Previously, it was demonstrated that in the case of a single nonadiabatical modulation of a cavity frequency there are two channels of a two-level system excitation which are due to the absorption of Casimir photons and due to the counterrotating wave processes responsible for the dynamical Lamb effect. We show that the parametric periodical modulation of the resonator frequency can increase dramatically the excitation probability. Remarkably, counterrotating wave processes under such a modulation start to play an important role even in the resonant regime. Our predictions can be used to control qubit-resonator quantum states as well as to study experimentally different channels of a parametric qubit excitation.