Posts Tagged ‘Vmware’

Unable to establish CIM session with ESX server: The remote server returned an error: (501) Not Implemented.

Looking in 

cat /var/log/messages

We see Cipher Errors , SHA-1 was decomissioned in window with a windows update

Ciphers Support : https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1018510

4.1 is Out of Support as of Last year : https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2039567

Need to update Vmware

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

The below command needs to be run on Each Host , it  will remove the old one and install the new one

esxcli software vib install -d https://update.nimblestorage.com/esx6.5/ncm/index.xml

The host then needs to be rebooted to install

You can add https://update.nimblestorage.com/esx6.5/ncm/index.xml , as an update location via Update Manager in Vmware Vcenter Server and Add a Host Basline Extension , then remediate this to the hosts as well

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Powershell script to list machines running  the out of date e1000 Adapter in Windows so you can update them to VMXnet3 !

Get-VM |
 
Where{(Get-NetworkAdapter -VM $_ | where{$_.Type -eq 'e1000'}) -and (Get-VMguest -VM $_ | Where-Object {$_.OSFullName -like "*Windows Server*"})} |
 
Select Name,@{N='vCenter';E={$_.Uid.Split('@')[1].Split(':')[0]}}

 

 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Enabled SSH Login on your VCenter Appliance ( this can be done through the GUI or via Direct Console Access )

Run the below commands replacing username and snmp servername

snmp.set --users username/-/-/none
snmp.set --communities liability
snmp.set --v3targets snmpservername@161/username/none/trap

 

This command will show you all the current settings

snmp.get

 

VN:F [1.9.22_1171]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

After I found HP’s version of 6.5 wasn’t stable yet : http://pariswells.com/blog/random/hp-vmware-6-5-psod 

We needed to roll back to v6 UP2

You can usually do this if you’ve done an upgrade by Pressing SHIFT and R on the Vmware load screen and roll back to the old version. For some reason the upgrade process had not set a restore point so we will have to do this manually.

I did try the below method of backing up and restore the config files , however this does not work between versions 🙁 

 

vicfg-cfgbackup.pl --server ESXi_host_IP_address -s backup.tgz
 
vicfg-cfgbackup.pl --server=ESXi_host_IP_address --username=root -l backup.tgz
 
vicfg-cfgbackup.pl --server=ESXi_host_IP_address --username=root -r

So we will have to do this manually

Settings to copy down before reinstall.

  1. IP/Subnet/Gateway and DNS of Server
  2. All VSwitch Configurations ( Names , Vlan ID’s ) as well as VKernel IP’s
  3. Make sure if your using NFS You get the paths for these , also check the VSwitch Active Active Settings ( E.g. IP Hash ) 
  4. Scratch Disk Locations ( Click the Configuration tab, then click Advanced Settings under Software. Ensure that Syslog.global.logDir  )
  5. NTP Settings

Reinstall server from scratch and reenter manually

 

VN:F [1.9.22_1171]
Rating: 4.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

ESX Version 5

You need to use the CLI to edtit this per below : 

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> get-vmho

stsnmp | set-vmhostsnmp -enable:$true -readonlycommunity @(“%communityname%”) -addtarg

et -targetcommunity ‘%communityname%’ -targethost ip.ip.ip.ip

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> get-vmho

stsnmp | test-vmhostsnmp

 

ESX version > 5

 

esxcli system snmp set --communities %communityname%
 
esxcli system snmp --targets ip.ip.ip.ip@162/%communityname%
 
esxcli system snmp set --enable true
 
esxcli system snmp test
 
/etc/init.d/snmpd restart

 

 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

 

Use this command on the host to check for Power-On Reset Errors

grep vob.scsi.scsi.scsipath.por /var/log/vobd.log

e.g.

Note – ESXi uses UTC for its timezone so minus 5 hours to match EST

These should corrolate with Event log

Source multiple Errors/ Disk and LSI_SAS

“need to be taken offline to perform a Full Chkdsk”

Resolution

Migrate machine to new host to still see it happens and update all firmware and Vmware version before Vmware Support tell you to! 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

 

rdm_basic1It might be worth checking if these still need to be RDM’s. This was previously used for older versions of VMDK’s could only use 2TB , now with esx 5.5 and Virtual Machine hardware 10 this is upped to 62TB

Changed Pysical RDM to Virtaul RDM to VMDK’s

Use the webclient for this

1) Shutdown the server
2) Upgrade the Virtual Hardware to 10
3) Remove the Physical RDM Lun
4) Re-Add the Lun as Virtual
5) Power on server
6) Storage VMotion to New SAN

 

FYI Virtual RDM’s cannot be resized without shutting down the machine unlike Physical 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

vmware_view_pilot-5132020[1]

  1. Login to the host where the virtual machine lies and try and do a snapshot via here instead of VCentre
  2. If Take Snapshot is greyed out on the host , then check the settings of the device for :
  • Does it have an PCI Devices cards mapped to it? E.g. for Use of Tape Drives. If so these will need to be removed as Vmware doesn’t support snapshotting these.
  • Does it have any physical mapped Drives to it instead of virtual , again is not supported for snapshotting
    1. Try shutting down the VM to see if you can snapshot it shutdown insteaf of powered off
  1. Restart the Management Agents on the hosts
VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

 

Run Vmware Powercli

Run 

Connect-ViServer %name of server%

Run the output of below to a text file

E.g. .\Get-PendingUpdate.ps1 | Output-File file.txt

 

Function Get-PendingUpdate { 
<# 
.SYNOPSIS 
Retrieves the updates waiting to be installed from WSUS 
.DESCRIPTION 
Retrieves the updates waiting to be installed from WSUS 
.PARAMETER Computer 
Computer or computers to find updates for. 
.EXAMPLE 
Get-PendingUpdates 
 
Description 
----------- 
Retrieves the updates that are available to install on the local system 
.NOTES 
Author: Boe Prox 
Date Created: 05Mar2011 
#> 
 
#Requires -version 2.0 
[CmdletBinding( 
DefaultParameterSetName = 'computer' 
)] 
param( 
[Parameter( 
Mandatory = $False, 
ParameterSetName = '', 
ValueFromPipeline = $True)] 
[string[]]$Computer 
) 
Begin { 
$scriptdir = { Split-Path $MyInvocation.ScriptName –Parent } 
Write-Verbose "Location of function is: $(&$scriptdir)" 
#Create container for Report 
Write-Verbose "Creating report collection" 
$report = @() 
} 
Process { 
ForEach ($c in $Computer) { 
Write-Verbose "Computer: $($c)" 
If (Test-Connection -ComputerName $c -Count 1 -Quiet) { 
Try { 
#Create Session COM object 
Write-Verbose "Creating COM object for WSUS Session" 
$updatesession = [activator]::CreateInstance([type]::GetTypeFromProgID("Microsoft.Update.Session",$c)) 
} 
Catch { 
Write-Warning "$($Error[0])" 
Break 
} 
 
#Configure Session COM Object 
Write-Verbose "Creating COM object for WSUS update Search" 
$updatesearcher = $updatesession.CreateUpdateSearcher() 
 
#Configure Searcher object to look for Updates awaiting installation 
Write-Verbose "Searching for WSUS updates on client" 
$searchresult = $updatesearcher.Search("IsInstalled=0") 
 
#Verify if Updates need installed 
Write-Verbose "Verifing that updates are available to install" 
If ($searchresult.Updates.Count -gt 0) { 
#Updates are waiting to be installed 
Write-Verbose "Found $($searchresult.Updates.Count) update\s!" 
#Cache the count to make the For loop run faster 
$count = $searchresult.Updates.Count 
 
#Begin iterating through Updates available for installation 
Write-Verbose "Iterating through list of updates" 
For ($i=0; $i -lt $Count; $i++) { 
#Create object holding update 
$update = $searchresult.Updates.Item($i) 
 
#Verify that update has been downloaded 
If ($update.IsDownLoaded -eq "True") { 
$temp = "" | Select Computer, Title, KB,IsDownloaded 
$temp.Computer = $c 
$temp.Title = ($update.Title -split('\('))[0] 
$temp.KB = (($update.title -split('\('))[1] -split('\)'))[0] 
$temp.IsDownloaded = "True" 
$report += $temp 
} 
Else { 
$temp = "" | Select Computer, Title, KB,IsDownloaded 
$temp.Computer = $c 
$temp.Title = ($update.Title -split('\('))[0] 
$temp.KB = (($update.title -split('\('))[1] -split('\)'))[0] 
$temp.IsDownloaded = "False" 
$report += $temp 
} 
} 
 
} 
Else { 
#Nothing to install at this time 
Write-Verbose "No updates to install." 
 
#Create Temp collection for report 
$temp = "" | Select Computer, Title, KB,IsDownloaded 
$temp.Computer = $c 
$temp.Title = "NA" 
$temp.KB = "NA" 
$temp.IsDownloaded = "NA" 
$report += $temp 
} 
} 
Else { 
#Nothing to install at this time 
Write-Warning "$($c): Offline" 
 
#Create Temp collection for report 
$temp = "" | Select Computer, Title, KB,IsDownloaded 
$temp.Computer = $c 
$temp.Title = "NA" 
$temp.KB = "NA" 
$temp.IsDownloaded = "NA" 
$report += $temp 
} 
} 
} 
End { 
Write-Output $report 
} 
}
 
 
$GetVM = Get-VM | 
Where {$_.Guest -match 'windows'} | 
Where {$_.PowerState -eq 'PoweredOn'}
 
Foreach ($vm in $GetVM)
{
$vm.Name
Get-PendingUpdate -Computer $vm.Guest.IPAddress[0]
}

 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)