# by Allan Christiansen/2008 on esx 3.5.0 Update 1#for PATHS in 2 4 6 8 10 12 14 16doSTPATHS=${PATHS}COUNTER=${RANDOM}while [[ ${COUNTER} -gt ${PATHS} ]];doCOUNT=`expr ${COUNTER} / ${PATHS}`COUNTER=${COUNT}donefor LUN in $(esxcfg-mpath -l | grep "Disk" | grep "has ${STPATHS} paths" | awk '{print $2}')doesxcfg-mpath --lun=${LUN} --path=$(esxcfg-mpath -q --lun=${LUN} | grep FC | awk '{print $4}' | awk '{print NR "S\t " $0}' | grep ${COUNTER}S | awk '{print $2}') --preferredCOUNT=`expr ${COUNTER} + 1`COUNTER=${COUNT}if [[ ${COUNTER} -gt ${STPATHS} ]]thenCOUNTER="1"fidonedone
Saturday, June 21, 2008
ESX LUN Load balance
Thursday, June 19, 2008
Windows Vista Power Button
Changing these values will resolve this idiotic default idea that MS came up with of pressing the power button and it going to sleep....
Another way is in the advanced power settings.
I hope that this can help you out a bit.
Tuesday, June 17, 2008
Vmware ESX
I have for some time been using vmware ESX and found that the software from them is perfect for the growing IT environment that exists in a majority of companies. But i also discovered that managing an environment that is growing fast needs a lot of care and strict procedures. e.g. with vmware there is a possibility to move a vm from one host to another host without user interruption. This is sadly only possible if the cdrom drives are not locked to a iso or otherwise occupied.
I found that running this small powershell script helps alot on that.
Get-VM Get-CDDrive ? { $_.ConnectionState.Connected -eq "true" } Set-CDDrive -Connected:$false -Confirm:$false
This also is a great small script to have in mind when evacuating an ESX. there's nothing more annoying than the last vm will not evacuate because of a mounted cdrom drive or a not ended tools install.
BTW. Thanks alot to Microsoft for the powershell. And for vmware for implementing it in such a great fashion.
Thursday, June 5, 2008
Just another IT Blog? or
Yes and no. Yes its a IT blog. and no this is one where i will share the small scripts, gadgets and sniplets i create or piece together from my daily work and travels around the net.
So who am I:
Name : Allan Christiansen
Age : 37 at the moment (Born 1970)
Experience : 20 years of Professional IT. Mostly with Microsoft products but i have also worked some time with Linux. Lately I have worked alot with vmware.
Exams : MCSE 2003 : Messaging / MCSE 2003 : Security / MCTS SQL 2005 / MCP
Hope to see you all around and please have fun while working. It makes it easier to relax.