Thursday, August 16, 2012

Installing and configuring UMDS/ Update manager download services.

Installing and Configuring UMDS
Update manager download services.

UMDS downloads patch metadata, binaries, updates repository from internet where VMware update manager does not have access to  internet. As below picture I have 2 VMware update manager instances and they don’t have access to internet, and my UMDS server configured with IIS server is behind firewall connected to internet and Update managers download patches/updates over HTTP. (This demo is from home lab if you want try it in your environment at try it at your risk)

here I get benefit of less consumed internet bandwidth, repository downloaded once only, very helpful in slow internet speed. Easy to manage patches/updates, remove old patches from patch store.

Prerequisite for UMDS
·         Windows Server 2008 server.
·         vCenter server 5.0 Media
          Internet connection
      

UMDS is available on vCenter media. 


Execute VMware-UMDS.exe from cdrom:\umds folder. 
Here I am using Microsoft SQL Server 2008 R2 Express edition instance (not suggested for production, configure proper compatible SQL server, Create database and in the last configure DSN on UMDS so you can provide it while installation of UMDS), Keep all the defaults and start installation.

Next setting is for internet, how will be the internet connectivity  to UMDS server, I have direct connectivity to internet on UMDS server, keeping as it is clicking next.


Next screen leads you, where you want to keep installed files and downloaded Patches. I will suggest here to select another HDD or drive which has free space 120 GB. (I am keeping it in C:\patches folder). This location can be changed later using UMDS commandline.

If the downloading patches location does not have 120 gb free it will give below warning message, but still you can proceed with installation.


Keep other options default and finish installation. 
It's time to configure your UMDS Server.
We are installing IIS Server here, and all other vmware update managers will use http link to download  patches from UMDS server. Open server manager on UMDS server, right click roles and click add roles
Select web server (IIS) and press next


keep all the defaults and select server roles services page and press next , then press install.
Once all done, open IIS Manager.

Right click Default Web Site and click Add Virtual Directory.

Use the Patches as alias and path will be C:\Patches which we gave while installing UMDS (Make sure C:\patches has sufficient permissions for users also you can change it through UMDS command line later)

Select Default Web Site and Open MIME Types 

Add below MIME types one by one.
File name extension
Mime type
.vib
application/octet-stream
.sig
application/octet-stream

It’s a time to test your UMDS web site from VMware update manager server. Just open and make sure  "http://umds/patches/" is working in web browser (my UMDS server computer name is "umds") as you can see below it is successful.


On UMDS server Add "C:\Program Files (x86)\VMware\Infrastructure\Update Manager" location to windows environment.
Go to control Panel> system or go to computer properties> advanced tab.


Click Environment variables. 

Search for Path variable and click edit, Add below addition line at the end of variable value (no space)
;C:\Program Files (x86)\VMware\Infrastructure\Update Manager\

click ok trice.
Now it's time to download patches and upgrades from internet on UMDS server, UMDS is configured through command line only no GUI is available for it. Open command prompt (Run as administrator)

And just type "vmware-umds.exe -D" press enter (options and parameters are case sensitive). It will start downloading all the available patche/updates for all kind of hosts versions (make sure your Internet is working) it will downloading all the patches.

You will need to run vmware-umds -D to download every time for latest patches from internet, you can scheduled the command in schedule task. 
You can configure Patches download location, patch/update source urls, Patches/updates to download (whether for different versions let's say I want to download for only esxi5 version patches/updates), for more help just type vmware-umds.exe, which gives detailed help about the command.
The last step here is to configure vmware updates manager. Log on to vcenter server (I will assume you have already installed update manager/ update manger plug-ins), go  to update manager> configuration> download settings> use a shared repository 


Type the UMDS url and press validate. Once it gets successfully connected you will see connected with green mark appeared. (There is a another way if you don’t want to deploy and manage web server,(I will recommend Web Server only as it is very easy and hassle free) you need to copy C:\patches folder from UMDS server to VMware update manger server and then give the local path ie: you copied patches on update manager to "c:\patches" type the local drive path in validate URL. (Mapped drive or shared location does not work)  you can utilize DFSR for replication or any other synchronization software for the same.)

To reconfigure Database password, proxy authentication there is tool available in the "C:\Program Files (x86)\VMware\Infrastructure\Update Manager", in case if there are any changes in infrastructure (DB password and proxy authentication)

Vmwareupdatemangerutility.exe 



Now you are ready to download patches/updates centrally and keep your VMware infrastructure updated. 

You can download PDF copy of this article from 
http://kunaludapi.weebly.com/3/post/2012/08/umds-aka-update-manager-download-services.html

Note: Above documentation created and tested in home lab, Trying it in production setup will be your responsibility, I will not be responsible for any damage.

Thursday, June 7, 2012

Part 5: Setup WinDBG as a server to solve BSOD


Part 5: Setting up WINDBG as a Server.
I am assuming here you have gone through installation and already setup windbg. Now I am going to setup WINDBG as a server so you need not to install Windbg on every crashed system, no need to download symbols again and again and also no need to copy dump files on WinDBG server. All I want to do is everything Hassle free. Here I am utilizing D drive. Where windbg is installed
  • ·         Create a folder D:\windbg. (on the windbgserver)
  • ·         Share it on the network. Give administrators full permissions. 


  • ·        Select all files from "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x64" and copy them in  D:\windbg
  • ·         Copy c:\symbol folder inside d:\windbg as well

Above is the windbg topology, Now what you need to do is log into your desktop or laptop with admin rights (also having admin rights to windbgserver and memberserver) with internet connectivity. Here I am going to use KD.exe (commandline tool to windbg).

Map shared WinDBG folder from windbgserver on your desktop, let's map it to W: (you can use another drive,  if W: is already mapped)

Open start>computer> and select Map network drive for lower menu bar

Change drive to W: and use \\10.0.0.2\windbg, click finish. (if it ask for network credentials provide it admin username and password)
Open command prompt.  start>run>cmd. Type below commands.


Once it is done reading minidump file type !analyze -v  as shown and press enter.

Now in next screen you can clearly see what is the root cause of BSOD.

So next time you find any "bug" file on your windows system, I am sure you know how to kill it.
Download  full PDF of this article from http://kunaludapi.weebly.com.

Wednesday, June 6, 2012

Part 4: Setup WinDBG as a server to solve BSOD



Part 4: Troubleshoot if dump file not generating.
There might be some unexpected reboot you might found but does not find dump files, for troubleshoot check system debugging information, it is set correctly, sometimes dump file located on partition (could be separate HDD) fails or does not have enough space or if the partition hosted on network drive and Ethernet card or iscsi/HBA device fails.
Check link for more info http://support.microsoft.com/kb/130536.
Or sometimes WinDBG is not able to give you root cause, check you symbol files path, check internet connectivity. Also check if some has powercycle server. These are the some of possible reasons.
check this link as well:

Download  full PDF of this article from http://kunaludapi.weebly.com.

Part 3: Setup WinDBG as a server to solve BSOD


Part 3: Configuration

WinDBG is setup and ready, now we need memory dump file to analyze. When I started writing this demo, I didn’t have any real world dump file, but in the end I found one and you can see demo in the last. for Here there is a trick, you can have dump file, by crashing  system manually. Source  http://support.microsoft.com/kb/969028.
 
I tried to download Notmyfault utility from http://download.sysinternals.com/Files/Notmyfault.zip, but it is not available there I found the software on http://www.afterdawn.com/software/system_tools/misc_system_tools/notmyfault.cfm download and unzip it under c:\notmyfault folder (create notmyfault folder under c drive).
 
Run NotMyfault.exe from c:\Notmyfault\x64.

Congrats you have just crashed your system and created memory dump file.
Note: Do not try this on your pc or production systems I am here crashing it in virtual machine Lab.
Once it will done writing to dump file, system will restart automatically.
Currently my dump setting is set to minidump file, and I crashed my computer twice, it has created 2 files. You can set dump file settings to full memory dump or kernel memory dump and see the results.


After installation, you will find new programs installed under  Start>All Programs>Windows Kits>Debugging tools for windows
Click WinDBG (X64). WinDBG is a pure debugger tool, specially designed for Microsoft application developers. 

What are symbol files?
In next stage you need symbols in order to be able to do effective debugging. I will call it as WinDBG dictionary from where WinDBG decode dump files.

Next  you need to configure Symbol files location and server path
You can alter the symbols store location, you can set it to another drive. Here I am using srv*c:\symbols*http://msdl.microsoft.com/download/symbols which will save symbols files to c:\symbols and download from http://msdl.microsoft.com/download/symbols,

There are also symbols available from citrix if you want check bug files generated on citrix server. Below is the list.

  1. Value for non-Microsoft employees:
srv*c:\symbols*http://msdl.microsoft.com/download/symbols
For Microsoft employees:
srv*c:\symbols*http://symweb
  1. 2.       Symbol Server (Citrix):
           srv*c:\css*http://ctxsym.citrix.com/symbols
Click file>Open Crash Dump  or press Ctrl+D.
Navigate to c:\dump\minidump and select latest memory dump file. Press open.

It will download partial necessary symbol files to decode dump file. It will take time depending on your internet speed.  you can check the c:\symbols folder size later as it is growing slowly.


As from above screenshot Windbg detected myfault.sys file is the culprit. Now you can google or search files and folders for the filename on your computer and determine what driver or software is associated to myfault.sys. when we run notmyfault.exe check the other file name located in the same folder. Once you get what application or driver is causing error upgrade it to stable version or also check Hardware relying on drivers or software.

Here we have successfully postmortem'ed minidump file. Now we are going to capture Kernel memory dump file. For this change write debugging information and dump file location.
 
This time I will show you another method of crashing system, and don’t need any utility, simply go to Task manager and end process tree of csrss.

 
This will generate BSOD and create Memory.dump file under c:\dump. After restart open WinDGB>file> open crash dump> Navigate to c:\dump and open Memory.dump file.

Once the cmd prompt opened type !analyze - v command for detailed debug logs.
 
As you can see csrss.exe caused BSOD.

Download  full PDF of this article from http://kunaludapi.weebly.com.