Monday, July 07, 2008

"Would you please submit a ticket so we can turn on the Virtual machine for you" said the System Engineer

Every body loves virtual machines, aren't you ?

I use virtual machines for development and testing, and they really save time and resources; specially when difference disks are used.

My company has a hosting environment with lost and lost (and may be lost ) of them than I know, and they guys behind those are really doing a good job keeping up with requests to create/modify/host them on Virtual Server(s).

A common thing happens, and it happens often than enough, my VMs goes off, may be the guys need to conserve some resources or spare some RAM for other VMs on the same physical servers.

Anyway, a conversation like this is repeated frequently:

Me : Hi, my VM is not working

System Engineer : Would you please submit a ticket so we can turn on the Virtual machine for you

Me : Can't it be automatically restarted

System Engineer : Oh yes, please mention this in the ticket as well

Me : Okay, thanks

System Engineer : Welcome, waiting for the ticket :)

 

I do add the ticket, and they do turn it on and set it to auto restart, but after a week every thing goes again.

So, why I am posting this, not to make you feel sad for me, but because I found something that is interesting for this issue; PowerShell.

Yes, PowerShell can be used to turn-on/off VMs on Virtual Server, but I am not yet sure if this can be done remotely, since I will need to turn-on my VM from my PC not from the server that I don't have permission on.

Goggling around, it seems feasible, a post by Ben Armstrong ; author of Professional Microsoft Virtual Server 2005 is about using COM to script Virtual Server , another post {Scripting Virtual Server with PowerShell} by Ben Pearce.

I will try to convince the guys to look at this, and may be someday I will not need to submit a ticket any more.

Sunday, July 06, 2008

Finding distinct nodes via XPath/XSLT 1.0

While XSLT 2.0 has the distinct-values function to get the unique items in a node list, XSLT 1.0 has no equivalent function.

But lots of posts out there is pointing how to use XPath 1.0 to get the same result. The one that was most useful and straight forward for me to apply was the post of Rajendra S Rawat on his blog