Posts Tagged ‘Vmware’

Enable SSH on the ESXi Machine and run the following

esxcfg-info | grep "Serial N"

If this doesnt work then you can use something like this in powershell however it needs Vcenter and Vsphere CLI

Get-VMHost | Select Name,
    @{N='Serial';E={(Get-EsxCli -VMHost $_).hardware.platform.get().SerialNumber}} |
Export-Csv serial.csv -NoTypeInformation -UseCulture
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Recently a customer had filled up their free SQL Express Database with Events and Tasks from Vmware. The Hosts has both gone to Disconnected with error

cannot synchronize host cannot contact the specified host

and when trying to re-add the error would be displayed

VIM_VCDB database ‘PRIMARY’ filegroup is full

failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database.

SQL Express has a 4GB database limit, we need to clear out the old logs and don’t want to install and download SQL management studio so we need to run the below in command prompt with the same user that installed the DB or has write permissions to it!

c:> "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\OSQL.EXE" -S localhost\VIM_SQLEXP -E
1> use VIM_VCDB
2> go
1> update vpx_parameter set value='<value>' where name='event.maxAge'
2> update vpx_parameter set value='<value>' where name='task.maxAge'
3> update vpx_parameter set value='true' where name='event.maxAgeEnabled'
4> update vpx_parameter set value='true' where name='task.maxAgeEnabled'
5> go
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
1> exec cleanup_events_tasks_proc
2> go
1> dbcc shrinkdatabase ('VIM_VCDB')
2> go


The permanent solution would be to move the SQL server to a full version of SQL Server or to migrate to Vcenter Standalone server ( Hosted on Linux! ) 

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

Recently had a virtual machine show up with a disk size of 0MB in the Vmware client. The machine was still running however Veeam backups were failing.

Image result for Vmware disk size 0kb

Checking the snapshots on this machine showed there was none however opening the VM folder in the datastore showed there were loads of snapshot files.

Running a consolidate on the Vmware Snapshots , then helped list the Snapshots which could be removed by the client 

Removing the VM from the Esxi Host and re-adding this should do the same thing

***Update***

 

Also try removing the CDRom Mapping if it maps to an Inactive NFS share

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

Error: Unable to find SRA files. You must install SRA before adding or modifying an array manager.

Troubleshooting steps:

1.Took RDP to both the SRM servers.
2. Reset the administrator@vsphere.local passwords for both the VCs.
3. Performed Modify/install on both the SRM servers.
4. Reconfigured array pairing by typing the pureuser ID and password.

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

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)