In certain scenarios, users automatically provision and de-provision virtual machines (i.e. VMs) from an image as part of their build process. In these cases, the IncrediBuild core package or solutions that are consumed by such a VM are not automatically released to the license pool once the VM is destroyed, resulting in IncrediBuild allocating core packages and solutions to VM instances that will no longer be used.
The "Single-use VM Image" feature addresses this scenario exactly by offering a mechanism that will automatically de-allocate the license core package and solutions assigned to such a VM once the VM is destroyed.
In order to achieve this behavior, the image from which the above mentioned VMs are to be provisioned, needs to be pre-installed with an IncrediBuild Agent using a special IncrediBuild install option. Once such an image is installed using a special install option named "Single-use VM Image", any VM that will be provisioned based on this image will automatically be assigned by the Coordinator with an appropriate core package (according to the amount of logical cores this VM reports to the Coordinator) and the IncrediBuild solutions available in the IncrediBuild license that is loaded in the Coordinator. Consequentially, once this VM will go offline with the Coordinator, the core package and solutions consumed by it will be automatically de-allocated and return to the license pool.
It's important to note that once a VM provisioned from such an image is destroyed, i.e., becomes offline to the Coordinator, this specific VM instance will no longer be permitted to connect to the IncrediBuild infrastructure.
New VM instances provisioned from the image will of course have no problem connecting to the IncrediBuild infrastructure and consume core packages and solutions. It is possible to change the default timeout after which a single-use VM that is offline to the Coordinator will be considered as de-provisioned. This can be helpful if your network has disconnections that may cause single-use VMs to drop the connection with the Coordinator and you want to make sure the Coordinator won't free their allocated core packages and solutions by mistake.
It is possible to instruct to Coordinator to only automatically allocate core packages to single-use VMs and not solutions under the Coordinator Settings
* The "Single-use Virtual Machine Image" feature is only available as part of IncrediBuild Enterprise Edition.
- Install an IncrediBuild Agent using the new IncrediBuild install option named "Create a single-use Virtual Machine Image" on the image from which you wish to automatically provision and de-provision virtual machine instances.
When installing IncrediBuild on the image from which VMs are to be provisioned, check the "Custom" install option→ "Create a single-use Virtual Machine Image".
- Alternatively, it is possible to use the Silent installation mode to install the SingleUseVM using the following command line:
IBSetupConsole.exe /Install /Components=Agent,oneuse /Coordinator=YourCoordHostname
- Finish the IncrediBuild install process (in the appropriate setup page, make sure to choose the Coordinator on which your IncrediBuild license is loaded).
- Save your image.
- Verify your Single-use VMs Coordinator settings:
- Configure the timeout period after which a single-use VM that is offline to the Coordinator will be considered as de-provisioned. The default timeout period is 30 seconds.
- Choose whether the Coordinator will automatically allocate available solutions to single-use VMs. The default behavior of the Coordinator is to automatically allocate available solutions to single-use VMs.
- Provision a new virtual machine instance using this image → this will result in the Coordinator automatically assigning the appropriate core packages and any available solution to this virtual machine.
- Upon destroying this virtual machine, the core package and IncrediBuild solutions will automatically be released to the IncrediBuild license pool.
- This specific (destroyed) VM instance will no longer be able to register with the IncrediBuild infrastructure. In order to connect a new virtual machine based on the above image to the IncrediBuild infrastructure, simply provision a new virtual machine from the image.
Important Notes and Limitations
- This feature is only available for IncrediBuild Enterprise Edition users.
- The number of concurrent "single-use" VMs that can be connected to the Coordinator is only limited by the number of IncrediBuild Agents available in your IncrediBuild license.
- In the current phase of this feature, if a VM is not allocated with a core package or a solution due to insufficient core packages or solutions in your IncrediBuild license, there won't be a specific indication for that once the VM is provisioned and connects to the Coordinator. The Agent will simply either be un-subscribed or won't be assigned with the core packages or solutions that are not available.
- A single-use VM will be considered destroyed once it's offline to the Coordinator for a longer duration than the timeout that was defined.
Reset Single-Use VM
When changes in the image configuration are required, such as Windows updates or installation of an additional software, the image needs to be re-saved in order to apply the new changes. Saving an image after the IncrediBuild Agent service was run and has connected to the Coordinator will cause the Coordinator to unsubscribe any new instance that would be provisioned from this image.
In order to prevent this, a reset of the Single-Use VM image is needed before saving the image. The setting 'Reset Single-Use VM' in the Coordinator monitor allows the Coordinator to "forget" the image and allows saving the image in a state that instances provisioned from it would be able to connect to the Coordinator.
After resetting the Single-Use VM, the IncrediBuild Agent service on the VM will be stopped. In this stage, the image can be saved. Note that activating the Agent service again before saving the image, will render it incapable to connect once again.
In order to activate the reset Single Use VM setting, please follow these steps:
- Open the Coordinator monitor.
- Right-click on the relevant Single-Use VM→Reset Single-Use VM.
- After resetting the Single-Use VM, the Agent service in the VM has been stopped. Now the Image can be saved.