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.

Wednesday, 26 July 2017

Connection limit reached in Windows Server

Windows server allows only 16384 connections to be open, if you need the maximum then run this:

netsh int ipv4 set dynamicport tcp start=1025 num=64510

To check this has worked correctly run this:

netsh int ipv4 show dynamicport tcp

Tuesday, 15 November 2016

Server core - assign static IPs on command line

First determine your interface names for multiple NICs:

netsh int ipv4 show interfaces

Next assign IP details to the interface name you require:

netsh interface ip set address "Ethernet1" static

Thursday, 3 November 2016

Removing Hyper-V role from Server 2012 R2 free edition

In powershell run this:

Remove-WindowsFeature -Name Hyper-V

This will then allow the free Starwind license to be installed on this free version of Windows as the role isn't recognised anymore.

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

vCentre 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.