Tag - Javascript
Recently I had a customer wanting to identify if a VM of theirs was in Production, Test, or Development based on the VM’s name. Luckily, all of their VMs are named using a naming standard of “{customer}{P|T|D}{application}{server-role}”, giving a generic VM name like “custpdc1” or “cust-t-sql2”. They’re just getting started on their journey with vRealize Orchestrator, and wanted to use it to perform this function.
Easy enough, what do we need?
I’ve been working on some more automation lately for vCloud Director using vRealize Orchestrator. One of my use cases was to retrieve the SDK Connection scripting object for the linked vCenter Server. My starting point was an Org vDC, and from there I wanted to get the backing vCenter Server.
Let’s start by getting the Provider vDC vCloud Reference object from the Org vDC scripting object (orgVDC):
var providerRef = orgVDC.
Last year the legendary William Lam (Virtually Ghetto) posted a handy Powershell script that can use the vSphere 6.5 API’s to send keyboard key strokes to a VM (https://www.virtuallyghetto.com/2017/09/automating-vm-keystrokes-using-the-vsphere-api-powercli.html).
I recently had a need for this feature but in vRealize Orchestrator and in Javascript instead of Powershell so I’ve re-written it in Javascript. I’ve included 2 additional script blocks that you can place into Scriptable Tasks or Actions too.
Send a string as VM keystrokes to a VM Console You’ll need the following input parameters defined:
Latest Posts
- Restore of a Wordpress deployment is stuck redirecting the port
- Backups and Restores using Velero in TKGm 1.6.1
- Unable to upgrade the database: org.postgresql.util.PSQLException: ERROR: could not open shared memory segment: No such file or directory
- Upgrading Cloud Director 10.4.1 to 10.5
- Installing and Configuring Velero in TKGm 1.6.1 on vSphere
Advertisement
Popular Tags
vmware63
vrealize-suite19
vsphere19
how-to17
vcloud-director12
professional-development10
aws8
certificates8
vrealize-orchestrator7
github6
hugo6
lambda6
tanzu6
vcd6
vcenter6
blog5
s35
homelab4
python4
tanzu-kubernetes-grid4
tkg4
tkgm4
vmware-cloud-director4
vrealize-automation4
vrealize-suite-lifecycle-manager4
api3
api-gateway3
automation3
container-service-extension3
cse3
csp-cloud-builder3
esxi3
javascript3
kubernetes3
pfsense3
powercli3
psc3
upgrade3
vcsa3
velero3
vrealize-log-insight3
vrealize-operations-manager3
vrealize-saltstack-config3
azure2
cassandradb2
certification2
cloud-director2
dns2
hardware2
microsoft2
packer2
rest2
saltstack2
storage2
swagger2
telegraf2
vcd-10.4.12
vcd-10.52
vcloud-availability2
vcp2
vrealize-operations2
active-directory1
adfs1
alp1
app-launchpad1
automator1
blueprints1
bmc1
certificate-authority1
cisco-aci1
clarityui1
cloud-init1
converter1
cpu1
custom-resource1
dell1
docker1
draas1
federation1
firmware1
freebsd1
freenas1
gcp1
ipmi1
ipsec1
json1
macos1
network1
nodejs1
nsx1
opensource1
ova1
postman1
quanta1
route531
saml1
self-hosted1
ubuntu1
utilities1
vcenter-server1
vcloud1
vcpp1
vexpert1
vidm1
virtual-network-gateway1
vmware-identity-manager1
vpn1
vrli1
vro1
vsan1
vvols1
windows-server1
wordpress1