Configuration steps to prepare a Windows Template disk
Proceed through the Windows installation process until reaching the user creation stage.
Switch to the service account using the Ctrl+F3 key combination.
Install the necessary software.
In the Sysprep window, which opens automatically when using a service account, select the option to enter OOBE mode and clear data.
Remove any checkpoints in the Hyper-V manager if they exist.
Configuration steps to prepare a Linux Template disk
Download and install a Linux distribution.
Some distributions, like the server version of Ubuntu, already include the cloud-init component. If it is absent, install it.
Execute the command sudo cloud-init clean.
Remove current user from OS:
Enable the root user by setting any password:
sudo passwd root
Then enter the requested password twice.
Log out from the current administrator user and log in as the root user.
Delete a user:
sudo userdel -r username
To disable the root user, execute the following command:
sudo passwd -d root
Log out from the root user.
Shutdown the virtual machine.
Remove any checkpoints in the Hyper-V manager if they exist.
Next Steps
After completing each sequence of actions, you will have a virtual disk. The next step is to add the template to Igiko. This is done by creating a vmtemplates.json file in the %ProgramData%/Igiko directory. The settings from this file are applied automatically, and restarting Igiko is not required.
Example JSON Structure
[
{
"name": "windows",
"virtualDiskPath": "D:\\templates\\windows.template.vhdx",
"isConfigurable": true,
"type": "unattend-xml",
"displayName": "Windows template",
"description": "Windows template description"
},
{
"name": "ubuntu",
"virtualDiskPath": "D:\\templates\\ubuntu.template.vhdx",
"isConfigurable": true,
"type": "cloudinit",
"displayName": "Ubuntu template",
"description": "Ubuntu template description"
},
{
"name": "debian",
"virtualDiskPath": "D:\\templates\\debian.template.vhdx",
"isConfigurable": false,
"displayName": "Debian template",
"description": "Debian template description"
}
]
Template Field Descriptions
Field: name
String type. The internal template name. Not displayed in the interface. Must be unique.Field: virtualDiskPath
String type. Path to the template disk. Can be either a local or network path.Field: isConfigurable
Boolean type. If set to true, interface elements for setting the administrator name, password, and computer name will be displayed for the template.Field: type
String type. Specifies the method for configuring the template. Should be specified if isConfigurable is true. Currently, two methods are available: unattend-xml for Windows templates and cloudinit for Linux templates with cloudinit installed.Field: displayName
String type. The template name displayed in the interface. Doesn't need to be unique.Field: description
String type. Template description displayed in the interface.