addVMAnnotation.pl

Version 4

    This script allows you to set 'annotation' field for a specific VM when connecting to either ESX(i) or vCenter host.

    Note: This script was generated using the same snippet of code as addVMAdvParamOption.pl

    UPDATE: This script has been updated to support updating multiple  VMs and specifically setting text with line breaks within the  annotation field.

    Requirements:
    ESX(i) 3.5 or 4.0 or vCenter 2.5 or 4.0
    vSphere SDK for Perl or vMA

    Let's say you have two VMs: vm-zeroedthick and vm-thin and you want the following text and format to appear within the annotation field:

    vm-zeroedthick

    VMware
    is
    Cool!vm-thin
    If you like this script
    you should visit
    http://engineering.ucsb.edu/~duonglt/vmware/
    and
    http://communities.vmware.com/docs/DOC-9852


    You will need to create an input file that has the following format:

    <vmname1>###"line1==line2==line3==line4"
    <vmname2>###"line1==line2==line3==line4==line5"
    <vmname3>###"line1==line2==line3"
    

     

    Here is the sample input file that'll be used to demo the script:

    [vi-admin@scofield ~]$ cat vm_annotation_file
    vm-zeroedthick###"VMware==is==Cool!"
    vm-thin###"If you like this script==you should visit==http://engineering.ucsb.edu/~duonglt/vmware/==and==http://communities.vmware.com/docs/DOC-9852"
    

     

    Sample Execution:

    annotation_script.png