ConfigMgr

VMware, Azure and Automation

Testing Script Runtime Service for vSphere – part 1

7 januari 2021 PowerCli Powershell VMware

Last year I tweeted about the introduction of the Script Runtime Service and now I decided to give it a try. The reason for this is that I think this is something we all waited for: a central script host.

At first, I thought this was an evolution of the Script Execution Service that can be found in the vSphere HTML5 Web Client Fling. This fling had several features, and one of them was called PowerActions: integrating PowerCLI and the vSphere Client. The vSphere Client now provides the ability to execute PowerCLI commands and scripts, and store scripts in a library. Custom actions backed by PowerCLI scripts can be defined and executed on inventory objects.

To use it you would roll out a vSphere HTML5 Web Client Fling appliance and enable the Script Execution Service from the management interface.

Then you would be able to run scripts from a central repository. So SES and SRS seem to offer similar functionality. But to be honest, I don’t know how these two services compare.

The new Script Runtime Service also uses a separate machine. This would either be a K8S cluster or a VM. In this post, I will be using a VM.

First, download the bits from GitHub. I saved the files in D:\SRS. Then import the OVF to your environment. Because the disk is split into three parts importing it using the vSphere Web Client doesn’t work. So you can use PowerCLI for this. Create a connection to your environment and run these two commands:

$vmhost = Get-VMHost -Name esx01.local.lab
Import-VApp -Source D:\SRS\SRSHostVM.ovf -VMHost $vmhost

It takes some time to import the VM but in the end, you should see a VM named SRSHostVM. Power on the VM and wait for it to boot. Log on with root (default password is changeme), change the password, and install the SRS. Detailed instructions on how to do the installation can be found on the GitHub page. My first attempt failed because DNS was not configured for the VM. The reason was that I forgot to configure the DNS Server option in the DHCP scope. So make sure that DNS is working. To be sure I also created an A record for the VM (srs.local.lab).

When the installation is finished you should see something like this:

Now you can check the installation by opening the swagger page of the service. Use the name you used in the installation command. In my case it’s https://srs.local.lab/swagger. If all goes well you should see something like this:

Using SRS

Now that the SRS is installed successfully, it is time to use it! Luc Dekens wrote an excellent article about building your own SRS and how to use it: https://www.lucd.info/2020/12/23/a-hitchhikers-guide-to-srs-1-0-0/

In the next post I will try to give you some examples on how to use the Script Runtime Service.

powercliscriptsrsvCentervcsavSphere

Using ADFS with vCenter 7

Reporting on your Windows Server backup

Recent Posts

  • Using API for Aria OPS Chargeback
  • Unable to set reservation on Org VDC
  • Veeam Tweaks
  • VCF Anyone? Get your license for free…
  • Configure Entra ID as Cloud Director IdP

Recent Comments

Geen reacties om te tonen.

Archives

  • april 2025
  • maart 2025
  • november 2024
  • oktober 2024
  • januari 2024
  • november 2023
  • oktober 2023
  • september 2023
  • juni 2023
  • mei 2023
  • april 2023
  • november 2022
  • maart 2021
  • februari 2021
  • januari 2021
  • november 2020
  • oktober 2020
  • september 2020
  • juli 2020
  • juni 2020
  • april 2020
  • maart 2020
  • februari 2020
  • oktober 2019
  • september 2019
  • juli 2019
  • juni 2019
  • mei 2019
  • maart 2019
  • februari 2019
  • januari 2019
  • december 2018
  • november 2018
  • april 2018
  • januari 2018
  • juli 2017
  • juni 2017
  • mei 2017

Categories

  • AnyLinq
  • Azure
  • Cloud Director
  • ConfigMgr
  • DIY
  • HomeAssistant
  • Microsoft
  • PowerCli
  • Powershell
  • SCCM
  • Script
  • Solutions
  • System Center
  • Veeam
  • VMware
  • vRealize Automation
  • vRealize Orchestrator
Proudly powered by WordPress | Theme: Doo by ThemeVS.