Thursday, July 13, 2017

Enable Windows Cloud FW rules + DB

netsh firewall add portopening UDP 137 blah enable all
netsh firewall add portopening UDP 138 blah enable all
netsh firewall add portopening TCP 139 blah enable all
netsh firewall add portopening TCP 445 blah enable all
netsh firewall add portopening TCP 1433 sql enable all
netsh firewall set icmpsetting all enable

Large Packet Loss At Guest OS Level in VMware ESXi When Using VMXNET3 - crank out VMXNIC performance

Large Packet Loss At Guest OS Level in VMware ESXi When Using VMXNET3

Back in 2010 I was helping a large company troubleshoot their virtualized SAP environment, which was experiencing instability and performance problems. One thing we noticed was that the buffers on the NIC’s were periodically overloading due to the large amount of small packets. This was on vSphere 4.0, with Windows 2003 64bit OS at the time and using VMXNET3. Unfortunately at that stage the VMXNET3 driver for Windows didn’t support increasing the send or receive buffers and as a result we had to switch over to E1000 and increase the TX and RX buffers, which resolved the problem (in addition to adding memory reservations to the VM’s). However since vSphere 4.1 it has been possible to modify the buffers in VMXNET3 to resolve these sorts of issues. I have been experiencing this myself in my home lab and have as a result modified the buffers, but it appears I may not be alone in experiencing this.
I thought this was just something I had done in my lab environment. But after reading Michael White’s Newsletter and the VMware KB 2039495 – Large packet loss at the guest OS level on the VMXNET3 vNIC in ESXi 5.x / 4.x, it appears I’m not alone in this. Fortunately it is easy to make the necessary modifications to the buffers and resolve the majority of the packet loss issues as follows:
To reduce burst traffic drops in Windows Buffer Settings:
  1. Click Start > Control Panel > Device Manager.
  2. Right-click vmxnet3 and click Properties.
  3. Click the Advanced tab.
  4. Click Small Rx Buffers and increase the value. The default value is 512  and the maximum is 8192.
  5. Click Rx Ring #1 Size and increase the value (repeat for RX Ring #2). The default value is 1024 and the maximum is 4096.
In my environment I’ve also set my Large RX Buffers to 8192 and my TX Ring Size to 4096.
If you suspect that your virtual machines may be dropping packets or losing packets then you should consider adjusting the RX and TX buffers. This may well lead to increased performance and more importantly application stability. Sometimes in addition to increasing the buffers you may need to reserve the memory if it’s a very important app. This will ensure it can receive the resources it needs.
Final Word
In most cased the default settings are fine. In some cases there are some adjustments needed. This is one of the cases, if you are experiencing this problem, where adjustments are needed. There is no patch as such to address this problem at this time. But VMware will hopefully make improvements to its drivers and IP stack in future versions of vSphere.

Tuesday, July 11, 2017

NTP Drift fix

https://superuser.com/questions/425233/how-can-i-check-a-systems-current-ntp-configuration

https://www.experts-exchange.com/videos/511/Windows-Server-2012-Configuring-NTP-Servers-for-Time-Synchronization.html

w32tm /query /status
I got:
The command /query is unknown.
Then I tried:
reg QUERY [\\machine\]HKLM\SYSTEM\CurrentControlSet\Services\W32Time
I got:
ERROR: The system was unable to find the specified registry key or value.
Then I tried:
net time /querysntp
I got:
This computer is not currently configured to use a specific SNTP server.
So, basically, the service was not running. Following these instructions, I did:
w32tm /unregister
w32tm /unregister
w32tm /register
net start w32time
Finally, all the above would work. Then I just needed to set my ntp up... I did it with:
w32tm /config /manualpeerlist:10.0.0.5 /syncfromflags:manual /reliable:yes /update
following instructions from here, but perhaps it could've been as easy as:
net time /setsntp:10.0.0.5
as instructed here. (10.0.0.5 being my local NTP server). If you're not using a local NTP server, you can use the generic one:
w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:manual /reliable:yes /update
Finally, you might need to do the following, which was not necessary for me:
w32tm /config /update
w32tm /resync /rediscover

Regedit
Computer/Local Machine/System/CurrentControlSet/Services/W32time/Parameters
NTPServer 1.1.1.1, 2.2.2.2
Type NTP





Wednesday, June 21, 2017

UCS new Key ring

A# scope security
A /security # scope keyring default
A /security/keyring # set regenerate yes
A /security/keyring* # commit-buffer

Monday, May 8, 2017

Windows 2008 R2 KB3145126 KILLED DNS

Just FYI, KB3145126 which ironically supposed to resolve the DNS issues actually kills DNS altogether. Just spent my day off to figure this out. Hope it'll help out others so you don't lose your day off!
Windows 2008 R2 x64
Uninstall KB3145126 

Thursday, March 2, 2017

Vmware SYSLOG Powercli

Connect-VIServer -Server (Read-Host "what is the vcenter to use?") -Credential (Get-Credential -Message "What is your VCenter Admin UserID & PW")

$Syslog = "udp://10.1.21.41:514"

$vmhosts = get-vmhost

#practice Run ##  Remove Line 6 to complete all Hosts
$vmhosts = $vmhosts|where {$_.name -eq "iad-esx-ucs1-05.st.com"}

foreach ($vmhost in $vmhosts)
{
#Display the ESXi Host being modified
Write-Output "Processing... $($vmhost.name)"

#Set the Syslog Server
$vmhost | Get-AdvancedSetting -Name Syslog.global.logHost | Set-AdvancedSetting -Value $Syslog -Confirm:$false

#Restart the syslog service
$esxcli = Get-EsxCli -VMHost $vmhost
$esxcli.system.syslog.reload()

#Open firewall ports
if(((Get-VMHostFirewallException -Name "syslog" -VMHost $vmhost).Enabled) -ne $true)
{Get-VMHostFirewallException -Name "syslog" -VMHost $vmhost | set-VMHostFirewallException -Enabled:$true}

}

Vmware Time Servers

0.vmware.pool.ntp.org, 1.vmware.pool.ntp.org, 2.vmware.pool.ntp.org, 3.vmware.pool.ntp.org

w32tm /config /manualpeerlist:10.1.16.123, 10.25.16.123 /syncfromflags:manual /reliable:yes /update

Vmware NSX SSL creation 

Using OpenSSL for NSX Manager SSL import: Creates CSR and 4096 bit KEY Creating NSX 6.4.2 SSL    openssl req -out nsxcert.csr -newkey rsa:40...