Virtu-Al.Net

Virtually everything is poshable

August, 2009

PowerCLI: Mass provision datastore’s

At the moment I am adding around 50 datastore’s to a host, now whilst I love using the great Virtual Infrastructure Client wizard to do this after adding two of the 50 i remembered what someone said (can’t remember who)….. If you do something more than once, script it. So guess what I did…. The [...]

, ,

PowerCLI: One-liners last 10 VMs created and removed

I was asked if it was easy enough to get a list of the last 10 VMs created in a virtual Infrastructure, the answer is yes, its a one-liner ! To list the last 10 VMs created, cloned or imported use the following: Get-VIEvent -maxsamples 10000 |where {$_.Gettype().Name-eq "VmCreatedEvent" -or $_.Gettype().Name-eq "VmBeingClonedEvent" -or $_.Gettype().Name-eq "VmBeingDeployedEvent"} [...]

, ,

PowerCLI: Number of vCPUs in a cluster

Inspired by Jason Boche’s article: http://www.boche.net/blog/index.php/2009/08/18/hidden-virtual-cpu-limit-restriction-in-esx-3-5/ and also William Lam’s Perl Script (http://communities.vmware.com/docs/DOC-10556).  I decided to re-create this in PowerCLI. If you haven’t seen William’s scripts, I strongly suggest you check out the Perl Sample code where he stores them here: http://communities.vmware.com/community/developer/codecentral/vsphere_perl, he has been coding mad recently and turning out some really good stuff. [...]

, ,

Daily Report – iPhone Version

If you are using my Daily Report script and want a nice output I have just received a cool tip from NiTRo over at http://www.hypervizor.fr He explained how to alter the script to get it looking nice on the iPhone, check out the before and after: Before After

, ,

PowerCLI: Daily Report V2

Firstly I would like to thank everyone who took the time to comment on my previous Daily Report script, I really appreciate the feedback and have never had so many comments ! Now onto V2… This one will take a while longer to run than the last script but as its a scheduled task we [...]

, ,

PowerCLI: Reading host log files

Recently I needed to check the vmkernel log file on a host for any errors relating to a disk issue I was having, I did this in the normal way of using putty to get to my server and then a cat /var/log/vmkernel.  That is one way of doing it but did you know you [...]

, ,

PowerCLI: Processor Types

Ever wanted to check the hosts in your vCenter to make sure they are all the same type, you can use the following one liner to do this: Get-VMHost | Sort Name | Get-View | Select Name, @{N=“CPU“;E={$_.Hardware.CpuPkg[0].Description}} | Export-Csv c:\cpuinfo.csv Sample Output: Name CPU tesesx01.mydomain.com Intel(R) Xeon(R) CPU 5160 @ 3.00GHz tesesx02.mydomain.com Intel(R) Xeon(R) [...]

, ,

vSphere 4.0 Quickstart Guide

For a while now I have been writing a book with a number of other people from the VMware community: Duncan Epping Chad Sakac Thomas Bryant Stu Radnidge Dave Mishchenko This book has been designed to be an affordable pocket size book, ideal for quick tips and how-to’s and of course it is full with [...]

PowerCLI: Do you have the time ?

Sorry for the lack of updates recently, I have been on vacation.  I thought I would ease myself back in with a quick one-liner. We had an issue on one of our esx hosts today and when I went to check the logs I noticed the time was out, on further checking the server the [...]

, ,