Correcting Multi Path Policy

Posted Leave a commentPosted in Script, VMware

Correcting Multi Path Policy(MPP), is some thing i had to do recently – The story goes… The storage team had brought in a new storage array/vendor and started making datastores from that, now a few hundred datastores later, someone noticed that some path where highly utilized while others again was hardly used at all. So after looking into this, it was desisted to change the Multi Path Policy to RoundRobin as per the vendors recommendations and best practices. While making the script for this I noticed that some local disks were already set to RoundRobin where they were suppose to be […]

Bulk create vSwitch networks

Posted Leave a commentPosted in Script

I blogged a bit about this in the Consolidating datacenters post. As part of moving a customers VM’s in to our datacenter, the network and storage was streched and host deployed in our datacenter was presented to the customeres vCenter, so that it was a simple (s)vMotion, that was all that was needed to move the VM’s from customer site to our datacenter. Simple, fast and effective. All this was only possible because the customer still used the standard vSwitch – As our datacenter uses the distributed virtual switch, I created this script in order to stadalize how network was created […]

Reset VM reservations and limits

Posted Leave a commentPosted in Script

I was moving a customers VM’s from their site via vMotion into our datacenter, and one of the problems you can run into is with reservations and limits. There may have been valid reasons for having limit and reservations, but they can also be the root of performance problems. As this was not the case with this customer, I created the one liner below in order to remove the reservation and limits.  

Batch rename of VMs

Posted 1 CommentPosted in Script

The other day a consultant came by my desk. He had a problem, the 400 VMs we just move from the customer site in to our datacenter; The backup jobs were failing for most of the VMs. He had looked into it and it turns out that Symantec Netbackup, which is what is used, is case sensitive and the VM names were all a mix of low, high and low and high cases. So the backup team had to recreate the backup jobs, but before they did that, the consultant asked if it wasn’t possible to rename all of the […]

Unmount datastore

Posted Leave a commentPosted in Script

Was at VMUGDK the other day listen to Paudie O’Riordan to one of his great session on storage troubleshooting – He was talking about how to remove datastores safely and this script that I’ve created for our storage team earlier this year came to mind.   The script reli on William Lam‘s powershell module which can be found here http://blogs.vmware.com/vsphere/2012/01/automating-datastore-storage-device-detachment-in-vsphere-5.html The script has four options; list, unmount detach and all – The first three is self explanatory and the latter simply does all three, first it unmounts the datastore, then it detaches the datastore and lastly it list the datastore to verify […]

Consolidating datacenters

Posted 1 CommentPosted in Script, VMware

There is truly many ways and approaches to do server/datacenter consolidation… What i’m sharing here is just one way to do it, for one customer. But it has been done in so many ways for other customers – simple p2v and v2v from customer site in to the datacenter and onto more advanced approaches where some of the data is mirrored in via SAN replication/mirror and the rest is p2v or v2v’ed into datacenter. Like i said there are many ways to do this… What is this project, well quite simple it’s all about moving 800 VMs from one datacenter […]

Validate/change SSH access to ESXi hosts

Posted Leave a commentPosted in Script

This is another script that I’ve posted earlier this year on twitter and pastbin.   This script is very basic, it enables you to get the SSH status of a given vCenter or change it. It takes multiple input, meaning you will be able to stop and disable the service on all host with one command – Aswell as start or view the status of the hosts.   This should cover most use cases. An example would be to stop and disable the SSH service and then list new state in order to valid it. As it can be seen […]