Posts Tagged ‘Vmware’

 
Enabling vCenter Server Data Collection
 
To enable vCenter Server data collection:
1.Connect to the vCenter Server.
2 In the Administration menu item, selectvCenter Server Settings  The vCenter Server Settings dialog is displayed.
3. Select Statistics.

 
4. Make sure that the Statistics Level value for all interval durations up to and including the one day duration is at least 2. If any of the durations have a value less than 2, do the following, starting with the smallest interval:
a) Select the interval and clickEdit
b) Change Statistics Level to Level 2
c) Click OK

 
5. Repeat step 4 for all the values up to and including the 1 day interval duration.
6. Click OK and wait for at least a day before using the aggregate usage data. Collecting Data Characteristics for VMs
You can collect data characteristics for the virtual machines in a VPG in one of the following ways:
 
Via vSphere Client console performance statistics.
 
By running a script to collect the data characteristics.
 
Note: The script samples supplied with the download, require vSphere PowerCLI and permissions to access the vCenter Server using the script.
 
8 By using operating system performance monitors, such as the Microsoft Performance Monitor utility for Windows operating systems or the iostat command for Linux operating systems. Collect data for a minimum of one day. Collecting this information impacts on performance and therefore the collection period should be long enough to gather a true representation of usage but not too long. The first procedure described below, to collect data characteristics for the VMs via the vSphere Client console performance statistics, uses
a timeframe of one day and the second procedure, to collect data characteristics for the VMs by running a scri pt to collect the data characteristics uses a timeframe of seven days.
 
Note: When running vCenter Server versions before version 5.x, if any of the virtual machines use NFS storage, metrics for the
NFS storage are not generated by the vCenter Server. To collect data characteristics for the VMs via the vSphere Client console performance statistics:
1. In the vSphere Client console select the VM and open the Performance tab.
2. Click Advanced
3 . Click the Charts Options link. The Customize Performance Chart dialog is displayed.

4. In Chart Options , drill-down in Disk and select Past day
5. In Counters , click None to clear all the selections and then select Disk Write Rate or Write Rate
6. Click OK
 
9 A chart similar to the following is generated:

Use the chart for the average write rate of the VM.
To collect data characteristics for the VMs via a script:
Note:
The following script and the samples supplied with the download, require vSphere PowerCLI and permissions to access
the vCenter Server using the script.
 
Run a script similar to the following:
 
$report = @()
Get-VM | %{
$stats = Get-Stat -Entity $ -Stat disk.write.average -Start (Get-Date).adddays(-7) –
ErrorAction SilentlyContinue
if($stats){
$statsGrouped = $stats | Group-Object -Property MetricId
$row = “” | Select Name, WriteAvgKBps, WriteAvgMBps
$row.Name = $_.Name
$row.WriteAvgKBps = ($statsGrouped |
where {$_.Name -eq “disk.write.average”} |
%{$_.Group | Measure-Object -Property Value -Average}).Average
$row.WriteAvgMBps = $row.WriteAvgKBps/1024
$row.WriteAvgKBps = “{0:N2}” -f $row.WriteAvgKbps
$row.WriteAvgMBps = “{0:N2}” -f $row.WriteAvgMBps
$report += $row
}
}
$report | Export-Csv “C:\ZertoOutput.csv”
 
 
 
 
Note: If you want a value other than seven days, change the value of the adddays() function. For example to collect data
for three days, use adddays(-3)
 
Use the resulting file, C:\ZertoOutput.csv , for the average write rate of the VM.
Note: Versions of this script are included in the download with this document
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Trying to upgrade Vcenter 6.5 to 6.7 , The following error comes up

Cannot validate target appliance configuration as not enough information from the source appliance can be collected. For more details check out the server logs

Fix

SSH into new 6.7u1 applicance:

“software-packages install –url –acceptEulas”

and then

“shutdown reboot -r “patch reboot””

 

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

Upgrade VCenter

In order to ensure protection is not affected when upgrading or replacing a vCenter, the vCenter database should be preserved

Upgrade then make sure Replication all comes back green

 

Upgrade Hosts

Before Upgrading the Hosts to the latest ESXi , double check the current version of Zerto supports the version you are putting on or you will get the error on Upgrade “VRA unsupported esx version”

Migrate all VM’s to other VPG’s , migrate 6 VM’s at a time

Once VM’s migrated , shutdown VRA and VRAH , restart upgrade host

You can migrated VCC machines to other hosts without effecting replication

https://nolabnoparty.com/en/vsphere-6-7-upgrade-esxi-6-5-to-6-7-pt-3/

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

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)