Configuring VM Post-Action Scripts in Igiko

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

Igiko offers the capability to execute PowerShell callbacks when creating, editing, or deleting Virtual Machines (VMs). To utilize this feature, follow these steps:

Step-by-step Guide

  1. Create a directory named Callbacks inside the ProgramData -> Igiko folder.

  2. Within this directory, create the necessary script files for handling VM actions. Name them as follows:

    • OnCreateVm.ps1

    • OnUpdateVm.ps1

    • OnDeleteVm.ps1

  3. Each script file should include a parameter for vm_id, which represents the ID of the VM being created, updated, or deleted.

Example Script

Here is a sample script for use when creating a VM:

param(

                [System.Guid]$vm_id

)

Get-VM -Id $vm_id | Set-VM -Notes "Created"

   

By using this approach, you can perform advanced VM configurations necessary for properly setting up a VM in a virtual environment. This includes, for example, configuring network settings such as VLANs or ACL rules.

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