Instructions for Using VM Templates in Igiko

1/31/2025 2:42 PM
install, how-to

Configuration steps to prepare a Windows Template disk

  1. Proceed through the Windows installation process until reaching the user creation stage.

  2. Switch to the service account using the Ctrl+F3 key combination.

  3. Install the necessary software.

  4. In the Sysprep window, which opens automatically when using a service account, select the option to enter OOBE mode and clear data.

  5. Remove any checkpoints in the Hyper-V manager if they exist.

Configuration steps to prepare a Linux Template disk

  1. Download and install a Linux distribution.

  2. Some distributions, like the server version of Ubuntu, already include the cloud-init component. If it is absent, install it.

  3. Execute the command sudo cloud-init clean.

  4. Remove current user from OS:

    • Enable the root user by setting any password:

sudo passwd root

  1. Then enter the requested password twice.

  2. Log out from the current administrator user and log in as the root user.

  3. Delete a user:

sudo userdel -r username

  1. To disable the root user, execute the following command:

sudo passwd -d root

  1. Log out from the root user.

  2. Shutdown the virtual machine.

  3. 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.

Leave a comment

Name*
Email*
Message*
*required fields
Please verify that you are not a robot

No comments yet

Email is required
Email is invalid

Tags

install
how-to