Welcome to the blog of mechanised.com

This blog is mainly a technical repository of information on Virtualisation tools and management for our hosting service.

Also for HP's Bladesystem that we use at both our datacentres.

Other articles are also included on .Net development and MS SQL Server as well as other interesting things we come across.

Tuesday, 31 March 2015

Installing VMWare tools on RHEL6

Install the latest repo RPM for your version of vSphere:
Find the RHEL version and 32/64 bit RPM you need and grab the link, then install with YUM:
yum install http://packages.vmware.com/tools/esx/5.5latest/repos/vmware-tools-repo-RHEL6-9.4.11-1.el6.x86_64.rpm
Install the tools for non-graphical systems
yum install vmware-tools-esx-nox
It should show up pretty quickly within the client.

Friday, 9 January 2015

vcenter tidying of SQL

A few handy queries to tidy up old records to keep the database size down.

delete from vpx_text_array
where not exists(select 1 from vpx_entity where id=vpx_text_array.mo_id);

This removes old information about operations involving entities that don't exist anymore.

Friday, 26 September 2014

Fixing orphaned jobs left on source server for DoubleTake Availability


Removing old jobs from .dat and .xml files from here:

C:\Program Files\Vision Solutions\Double-Take\Service\Data

Restarting service on source and force full mirror on VRA.

Friday, 18 October 2013

Stop expiring passwords on server core

Nice easy one, at command line enter this to stop any accounts from expiring their passwords:


Thursday, 10 October 2013

Extending root RHEL physical partition and then the underlying LV

Bit fiddly this so reminder to myself:
  • Boot into rescue mode from install DVD
  • delete partition with fdisk 
  • recreate at same start to end of disk
  • reboot
  • back into rescue
  • Then run these commands
pvresize /dev/sda2 (or 2nd partition on physical disk)
lvextend /dev/mapper/*vg_lv* -l+100%FREE (for all the disk)
resize2fs /dev/mapper/*vg_lv* (to resize FS, may take a short while)
  • Check volumes are ok with vgs/lvs
  • Reboot to double check everything boots and mounts fine

Monday, 12 August 2013

PowerCLI Script to automatically setup vCenter 5.1 Alarm Email Notification


With versions for 5.0 and 5.1.

Wednesday, 29 May 2013

How to reduce Server 2008 R2 x64 winsxs folder

dism /online /cleanup-image /spsuperseded

This freed up about 4GB on the system drive, server was upgraded to SP1 so it removed plenty of pre-SP1 files.

Thursday, 9 May 2013

Get remote HP Server serial and product number

Couple of quick powershell commands will get you what you need:

Product number
gwmi win32_ComputerSystem | select OEMStringArray

Serial number
gwmi win32_bios | select SerialNumber 

Wednesday, 16 January 2013

Manually patching vSphere 5.0 free edition

As the free edition can't use update manager a quick and easy way to patch a single host is to download the latest patch from VMWare and upload to an accessible datastore then put the host into maintenance mode.
Then enable SSH on the host, login and run:
esxcli software vib install -d /vmfs/volumes/datastore/patchfile.zip
It'll take a while and you should get results that say it's all been sucessful and you need to reboot.

Tuesday, 18 December 2012

Renaming vNICs in vSphere

It's a right pain when you change NICs within vSphere as it's numbering system messes up your carefully planned out system, so to rename them back to how you'd like you need to edit the configuration file on the host itself.
  • Put host into maintenance mode
  • SSH into host
  • Make a copy of the original file (cp /etc/vmware/esx.conf /etc/vmware/esx.conf.old)
  • Edit /etc/vmware/esx.conf
  • Find all the vmkname entries and rename them as you want, same for the pnic entries etc. depending on how complex your vSwitch setup is there may be lots more.
  • Reboot