Virtualization technology has been applied in the world of education including in Vocational High Schools (SMK) of Computer and Network Engineering (TKJ) to support the teaching and learning process in the laboratory. Teachers face challenges when preparing the virtual laboratory infrastructure, especially when used by many students. It is necessary to create containers, user accounts and set access permissions so that each student can use the virtual laboratory built using Proxmox. This process is generally done manually so it takes time and effort and is prone to errors. Infrastructure as Code (IaC) is an approach to managing and providing Information Technology (IT) infrastructure by writing and running code automatically to overcome manual configuration problems. Community service activities with this training method aim to provide insight and knowledge about IaC using Ansible on Proxmox so as to help teachers manage virtual laboratories more effectively and efficiently. The training was conducted online via Cisco Webex and each teacher who participated in the practice directly using a Virtual Private Server (VPS) with a Proxmox installation and received very positive feedback from the participants. Based on the results of the post-training questionnaire filled out by 17 participants, the information obtained was that participants were able to receive and apply the material related to IaC using Ansible on VPS Proxmox very well by 82% and well by 18%. This achievement is an indicator of the success of the objectives of the implementation of the community service activities that have been carried out.