To utilize the VM package feature in Igiko, you need to create a vmpackages.json file within the %ProgramData%\Igiko directory. This file will define the available VM packages that users can select from when creating or editing a virtual machine (VM).
Creating the vmpackages.json File
The vmpackages.json file should consist of an array of package objects. Each object includes several key fields that define the characteristics of the VM package. Below is an example of a vmpackages.json file:
[
{
"Name": "Standard Package",
"Description": "A balanced package suitable for most tasks",
"CPUCount": 2,
"RAM": 4096,
"SystemDiskSize": 50,
"AdditionalDisksSize": [100],
"NetworkAdapterCount": 1
},
{
"Name": "Custom"
}
]
Fields Description
Name: The display name of the package shown to users during the creation or editing of a VM.
Description: A brief summary of the package to help users understand what it includes.
CPUCount: The number of virtual processors allocated to the VM.
RAM: The maximum allocated RAM of the VM in megabytes.
SystemDiskSize: The size of the system disk in gigabytes.
AdditionalDisksSize: An array specifying the sizes of any additional disks in gigabytes.
NetworkAdapterCount: The number of network adapters allocated to the VM.
One special case to note is the package with the name "Custom". This allows users to customize the VM parameters themselves, rather than being restricted to predefined options. When defining a custom package, any fields that should be user-configurable should be set to null or left empty, as demonstrated in the example above.
Conclusion
By configuring the vmpackages.json file appropriately, administrators can offer a tailor-made selection of VM configurations for users, simplifying the VM setup process while maintaining the flexibility to meet diverse needs.