vCenter

 View Only
  • 1.  VMimages symlink getting deleted with updates

    Posted May 12, 2014 08:51 AM

    Hello,

    I have VCenter 5.1,  I have iso images locted on a datastore, to make them available for users i create a symlink in "/vmimages". So far everything is working great BUT everytime a host is updated i get that symlink deleted, which means i have to log in via SSH to recreate them manualy on each server.

    1. Is there a way to prevent that symlink in "/vmimages" from being deleted by updates ?

    2. If not can i automate the creation of the symlink after updates?

    Thank you.



  • 2.  RE: VMimages symlink getting deleted with updates

    Posted May 15, 2014 08:49 AM

    So far this is what i implemented may be it will be useful for others (not tested with an upgrade or patching yet)

    Add the below script to "/etc/rc.local.d/local.sh" to run during boot (ESXi 5.1)

    # Create ISOs symlink if deleted by update

    SymLink='/vmimages/ISOs'

    Destination='/vmfs/volumes/datastore_3/vmimages'

    Name='ISOs'

    if [ ! -L $SymLink ]

      then

       ln -s $Destination $Name

    fi

    #-------------------