Thursday, July 13, 2017

VM ARP cache reg key fix

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters]
"ArpRetryCount"=dword:00000000

Install vmware tools without reboot string

Update the server VM Tools without a reboot:
Under the Advanced Options during the VM Tools install enter the string       /S /v"/qn REBOOT=R"  

Cleanup stale Domain controller & check replication

repadmin /replsum

reset bad server account - most likely sysprep needed
ipconfig /all >ip.txt, remove from domain, delete computer account in AD, force replication, sysprep, rejoin to domain
1.      At the command line, type Ntdsutil and press ENTER.
PowerShell
1
2
C:\WINDOWS>ntdsutil
ntdsutil:
2.      At the Ntdsutil: prompt, type metadata cleanup and press Enter.
PowerShell
1
2
ntdsutil: metadata cleanup
metadata cleanup:
3.      At the metadata cleanup: prompt, type connections and press Enter.
PowerShell
1
2
metadata cleanup: connections
server connections:
4.      At the server connections: prompt, type connect to server <servername>, where <servername> is the domain controller (any functional domain controller in the same domain) from which you plan to clean up the metadata of the failed domain controller. Press Enter.
PowerShell
1
2
3
4
server connections: connect to server server100
Binding to server100 ...
Connected to server100 using credentials of locally logged on user.
server connections:
Note: Windows Server 2003 Service Pack 1 eliminates the need for the above step.
5.      Type quit and press Enter to return you to the metadata cleanup: prompt.
PowerShell
1
2
server connections: q
metadata cleanup:
6.      Type select operation target and press Enter.
PowerShell
1
2
metadata cleanup: Select operation target
select operation target:
7.      Type list domains and press Enter. This lists all domains in the forest with a number associated with each.
PowerShell
1
2
3
4
select operation target: list domains
Found 1 domain(s)
0 - DC=dpetri,DC=net
select operation target:
8.      Type select domain <number>, where <number> is the number corresponding to the domain in which the failed server was located. Press Enter.
PowerShell
1
2
3
4
5
6
select operation target: Select domain 0
No current site
Domain - DC=dpetri,DC=net
No current server
No current Naming Context
select operation target:
9.      Type list sites and press Enter.
PowerShell
1
2
3
4
select operation target: List sites
Found 1 site(s)
0 - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
select operation target:
10. Type select site <number>, where <number> refers to the number of the site in which the domain controller was a member. Press Enter.
PowerShell
1
2
3
4
5
6
select operation target: Select site 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
Domain - DC=dpetri,DC=net
No current server
No current Naming Context
select operation target:
11. Type list servers in site and press Enter. This will list all servers in that site with a corresponding number.
PowerShell
1
2
3
4
5
select operation target: List servers in site
Found 2 server(s)
0 - CN=SERVER200,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
1 - CN=SERVER100,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
select operation target:
12. Type select server <number> and press Enter, where <number> refers to the domain controller to be removed.
PowerShell
1
2
3
4
5
6
7
8
9
select operation target: Select server 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
Domain - DC=dpetri,DC=net
Server - CN=SERVER200,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
 DSA object - CN=NTDS Settings,CN=SERVER200,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net
 DNS host name - server200.dpetri.net
 Computer object - CN=SERVER200,OU=Domain Controllers,DC=dpetri,DC=net
No current Naming Context
select operation target:
13. Type quit and press Enter. The Metadata cleanup menu is displayed.
PowerShell
1
2
select operation target: q
metadata cleanup:
14. Type remove selected server and press Enter.
You will receive a warning message. Read it, and if you agree, press Yes.

PowerShell
1
2
3
metadata cleanup: Remove selected server
"CN=SERVER200,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=dpetri,DC=net" removed from server "server100"
metadata cleanup:
At this point, Active Directory confirms that the domain controller was removed successfully. If you receive an error that the object could not be found, Active Directory might have already removed from the domain controller.
15. Type quit, and press Enter until you return to the command prompt.
To remove the failed server object from the sites
16. In Active Directory Sites and Services, expand the appropriate site.
17. Delete the server object associated with the failed domain controller.


To remove the failed server object from the domain controllers container

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

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...