Showing posts with label Windows Server. Show all posts
Showing posts with label Windows Server. Show all posts

Monday, October 29, 2012

Disable Windows Error Recovery - Windows Server 2008 / Windows 7 / Etc.

We have Citrix XenApp servers that boot from an HP Lefthand P4500 SAN volume and for some reason during scheduled reboots on the weekend they would hang on the stupid "Windows Error Recovery" about 50% of the time.  Selecting "boot windows normally" would boot the server just fine - but it was always a manual operation.  So this would leave these production servers in a downed state until someone manually intervened.

To fix this problem I used the following command (from a command prompt):


bcdedit /set {current} bootstatuspolicy ignoreallfailures


To check to see if it is set you can simply use BCDEDIT by itself to display the settings.  For example:


C:\Users\administrator>bcdedit
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {E54e3a5f-48ad-11df-ae93-ced11e86b19d}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows Server 2008 R2
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {E54e3a63-48ad-11df-ae93-ced11e86b19d}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {E54e3a63-48ad-11df-ae93-ced11e86b19d}
nx                      OptOut
bootstatuspolicy        IgnoreAllFailures

If the setting has not been applied you will not see "bootstatuspolicy" in the list.   

Now upon reboot it does not stop and wait.  I know this has been helpful as we had to repair the boot info on a one of the servers and it started doing it again afterwards (after 8 months of smooth reboots.)   This setting got wiped-out when we did the repair so I had to set it again.  


Friday, October 19, 2012

Was my PC or Server Cloned and SysPrepped?

To find out if a server was cloned check out this registry key (this is for Windows Server 2008 R2 but I would image would be the same or similar for most flavors of Windows):

HKEY_LOCAL_MACHINE\SYSTEM\Setup\CloneTag

CloneTag will actually tell you the date and time when SysPrep was run on it.


Now if you want to check the SID values (perhaps with the source to make sure they are in fact different) use the PsGetSid utility.  You can just run PsGetSid from a command prompt to get the SID from your local PC or use "\\" to get the SID of computers connected to your LAN.

The output would be similar to this from my two Citrix servers (and this tells me my SIDs are different):
--------------------------------------------------------------------------------------------------

C:\PSTools>psgetsid \\lan-citrix1

PsGetSid v1.44 - Translates SIDs to names and vice versa
Copyright (C) 1999-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

SID for \\lan-citrix1:
S-1-5-21-2052776799-13871689-1737724133


C:\PSTools>psgetsid \\lan-citrix2

PsGetSid v1.44 - Translates SIDs to names and vice versa
Copyright (C) 1999-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

SID for \\lan-citrix2:
S-1-5-21-3592252623-8394611391-4172714545



--------------------------------------------------------------------------------------------------



Now does any of this really matter?  Ask Mark Russinovich (or at least check out this blog entry of his:)

The Machine SID Duplication Myth (and Why Sysprep Matters) 



** On a side Note - if you do Clone Citrix servers and you use the Citrix Gateway, you need to edit the STA ID for each clone acting as a Secure Ticket Agent. **


This applies to Presentation Server or XenApp.  XenApp 6.x in my case.
To change the STA ID edit the CtxSta.config file.
This can be found here:  %ProgramFiles(x86)%\Citrix\system32\CtxSta.config
Open the file with Notepad.
Simply change the STA ID value with anything you like and save. I just tweaked one number.

For example - in the file:
GlobalConfig
UID=STAD8D1856594FF <= change this to something unique.



Thursday, October 28, 2010

Incorrect IP address showing up in DNS

Problem
Windows 2003 server at a remote office has two network cards, one for general traffic and another one used with a network sniffer that was also loaded on the server if we need to track down a network hog issue.  The problem was that the NIC used for the sniffer auto-registered with DNS and sometimes would "advertise" that IP address and not the desired static IP address of the server.

About Me

My photo
Science Fiction Author / Vice President of Technology for The Christman Company