Basically it is the same syntax (a complete example is available in the "help" section) but better output :). Planning on doing some better error catching but basically if you don't do anything wrong, everything should work. Also thinking about maybe generating some documentation from the XML... we will see :)
2011/02/19
Cheap Host Profiles Remake
I realised that setting up the host profiles before was complex. Since I was playing around with google app engine I thought to myself, lets do a remake. The result can be found here . Since I'm using GAE, I am using google API's to authenticate. Hence you can login with your gmail account. Notice that the acode part is an activation code. Please do not bookmark this url, is it just to activate your google account. Instead use this url once your account is "activated".
2011/02/17
More vMA fun
Show the states of a path for every lun
2011/01/06
Another oneliner : using esxcli to change to roundrobin
for disk in $(esxcli nmp device list | grep -B2 -e "Storage Array Type: VMW_SATP_SVC" | grep -e "^naa"); do echo "esxcli nmp device setpolicy --device $disk --psp VMW_PSP_RR";done;
Should find all SVC luns and echo the command to change the disk to round robin path policy. If you have identical ESX configs (like most clusters do), you can copy past the output to every esx host. For example
~ # for disk in $(esxcli nmp device list | grep -B2 -e "Storage Array Type: VMW_SATP_SVC" | grep -e "^naa"); do echo "esxcli nmp device setpolicy --device $disk --psp VMW_PSP_RR";done;
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000f6 --psp VMW_PSP_RR
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000f7 --psp VMW_PSP_RR
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000f8 --psp VMW_PSP_RR
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000f9 --psp VMW_PSP_RR
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000fb --psp VMW_PSP_RR
~ #
Should find all SVC luns and echo the command to change the disk to round robin path policy. If you have identical ESX configs (like most clusters do), you can copy past the output to every esx host. For example
~ # for disk in $(esxcli nmp device list | grep -B2 -e "Storage Array Type: VMW_SATP_SVC" | grep -e "^naa"); do echo "esxcli nmp device setpolicy --device $disk --psp VMW_PSP_RR";done;
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000f6 --psp VMW_PSP_RR
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000f7 --psp VMW_PSP_RR
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000f8 --psp VMW_PSP_RR
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000f9 --psp VMW_PSP_RR
esxcli nmp device setpolicy --device naa.600507680181055b18000000000000fb --psp VMW_PSP_RR
~ #
Just a fastliner
interfaceips=$(ifconfig -a| grep "inet addr" | sed 's/\s\+/ /g;s/^\s\+//;s/^inet addr://' | cut -f1 -d" ")
for ip in $interfaceips
do
echo "scp $(whoami)@$ip:$(pwd)/$1"
done
2010/12/11
Cheapass Host Profile
Small project I am working on. It is java based, so you will need to install it (see the previous post on howto use the cheapass host profile on your vma)
Cheapass host profile isn't a full replacement for Host profile. Instead it allows you to create one xml with a lot of setting in it which you can the use to generate host specific configuration scripts. You can download the package from https://sites.google.com/site/tendertechie/home/chp.tar.gz?attredirects=0&d=1
When you download the tar you will need to extract it using the following command
tar -xzvf chp.tar.gz
This will create a subdirectory cheaphostprofile. Enter it by executing
cd cheaphostprofile
In the directory there a two important things. First of all the config.xml. This is an example xml of all possible "configurations" at this point. The xml is quite easy to understand. The other thing in the directory is the run script. If you run this command a script directory should be generated with a script for each esx host you specified and a runall script to run all the other scripts. Execute it by executing the following command
./run
In the backend, the cheaphostprofile is just a "wrapper" around fmpp. This is a template engine. The added value of cheaphostprofile is the preconfigured template for a script executable in a vMA. For more information about the fmpp, go to there website (lmgtfy). The template is under chp/src/autoconfig.cfg .
Installing jre on vMA
Title says it all! I needed some java on my vMA (for a purpose I'll blogging about later on). First of all getting the JRE. You can download it from
You will need the x64 rpm
I transfered the binary to my vMA via scp, but ofcourse any other method like wget for http transfers or ftp will do.
After I got it on my vMA I chmodded it
chmod +x jre-6u22-linux-x64-rpm.bin.sh
This makes it "executable"
Then I ran the executable
sudo ./jre-6u22-linux-x64-rpm.bin.sh
You will need to enter your password so you can execute the install as root (admin)
When the installation is done, you will need to configure the JAVA_HOME variable. You can do this by executing
sh -c 'echo "export JAVA_HOME=/usr/java/latest/" >> /etc/profile'
Logging out and in should then complete the installation
2010/12/08
Youtube API via Javascript and XML
Very quick post because I am no longer in the mood of writing anything, but I just wanted to share this with the world :)
You can find everything you need in http://users.telenet.be/narcose/yt/ . Most interesting is probably the json response you can use to get more data out of the queries.
(Important, you will need to upload the html to a webserver because otherwise some callbacks from flash won't work as they would be redirected to local files and this is not allowed for some reason. Also, my code only seems to work in Safari/Firefox!)
Subscribe to:
Posts (Atom)