VMUtils - Global

Provides utility functions for discovery and provisioning of virtual machines.

The VMUtils class is available in server-side scripts to convert between UUID and Correlation ID formats.

VMUtils - turnCorrelationIdToUuid(String correlationId)

Converts a correlation ID into a UUID for a virtual machine in the ServiceNow system.

Table 1. Parameters
Name Type Description
correlationId String The correlation ID to convert
Table 2. Returns
Type Description
String The UUID, or an empty string if invalid.

var vmu = new VMUtils();
gs.print(vmu.turnCorrelationIdToUuid('42 10 82 82 62 35 ca 68-b5 1c 1e f8 5c 0a 0d 5b'));

VMUtils - turnUuidToCorrelationId(String uuid)

Converts a WMware universal unique identifier (UUID) to a format that matches the original format in the ServiceNow system.

vCenter works with UUIDs where the ESXi Linux console worked with this format.

Table 3. Parameters
Name Type Description
uuid String The UUID to convert.
Table 4. Returns
Type Description
String The identifier converted to the ServiceNow format.

var vmu = new VMUtils();