I) Introduction
Join the channel Telegram of the AnonyViet 👉 Link 👈 |
Creating a virtual machine, then installing an operating system (OS) and applications (applications) for them will take a lot of time. In addition, you must update (Patch/Service Pack), configure and install other components. For example, you need to deploy 20 Windows 8.1 machines with full Office software, Software, Antivirus and Client / Server applications to users in the company within 1 day, it becomes very difficult.
The solution to save and quickly create (provision) batch of virtual machines using Templates. You just need to create a virtual machine, then fully install the software, update the operating system and applications, and finally repackage it into a Template (actually a VHD file). And you can create batches of virtual machines by copying VHD files, each VHD file is a virtual machine.
Note: virtual machines like AD DS, SQL Server do not run Sysprep.
II) Implementation
1) Create a template for the virtual machine
- On the virtual machine, go to Run -> type Sysprep
- Select “Generalize” and “Shutdown”.
- The system will run sysprep and automatically shutdown after it is done, this time it becomes Template
- After shutdown, we copy the VHD file of the virtual machine and store it somewhere else as a template.
2. Perform virtual machine creation and testing
- Create a new folder containing the virtual machine you want to create and paste the VHD file into the folder
- Proceed to create a virtual machine -> Right-click Hyper-V Server and select New -> Virtual Machine
- Navigate to the VHD file path in the new virtual machine directory
- The system is initializing and scanning drivers
- The virtual machine runs Sysprep and requires information
- The system is configuring
- Finish creating a new virtual machine using the template.