Enable SSH cluster-wide with PowerCLI

This article shows how to quickly enable SSH service on one, more or all hosts in a cluster.

Start service

Login to vCenter.

Connect-VIServer <myVC>

The command below will activate SSH on all hosts registered in in your vCenter.

Get-VMHost | Get-VMHostService | Where Key -EQ "TSM-SSH" | Start-VMHostService

TSM means “Technical Support Mode”

Stop SSH service

To stop SSH service on all hosts, use the command below.

Get-VMHost | Get-VMHostService | Where Key -EQ "TSM-SSH" |  Stop-VMHostService -Confirm:$False

Selective activation

It’s possible to limit the scope of the command to one host. Just add the FQDN after Get-Host.

Get-VMHost myESX.myDomain.local | Get-VMHostService | Where Key -EQ "TSM-SSH" | Start-VMHostService

Setup of ESXi on Cisco UCS Flexflash SD media fails

Recently I was trying to roll out an ESXi on Cisco UCS C240 which was equipped with a local twin-SD FlexFlash card. Destination disk was discovered by ESXi setup but during installation we encountered an error:

“partedUtil failed with message: Error: Can’t have a partition outside the disk! Unable to read partition table for device /vmfs/devices/disks”

Continue reading “Setup of ESXi on Cisco UCS Flexflash SD media fails”

High frequency read on VMtools image might harm SD boot media

ESXi system disks do not require a lot of storage space on their boot media. That’s the reason why many installations use small and less expensive flash media instead of disks (and SCSI controller). It can be USB flash media for example or a SD-card.

The quality and reliability of these media varies. Even from batch to batch of the same type and the same vendor. Heavy write activity, but also heavy reading may significantly shorten the lifespan of flash media. In recent times we had to witness media that failed after less than a year in service. As long as the host keeps running this isn’t a bigger problem, because all crucial components are kept in ESXi host RAM. With VMtools-Image the situation is different. Each time a VM requests access to the image it will be read from flash. Especially VDI environments have a high read rate onto VMtools-Image, which may ‘burn’ the media.

VMware is aware of the problem and has introduced a migitation of the issue starting with ESXi 6.0 U3. It is not active by default and has to be activated manually. The migitation is fairly simple. During host boot VMtools-Image will be mapped into RAMDisk. Read access will be served from RAM and the lifetime of the media will be extended.

I will show here how to activate the option with web-client, PowerCLI or ESXi shell.

Continue reading “High frequency read on VMtools image might harm SD boot media”