Adding the same annotations to multiple vmx files?

Here is a script you can run on the ESXi host to add an annotation into multiple vmx files: SAVEIFS=$IFS IFS=$(echo -en "\\n\\b") for i in \`find /vmfs/volumes/ -name \*.vmx\` do echo Filename:$i echo Backing up VMX... cp $i $i.bak echo Backup complete... echo adding the annotation: echo "annotation = \\"<Fill the annotation text here without the angle braces>\\"" >> $i echo Update done... read -p "Hit any key to continue....

October 18, 2011 · 1 min · Jahnin Rajamoni

Script to modify a parameter in multiple files

I had to change the svga.vramsize paramter across multiple vmx files on multiple datastores. So here is how i got it done: SAVEIFS=$IFS IFS=$(echo -en "\n\b") for i in `grep -l -i ‘svga.vramSize = "40968192"’ /vmfs/volumes/*/*/*.vmx` do echo Filename:$i echo Backing up VMX... cp $i $i.bak echo Backup complete... echo Current Parameter: grep -i svga.vramsize $i echo Updating VMX... sed -i 's/svga.vramSize = "40968192"/svga.vramSize = "31457280"/g' $i echo Update done... echo New Parameter: grep -i svga....

October 18, 2011 · 1 min · Jahnin Rajamoni

Secure Copy

Secure Copy or scp copies files between hosts on a network. It uses ssh for data transfer, and uses the same authentication and provides the same security as ssh. Syntax to copy a file from one linux host to another host that has ssh enabled: scp -v [path to local file] [remote server username]@[hostname/IP]:/[Destination Folder Path] ``` For e.g.: ``` scp -v /tmp/test.txt root@192.168.1.2:/root/ ```

May 11, 2011 · 1 min · Jahnin Rajamoni

There are stopped jobs?

Seen this error, There are stopped jobs, when exiting/logging out of the terminal window? Well, as I’ve come to know, this is to do with linux jobs. In order to see the current stopped jobs, type the command, jobs To send an existing program that you are working on to the background and continue working at the shell prompt, use, ctrl+z. To continue with the program that you have sent to the background, use the command, fg ....

April 12, 2011 · 1 min · Jahnin Rajamoni