Adding/updating a custom field to VM

From VI-Toolkit
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

addVMCustomField.pl

author: William Lam

Description

Allows you to create a custom field and value to the vmx configuration file of your VM.

Usage:

This will add a new custom field to all VMs called SERVER_TYPE and the operation is an add

[vi-admin@scofield ~]$ ./addVMCountCustomField.pl --server reflex.primp-industries.com --username primp --key SERVER_TYPE --operation add
Enter password:

Updates the VM named "Kate" with the value "PRODUCTION" to the custom field "SERVER_TYPE". For this, you'll use the operation update

[vi-admin@scofield ~]$ ./addVMCountCustomField.pl --server reflex.primp-industries.com --username primp --key SERVER_TYPE --value PRODUCTION --operation update --vmname kate
Enter password:

Location

http://communities.vmware.com/docs/DOC-10550