Moving vRO code from 8.x to 9.x: what to check before you migrate

Code that ran fine on Orchestrator 8.x can break on 9.x. Here is what to check before you upgrade or migrate: Rhino changes, polyglot runtime jumps, plugin removals and deprecated features, all tested on 9.1.1.

Banner: Moving vRO code from 8.x to 9.x, with a pre-migration probe list showing a sealed prototype, telnetlib, util.isString and var class failing and for each passing.
In this article

Whether you upgrade Orchestrator 8.x in place to 9.x or move your packages to a fresh 9.x instance, your code lands on a different platform: a newer Rhino engine, newer polyglot runtimes, a different plugin set and a Java version that jumped from 8 to 17+. Most of your code will just work. Some of it won’t, and some of it fails in ways that are easy to miss. In this post I’ve collected the things I’d check before migrating, each one tested in my lab.

Tested on: VCF Operations Orchestrator 9.1.1 (build 25643527), embedded in VCF Automation 9.1. The 8.x side comes from Broadcom documentation and my earlier posts.

💡 Upgrading in place or importing packages into a new 9.x instance? The code checks below are the same for both. An in-place upgrade has one extra gotcha around authentication, covered in the last section.

1. The Rhino engine: what breaks

Orchestrator 8.x runs JavaScript on Rhino 1.7R4. 9.x runs a much newer Rhino. I covered the new JavaScript features in JavaScript Features in Orchestrator 9.x, but new features don’t break anything. For a migration, what matters is the opposite: code that worked on 1.7R4 and fails on 9.x.

🚨 9.x isn’t one target. The Rhino engine changed between 9.0 and 9.1, and everything in this post was tested on 9.1.1. Run the checks on the exact build you’re moving to, and keep writing plain ES5.1 so the same code runs on 8.x and 9.x.

Here’s a probe script you can run as an action or in a scriptable task on your own 9.x server. It runs each legacy pattern on its own and reports OK or the error:

// Pre-migration probe for Orchestrator 9.x
// Runs each legacy pattern in isolation and reports OK or the error.
var checks = [
{ name: "Polyfill on a built-in prototype",
code: "Array.prototype.includes = function (x) { return this.indexOf(x) !== -1; }; 'set';" },
{ name: "New helper on a built-in prototype",
code: "Array.prototype.myHelper = function () { return 1; }; 'set';" },
{ name: "Variable named let", code: "var let = 1; let;" },
{ name: "Variable named yield", code: "var yield = 1; yield;" },
{ name: "Variable named await", code: "var await = 1; await;" },
{ name: "Variable named class", code: "var class = 1; class;" },
{ name: "Variable named enum", code: "var enum = 1; enum;" },
{ name: "JSON.parse with trailing comma", code: "JSON.parse('{\"a\":1,}').a;" },
{ name: "Legacy JS 1.7 generator (yield in function)",
code: "(function () { function g() { yield 1; } return g().next(); })();" },
{ name: "for each...in", code: "(function () { var s = 0; for each (var v in [1, 2]) { s += v; } return s; })();" },
{ name: "E4X XML", code: "new XML('<a>1</a>').toString();" }
];
var lines = [];
for (var i = 0; i < checks.length; i++) {
try {
var r = eval(checks[i].code);
lines.push("OK " + checks[i].name + " -> " + r);
} catch (e) {
lines.push("FAIL " + checks[i].name + " -> " + e);
}
}
return lines.join("\n");

Output in my lab (script path in the first two errors trimmed):

FAIL Polyfill on a built-in prototype -> InternalError: Cannot modify a property of a sealed object: includes. (...)
FAIL New helper on a built-in prototype -> InternalError: Cannot modify a property of a sealed object: myHelper. (...)
FAIL Variable named let -> SyntaxError: missing variable name
FAIL Variable named yield -> SyntaxError: missing variable name
FAIL Variable named await -> SyntaxError: missing variable name
FAIL Variable named class -> SyntaxError: missing variable name
FAIL Variable named enum -> SyntaxError: missing variable name
FAIL JSON.parse with trailing comma -> SyntaxError: Unexpected comma in object literal
FAIL Legacy JS 1.7 generator (yield in function) -> TypeError: Cannot find function next.
OK for each...in -> 3
OK E4X XML -> 1

Built-in prototypes are sealed

This is the one most likely to bite. Because 1.7R4 had no includes(), startsWith(), find() and so on, a lot of 8.x code carries polyfills or adds its own helpers to Array.prototype or String.prototype. On 9.x the built-in prototypes are sealed, so any assignment to them throws “Cannot modify a property of a sealed object”. That covers overriding an existing method and adding a brand-new one. If such an assignment sits at the top of a shared library action, every workflow that calls it fails.

The fix is to stop touching the prototypes. A guarded polyfill happens to survive, because the method already exists natively on 9.x and the assignment never runs, but a guard doesn’t help for helpers that don’t exist natively:

// Option 1: a helper function instead of changing the prototype
function arrayContains(arr, value) {
return arr.indexOf(value) !== -1;
}
// Option 2: a guarded polyfill. On 9.x includes() already exists,
// so the assignment is skipped and nothing is modified.
if (!Array.prototype.includes) {
Array.prototype.includes = function (x) { return this.indexOf(x) !== -1; };
}
// A guard does not help for helpers that don't exist natively:
// this one is still an assignment to a sealed object on 9.x.
var lines = ["arrayContains([1, 2], 2) = " + arrayContains([1, 2], 2), "Guarded polyfill: no error"];
try {
if (!Array.prototype.last) {
Array.prototype.last = function () { return this[this.length - 1]; };
}
} catch (e) {
lines.push("Guarded custom helper: " + e.message);
}
return lines.join("\n");

Output in my lab (script path trimmed):

arrayContains([1, 2], 2) = true
Guarded polyfill: no error
Guarded custom helper: Cannot modify a property of a sealed object: last. (...)

Plain helper functions (ideally in a shared library action module) are the safe choice on both 8.x and 9.x.

New reserved words

let, yield, await, class and enum can no longer be used as variable names; each one is now a syntax error. A syntax error means the whole script fails to compile, not just that line. Variables named of, async and static are still fine, and using class as a property name (obj.class) still works. A quick search across your exported package for “var let”, “var class” and so on is worth doing.

JSON.parse is strict

JSON.parse rejects a trailing comma with “Unexpected comma in object literal”. Watch for JSON that’s hand-written into configuration elements, resource elements or string attributes, where a trailing comma is easy to leave behind.

Old JavaScript 1.7 generators

Rhino used to treat any function containing yield as a generator. On 9.x that no longer returns an iterator with next(). This one is rare in vRO code, but if you find it, rewrite it as a plain loop or an array.

What still works

Several old Rhino-only features are still there on 9.1.1: for each…in loops and E4X (new XML(…)), as the probe shows. Java class access (java.*, org.mozilla.*) is still blocked by default, so if your 8.x server had it enabled through a system property, set it again on 9.x. My post on enabling access to Java classes shows how.

2. Polyglot runtimes: big version jumps

If you use Python, Node.js or PowerShell actions, this is where I’d spend most of the testing time. The runtimes moved several major versions, and modules your code imports may simply not be there anymore.

RuntimeAria Automation Orchestrator 8.18VCF Operations Orchestrator 9.1.1 (my lab)
Python3.103.14 (3.14.5)
Node.js20 (18 deprecated)24 (v24.18.0)
PowerShell7.4 (End of Support)7.6 (7.6.2)
PowerCLI13 with PowerShell 7.4 (12 deprecated)VCF.PowerCLI 9.1.1 with PowerShell 7.6
8.18 values from the 8.18 Using Automation Orchestrator documentation; 9.1.1 values from the lab.

Don’t take runtime versions from documentation or from your 8.x code. Ask the server you’re moving to:

GET https://<orchestrator-fqdn>/vco/api/server-configuration/polyglot-runtimes

Output in my lab:

{
"o11n-polyglot-runtime": [
"node:24",
"powercli:9.1.1-powershell-7.6",
"powershell:7.6",
"python:3.14"
],
"o11n-polyglot-default-runtime-memory-limit": {
"powershell:7.6": 150000000,
"powercli:9.1.1-powershell-7.6": 150000000,
"node:24": 64000000,
"python:3.14": 64000000
}
}

After migrating, open each polyglot action and check that its runtime is one of these. An action that still points to a runtime the server doesn’t offer won’t run.

Python 3.10 to 3.14: standard library modules are gone

Python 3.12 and 3.13 removed a batch of old standard library modules (PEP 594 and the removal of imp and asyncore). Code that imported them on 8.x fails on 9.x with ModuleNotFoundError before your handler even runs. I checked them with this Python action on the python:3.14 runtime:

import importlib
import sys
def handler(context, inputs):
names = ['cgi', 'cgitb', 'crypt', 'telnetlib', 'pipes', 'imghdr', 'asyncore', 'smtpd', 'distutils', 'imp', 'json', 'ssl', 'urllib.request']
result = {'python': sys.version.split(' ')[0]}
for n in names:
try:
importlib.import_module(n)
result[n] = 'OK'
except Exception as e:
result[n] = type(e).__name__ + ': ' + str(e)
return result

Output in my lab (returned as Properties, reordered for reading):

python 3.14.5
cgi ModuleNotFoundError: No module named 'cgi'
cgitb ModuleNotFoundError: No module named 'cgitb'
crypt ModuleNotFoundError: No module named 'crypt'
telnetlib ModuleNotFoundError: No module named 'telnetlib'
pipes ModuleNotFoundError: No module named 'pipes'
imghdr ModuleNotFoundError: No module named 'imghdr'
asyncore ModuleNotFoundError: No module named 'asyncore'
smtpd ModuleNotFoundError: No module named 'smtpd'
imp ModuleNotFoundError: No module named 'imp'
distutils OK
json OK
ssl OK
urllib.request OK

telnetlib is the one I’d expect to show up most in automation code (talking to network gear). Replacements are a third-party package added through an action environment, or the SSH plug-in. distutils was also removed from Python 3.12, but it still imports on this runtime, most likely because a packaging tool in the image provides it. I wouldn’t rely on it staying there.

Node.js 20 to 24: deprecated APIs were removed

Node.js removed several APIs that had been deprecated for years. I checked a few common ones with this Node.js action on the node:24 runtime:

exports.handler = (context, inputs, callback) => {
const util = require('util');
const crypto = require('crypto');
const result = { node: process.version };
result['util.isArray'] = typeof util.isArray;
result['util.isString'] = typeof util.isString;
result['util.isObject'] = typeof util.isObject;
result['util.isFunction'] = typeof util.isFunction;
result['crypto.createCipher'] = typeof crypto.createCipher;
result['crypto.createCipheriv'] = typeof crypto.createCipheriv;
try { require('punycode'); result['punycode'] = 'loads (deprecated)'; } catch (e) { result['punycode'] = e.message; }
callback(undefined, result);
};

Output in my lab (reordered for reading):

node v24.18.0
util.isArray function
util.isString undefined
util.isObject undefined
util.isFunction undefined
crypto.createCipher undefined
crypto.createCipheriv function
punycode loads (deprecated)

Calling util.isString() or crypto.createCipher() now fails with “is not a function”. Use typeof checks instead of the util.is* helpers, and crypto.createCipheriv() with an explicit key and IV instead of createCipher(). Also check the dependencies in your Node.js action environments: older package versions can depend on the removed APIs too.

PowerShell and PowerCLI: PowerNSX and PowervRA are not in the image

PowerShell moved from 7.4 to 7.6, and the PowerCLI runtime is now based on VCF.PowerCLI 9.1.1. The VCF 9.0 documentation lists PowerNSX and PowervRA as included in the PowerCLI runtime, so I listed what’s actually available on 9.1.1:

function Handler($context, $inputs) {
$mods = Get-Module -ListAvailable | Where-Object { $_.Name -match '^(VMware|VCF|PowerNSX|PowervRA)' } | Sort-Object Name -Unique | ForEach-Object { $_.Name + ' ' + $_.Version }
$output = @{ powershell = $PSVersionTable.PSVersion.ToString(); modules = ($mods -join ', ') }
return $output
}

Output in my lab (module list trimmed and split over lines):

powershell 7.6.2
modules VCF.PowerCLI 9.1.1.25581542,
VMware.DeployAutomation 13.5.1.25581542,
VMware.ImageBuilder 13.5.1.25581542,
VMware.Sdk.Nsx.Policy 13.5.1.25581542,
VMware.Sdk.vSphere 13.5.1.25581542,
VMware.Vim 9.1.0.25581542,
VMware.VimAutomation.Core 13.5.1.25581542,
VMware.VimAutomation.Nsxt 13.5.1.25581542,
VMware.VimAutomation.Vpc 13.5.1.25581542,
VMware.VumAutomation 13.5.1.25581542,
... (37 modules in total)

No PowerNSX and no PowervRA. Scripts that use them need to move to the NSX Policy SDK modules (VMware.Sdk.Nsx.Policy) or plain REST calls, or you bring the old module in through an action environment and test it on PowerShell 7.6 yourself.

💡 Every PowerCLI action run on 9.1.1 also writes a long CEIP (Customer Experience Improvement Program) notice to the action log. It’s harmless, but it’s noise if you parse logs. Running Set-PowerCLIConfiguration -ParticipateInCEIP $false inside the action didn’t remove it in my test, because the notice is printed when the module loads, so filter those lines out instead.

3. Plug-in changes and removals

Every built-in plug-in was rebuilt for 9.x. Under the hood, the Java runtime moved from Java 8 to Java 17+ and the javax.* namespace became jakarta.* (more on that in VCF Operations Orchestrator 9.0: Key Architectural Changes). That has a few consequences for migrated code:

  • Removed plug-ins. The vSphere Update Manager (VUM) plug-in is gone. The legacy vSAN plug-in depends on javax and JAXB, which are no longer in the runtime, so don’t expect it to work either. Workflows that use them need to be refactored, usually to REST calls (for example, vSphere Lifecycle Manager through the vSphere Automation API) or to PowerCLI.
  • Third-party plug-ins. A plug-in built for 8.x and Java 8 is not guaranteed to load on 9.x. Check with the vendor for a 9.x build before you migrate, not after.
  • Changed methods. Updated plug-ins can add new, faster methods, change signatures or drop old ones. Before reusing a scripting class from 8.x, check that the class and method exist on 9.x, either in the API Explorer of your 9.x server or on modernvroapi.in.

For reference, these are the 22 plug-ins on my embedded 9.1.1 Orchestrator (GET /vco/api/plugins): AD, AMQP, AutoDeploy, Configurator, DynamicTypes, Enums, Library, Mail, Multi-Node (VCO), Net, PowerShell, REST, SNMP, SOAP, SQL, SSH, Support, VAPI, vCenter Server (VC), VCF Automation for VM Apps (VRA), VCF Automation for All Apps (VCFA) and XML. Compare this against what your 8.x workflows use.

4. Deprecated platform features

Some code doesn’t break because of Orchestrator itself, but because the feature it automates is going away in VCF 9:

  • vSphere Auto Deploy and Host Profiles. Both are deprecated in VCF 9 and will be removed in a later 9.x release. The Auto Deploy plug-in still ships with 9.1.1, so existing workflows may keep running for now, but plan their replacement: vSphere Configuration Profiles instead of Host Profiles, and image-based host lifecycle instead of PXE-based Auto Deploy.
  • VCF Automation Pipelines. Not available in VCF Automation 9, including after an upgrade from 8.x (KB 378424). Workflows that trigger or read pipelines need another home.
  • Orchestrator-specific removals. Lifecycle Manager integration, the Wavefront integration, the license endpoints and the legacy vracli vro vcoin commands are gone. Scripts outside Orchestrator that call these need updating.
  • Basic authentication. Basic auth to the Orchestrator REST API is not officially supported on 9.x. External scripts and pipelines that call /vco/api with a username and password should move to token-based authentication.

🚨 In-place upgrades only: after upgrading Aria Automation Orchestrator 8.18.1 to 9.0, vSphere authentication can fail and nobody can log in to the Orchestrator client. KB 404356 describes the fix (reconfigure vSphere authentication manually). Read it before the maintenance window.

Pre-migration checklist

  1. Note the exact 9.x build you’re moving to, and run the Rhino probe script above on it.
  2. Export your 8.x packages and search them for prototype assignments (.prototype.), the new reserved words used as variable names (var let, var class, var enum, var yield, var await) and hand-written JSON with trailing commas.
  3. List every polyglot action and action environment with its runtime, and compare against /vco/api/server-configuration/polyglot-runtimes on the target.
  4. Search Python code for the removed modules (cgi, crypt, telnetlib, pipes, imghdr, asyncore, smtpd, imp), Node.js code for util.is* and crypto.createCipher, and PowerShell code for PowerNSX and PowervRA.
  5. List the plug-ins your workflows use, including third-party ones, and confirm each one exists on 9.x. Check any class or method you’re unsure about.
  6. Find workflows that automate deprecated features (Auto Deploy, Host Profiles, Pipelines) and plan their replacement.
  7. Find external callers of the Orchestrator API that use basic auth.
  8. Copy over system properties you set on 8.x, such as Java class access.
  9. For an in-place upgrade, read KB 404356 first.

Wrapping up

The JavaScript side of a vRO 8 to 9 migration is mostly painless, as long as you watch for sealed prototypes and the new reserved words. The polyglot runtimes are where the real work is: Python, Node.js and PowerShell all jumped several versions at once. Run the checks above against the exact 9.x build you’re moving to, and fix what they find before the migration rather than after.

Did your migration hit something I haven’t listed? Let me know in the comments and I’ll add it.


Discover more from Cloud Blogger

Subscribe to get the latest posts sent to your email.

Enjoyed this post?

Was this helpful?

Leave a Reply