Category Archives: vSphere

vSphere Posts

Upgrade vCenter 6 to 6.5

Another quick post to run through the migration steps to move from VCSA 6 to VCSA 6.5. I know this is only a simple one but I find it’s sometimes best to run through things again.

Mount the VCSA 6.5 ISO, and then browse the iso to (driveletter):\vcsa-ui-installer\win32\Installer.exe

Once the installer opens select Upgrade:

As the next page explains, what we are going to do is deploy a new appliance, with a temporary IP address and the migrate the data to the new appliance and then we complete the upgrade

Accepts the EULA

Connect to the source vCenter

Fill out the account details, and the address details for the target ESXi host or target vCenter.

Once you click next, the application will start validating, you should note here when I did this the validation process took quite a while but that was probably due to the performance of the lab I am running

Once validation completes, select the target ESXi host or vCenter to deploy the new vCenter too

If you choose to deploy to a vCenter you can select the datacentre and folder the new appliance should reside

You then need to select a compute resource to deploy the appliance too

Select your deployment size

Select the datastore where the appliance should be deployed to

Select the network and the give the appliance a temporary IP configuration

Review your settings and then click finish to start deployment

Its not the speediest in my lab but it does get there eventually

Oh no disaster the deployment failed…….the below error was pulled from the logs

error: sourcePrecheck: error in getting source Info: ServerFaultCode: A general system error occurred: vix error codes = (1, 4294967292).

Turns out its nothing too sinister…the root password on the source vCenter had expired, fix that and carry on.


Now connect to the source vCenter server, that we are upgrading/migrating from

Oh no another disaster……turns outs there was a duplicate portgroup name, change it and crack on see the article below for more details


Select the data you want to migrate across to the new appliance

Review the settings and click Finish to start the migration

I must admit mine took ages, again this is due to the poorly spec if this particular lab anyway hope this helps someone out I left the errors in just so you can see what I experienced when running through my upgrade

Facebooktwittergoogle_pluslinkedinby feather

PowerCLI Validation Quick Scripts

I recently built a vSphere platform, and following completion of the build I was required to perform testing, and also validate that the build matched the design documents, rather than screen print a load of images for each host etc, I used PowerCLI to get the settings for me so I could compare them with the design document. I am just going to put a list of the commands, there’s nothing overly complicated or even elegant here, but they might come in handy for someone.

Get Hosts Build Numbers

Get-VMHost | Select Name,Version,Build sort-object name

Check hosts are joined to a domain

Get-VMHost | Get-VMHostAuthentication | Select-Object VMhost,DOmain,DomainMembershipStatus | Sort-Object VMhost

 Get DRS Status

Get-Cluster  Select-Object Name,DrsEnabled,DrsMode,DrsAutomationLevel

 Get Lockdown mode status

Get-View  -ViewType  HostSystem  Select
Name, @{N=“Version”;E={$_.Summary.Config.Product.Name}}, @{N=“State”;E={$_.Runtime.ConnectionState}}, @{N=“LockedMode”;E={$_.Config.AdminDisabled}} |
Where { $_.Version -match “i”} Sort-Object  Name

 Check if ESXi Shell is running on hosts

Get-VMHost Get-VMHostService  Where { $_.Key -eq “TSM”} | Select-Object VMhost,Key,Label,RUnningSort-Object VMHost

 Check is SSH Service is running on hosts

Get-Cluster | Get-VMHost | Get-VMHostService Where { $_.Key -eq “TSM-SSH”} Select-Object VMhost,Label,RunningSort-Object VMHost

 Enable SSH on all hosts

Get-Cluster | Get-VMHost | Foreach { Start-VMHostService -HostService ($_ | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} ) 


 Get Cluster HA Status

Get-Cluster | Select-Object Name,HAEnabled,HAAdmissionControlEnabled,HAFailoverLevel,HAIsolationResponse,HARestartPriority

 Get HA Reservations

Get-Cluster clustername | Select-Object Name,@{N=“CpuFailoverResourcesPercentage”;E={$_.ExtensionData.Configuration.DasConfig.AdmissionControlPolicy.CpuFailoverResourcesPercent}},@{N=“MemoryFailoverResourcesPercentage”;E={$_.ExtensionData.Configuration.DasConfig.AdmissionControlPolicy.MemoryFailoverResourcesPercent}} |
Sort-Object Name | ft -AutoSize

 Get Host Multipath policy

Get-VMHost | Get-ScsiLun | Select-Object VMhost,CanonicalName,LunType,MultipathPolicy | Sort-Object VMhost

 Get Storage IO Control Status

Get-Datastore | Select Name,StorageIOControlEnabled

 Get Scratch partition settings

Get-VMhost | Get-AdvancedSetting -Name “ScratchConfig.ConfiguredScratchLocation” | Select-Object Entity,Name,Value | Sort-Object Entity

 Check Syslog allowed through firewall

Get-VMHost | Get-VMHostFirewallException | where {$_.Name.StartsWith(‘syslog’)}

 Check vLAN Port taggings on Portgroups

$esxihosts = Get-VMHost

foreach($esxihost in $esxihosts){

Get-VirtualPortGroup -VMHost $esxihost | select $esxihost.Name,Name, VirtualSwitch, VLanId


 Check DNS Resolution for all hosts (from list of hosts in text file)

$hosts = Get-Content C:\SDCHosts.txt

Foreach ($element in $hosts){
Resolve-DnsName $element 


 Get VAAI Plugin status

Get-VMHost | Get-AdvancedSetting -Name DataMover.HardwareAccelerated*, VMFS3.HardwareAccelerated* | Select-Object Entity,Name,Value | Sort-Object Entity

 Get time server status

Get-VMHost | Sort Name | Select Name, @{N=“NTPServer”;E={$_ |Get-VMHostNtpServer}}, ` Timezone,

$_.ExtensionData.ConfigManager.DateTimeSystem) | Foreach {$_.QueryDateTime().ToLocalTime()}}}, `

@{N=“ServiceRunning”;E={(Get-VmHostService -VMHost $_ |Where-Object {$_.key-eq “ntpd”}).Running}} `

Facebooktwittergoogle_pluslinkedinby feather

Deploying vCenter 6 Appliance (VCSA) from ISO

So just a quick run through on how to deploy the vCenter Virtual Appliance. You’ll need to obviously get the VCSA ISO, and then pre-create the DNS settings for the new vCenter.

OK so now you have the ISO mount it and you will need to install the VMWare Client Integration Plugin which is included on the ISO

The installer is pretty much just a next, next finish! You will need to accept the EULA, and accept the installation location (or specify a new one should you desire)

OK once the Plugin has installed we can crack on with the vCenter Installation

Browse to the root of the ISO and click on the vcas-setup.html file

You may need to allow the Integration Plugin to allow in the browser but as long as it install OK you should be greeted with the following page

As I am performing a new installation I select “Install”

Accepts the EULA

Specify the host (FQDN or IP) of where you want to deploy the vCenter Appliance

Accept the certificate

Specify the appliance name and the root password

As this deployment is for my home lab I am going to deploy the vCenter Server with an Embedded Platform Services Controller

Configure you SSO Domain and Password

And then configure your appliance size, I am using “Tiny” deployment for my home lab

Select your data store

Select you database, currently the vCenter Appliance on supports Oracle as an external database, and I’ll be using the embedded database for my lab

Configure your network

Check your summary and then click finish

Let the installer complete and voila!!! You have deployed your vCenter 6 Appliance


NOTE!!! After I had deployed my appliance I had some issues with adding the appliance to the domain the error I was getting was

Idm client exception: Error trying to join AD, error code [11], user

For a resolution to this issue, visit this fantastic blog, I ran through this and low and behold it worked a treat.


Facebooktwittergoogle_pluslinkedinby feather

PowerCLI Get Free Disk Space info from VMs

This script exports all information regarding free disk space on all VMs on your vCenter. This will only work on Powered on VM’s with VMTools installed and running.

Add-PSSnapin VMware.VimAutomation.Core

Connect-VIServer -Server vCenterServer

$MyCollection = @() 

$AllVMs = Get-View -ViewType VirtualMachine | Where {-not $_.Config.Template} 

$SortedVMs = $AllVMs | Select *, @{N="NumDisks";E={@($_.Guest.Disk.Length)}} | Sort-Object -Descending NumDisks


 ($VM in $SortedVMs){ 

$Details = New-object PSObject

$Details | Add-Member -Name Name -Value $ -Membertype NoteProperty

$DiskNum = 0

Foreach ($disk in $VM.Guest.Disk){ 

$Details | Add-Member -Name "Disk$($DiskNum)path" -MemberType NoteProperty -Value $Disk.DiskPath 

$Details | Add-Member -Name "Disk$($DiskNum)Capacity(MB)" -MemberType NoteProperty -Value ([math]::Round($disk.Capacity / 1MB)) 

$Details | Add-Member -Name "Disk$($DiskNum)FreeSpace(MB)" -MemberType NoteProperty -Value ([math]::Round($disk.FreeSpace / 1MB)) 

$Details | Add-Member -Name "Disk$($DiskNum)Free%" -MemberType NoteProperty -Value ("{0:p2}" -f ($disk.FreeSpace / $disk.Capacity)) 


 } $MyCollection += $Details


$MyCollection | Export-Csv -NoTypeInformation "C:\FreeDiskSpaceInfo.csv" 

Facebooktwittergoogle_pluslinkedinby feather