HP Integrity Servers with Microsoft® Windows Server™ 2003 and Windows Server™ 2008 Kernel Debugging Guide HP Part Number: 5992-4491 Published: September 2008
Legal Notices Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Table of Contents About This Document.........................................................................................................7 Intended Audience.................................................................................................................................7 New and Changed Information in This Edition.....................................................................................7 Document Organization.....................................................................
3 Debugging HP Virtual Machines guests....................................................................35 HPVM Windows guest debug process.................................................................................................
List of Figures 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 1-11 1-12 rx1620 debug port (male pins on system board)...........................................................................12 Required plug ends and internal wiring.......................................................................................12 BL860c/BL870c debugging port.....................................................................................................19 rx1620 debugging port........................................
List of Tables 1-1 1-2 1-3 1-4 1-5 6 Kernel debugging setup options.....................................................................................................9 DB9 male pin-out to 5x2 female....................................................................................................12 Computer pin-outs or HP Integrity rx5670 servers.......................................................................13 Computer pin-outs for HP Integrity rx7620 and rx8620 servers.........................
About This Document This document describes the process for debugging the operating system kernel on HP Integrity servers running Microsoft® Windows® Server 2003 and Windows® Server 2008. The document printing date and part number indicate the document’s current edition. The printing date changes when a new edition is printed. Minor changes may be made at reprint without changing the printing date. The document part number changes when extensive changes are made.
NOTE KeyCap Computer output User input Command Ctrl+x A note contains additional information to emphasize or supplement important points of the main text. The name of a keyboard key or graphical interface item (such as buttons, tabs, and menu items). Note that Return and Enter both refer to the same key. Text displayed by the computer. Commands and other text that you type. A command name or qualified command phrase. A key sequence.
1 Debugging the kernel locally If you have programmed on the Windows operating system for any length of time, you are probably familiar with user-mode debuggers and aware of kernel-mode debuggers. User-mode debuggers help developers to debug applications. Kernel-mode debuggers are used mostly by driver writers to debug device drivers and by support professionals to analyze system crashes. This chapter describes how to locally debug the operating system kernel on HP Integrity servers.
Table 1-1 Kernel debugging setup options (continued) Laptop or workstation CAT-5 cable (RJ45) + + Microsoft Debugging Tools for Windows RJ45-to-DB9F converter Laptop or workstation No cable required. + (These servers are debugged remotely, over a LAN, as described in the next chapter.
x86 Host Itanium Host If the host uses an x86 processor, always use the 32-bit package. If, like the target, the host is Itanium-based — an entry-level HP Integrity server being used as a development platform, for example — then the following rules apply: • To analyze a dump file, use either the 32-bit package or the Itanium package. It does not matter whether the dump file is a user-mode dump file or a kernel-mode dump file.
Figure 1-1 rx1620 debug port (male pins on system board) 5x2 Male Pins on System Board 2 4 6 8 10 1 3 5 7 9 Front of Server You can sometimes find a 5x2-to-DB9M converter in electronics surplus stores because it was often used on the motherboards of older computers. If you cannot locate one, you can build the connector yourself using the information in the following table.
Table 1-3 Computer pin-outs or HP Integrity rx5670 servers RJ45 Pin Wire Color DB9 Female Pin 1 Blue 1 2 Orange 3 3 Black 2 4 Red 4 5 Green 5 6 Yellow 6 7 Brown 7 8 Gray (White) 8 Table 1-4 Computer pin-outs for HP Integrity rx7620 and rx8620 servers RJ45 Pin Wire Color DB9 Female Pin 1 Blue 4 2 Orange 8 3 Black 5 4 Red 3 5 Green 2 6 Yellow NC 7 Brown 7 8 Gray (White) 6 Table 1-5 Computer pin-outs for HP Integrity Superdome/sx1000 servers RJ45 Pin Wire
Because you must reboot for the boot configuration changes to take effect, change the boot options first, locate and enable the debug port if necessary, and then connect the cable to the debug port and proceed with debugging. The procedures that follow are presented in the order they should be performed. Some sections apply to all servers; some apply to certain models only, as indicated in the title.
1. At the command-line prompt, enter the following command: C:\>bootcfg The current boot configuration appears, as shown in the following example: Boot Options -----------Timeout: 20 Default: \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1\WINDOWS CurrentBootEntryID: 1 Boot Entries -----------Boot entry ID: 1 OS Friendly Name: Windows Server 2003, Enterprise OsLoadOptions: /redirect BootFilePath: \Device\HarddiskVolume1\EFI\Microsoft\WINNT50\ia64ldr.
OS Friendly Name: Windows Server 2003, Enterprise OsLoadOptions: /redirect BootFilePath: \Device\HarddiskVolume1\EFI\Microsoft\WINNT50\ia64ldr.
5. To confirm that the entries were added correctly, run the bootcfg command again: C:\>bootcfg The new boot configuration appears: Boot Options -----------Timeout: 20 Default: \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1\WINDOWS CurrentBootEntryID: 1 Boot Entries -----------Boot entry ID: 1 OS Friendly Name: Windows Server 2003, Enterprise OsLoadOptions: /redirect BootFilePath: \Device\HarddiskVolume1\EFI\Microsoft\WINNT50\ia64ldr.
3. At the Enter OS boot option to modify: prompt, select the first boot option by entering: 1. The system displays the following: 1 LoadIdentifier = Windows Server 2003, Datacenter 2 OsLoadOptions = /REDIRECT /NOVESA 3 EfiOsLoaderFilePath = cf5f2ddc-b885-11d7-b831-000000000000 :: \efi\microsoft\winnt50\ia64ldr.efi 4 OsLoaderFilePath = e605a034-b885-11d7-b831-000000000000 :: \windows Enter VAR to modify: 2 4. 5.
3. Enable the debugger for the desired boot entry: C:\>bcdedit /debug {identifier_of_boot_entry_targeted_for_kernel_debugging} ON Once again, for a complete description this tool, refer to the Microsoft documentation found here: http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/ BCDedit_reff.
Figure 1-4 rx1620 debugging port When you face the front of the server, the first pin (#1) is located in the lower right corner of the rectangle shown in the previous image. It is also indicated directly on the board with a small white circle or a similar mark. rx2600 and rx2620 servers For rx2600 and rx2620, connect the serial port on the laptop or workstation to the DB9 port in the back of the server using a standard DB9 female-terminated RS-232 null modem cable.
Figure 1-6 rx2660 debugging port rx3600 and rx6600 servers For rx3600 and rx6600 servers, connect the serial port on the laptop or workstation to the serial port on the far right side of the back of the server (when facing the back). The following image shows the connection. Figure 1-7 rx3600 and rx6600 debugging port rx4640 server The rx4640 server has 3 DB9 connectors on the rear I/O panel.
Figure 1-8 rx4640 debugging port To enable the debug port, you must open the server's I/O bay and short a jumper header as follows (jumper not provided): 1. 2. Power the system off and verify that it is disconnected from the main AC power supply. Locate the set of three jumpers directly above the brown edge connector socket (the one resembling an AGP slot) on the motherboard, as shown in the following image. Figure 1-9 Location of three jumpers on rx4640 motherboard 3. 4.
Figure 1-10 rx5670 debugging port rx7620, rx8620, and Superdome/sx1000 servers To set up the rx7620, rx8620, or Superdome/sx1000 for local debugging, complete the following steps: 1. Locate the correct debugging port by identifying the core cell. 2. Copy the KD utility to the EFI system partition (rx7620 and rx8620 only). 3. Enable debug port (rx7620 and rx8620 only). 4. Connect to the debug port. Locate the debug port HP Integrity rx7620, rx8620, and Superdome servers are cell-based.
In this example, the root cell is cell 0, physically the topmost cell in the server. Option 2: Identifying the core cell using an nPartition command To identify the nPartition’s core cell while the operating system is running: • You must know the server IPMI password. • You must know the IP address or host name of the server’s management processor. • You have a workstation or laptop with the ParCLI tool installed. • The laptop or workstation is on a network connected to the management processor.
1. At the EFI Shell prompt, enter the following command: EFI Shell> kd -on Now the shared port on the core cell is enabled for kernel debugging. The state of the port is consistent across reboots. However, removing power to the system reverts the debug port back to its default state.
Figure 1-12 Debugging port on Superdome/sx1000 This figure shows two adjacent cells and the kernel debugging ports on each. Always use the RJ-45 connector closest to the handle. Only one debug port can be active for a given partition that spans one or more non-consecutive cells, and you must always connect to the port on the root cell of that partition.
2 Debugging the kernel remotely If you have programmed on the Windows operating system for any length of time, you are probably familiar with user-mode debuggers and aware of kernel-mode debuggers. User-mode debuggers help developers to debug applications. Kernel-mode debuggers are used mostly by driver writers to debug device drivers and by support professionals to analyze system crashes. This chapter describes how to debug the operating system kernel remotely on HP Integrity servers.
systems. The Debugging Tools for Windows package contains four debuggers: CDB, NTSD, KD, and WinDbg. • • • Console Debugger (CDB) and NT Symbolic Debugger (NTSD) are console applications that can debug user-mode programs. These two debuggers are nearly identical except in the manner in which they are launched. Kernel Debugger (KD) is a character-based console application that enables in-depth analysis of kernel-mode activity on all operating systems based on Windows NT. You can use KD ( kd.
• • KDbgCtrl, DumpChk, GFlags.exe, TList.exe, Kill.exe, List.exe, Breakin.exe, and UMDH, as well as the remote debugging tools Remote.exe, DbEngPrx, and KdSrv. The Documentation feature and its Debugging Tools subfeature are selected by default. If you leave these selected, installation includes the Debugging Tools for Windows documentation (debugger.chm). The SDK feature and its subfeatures are not selected by default.
1. At the command-line prompt, enter the following command: C:\>bootcfg The current boot configuration appears, as shown in the following example: Boot Options -----------Timeout: 20 Default: \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1\WINDOWS CurrentBootEntryID: 1 Boot Entries -----------Boot entry ID: 1 OS Friendly Name: Windows Server 2003, Enterprise OsLoadOptions: /redirect BootFilePath: \Device\HarddiskVolume1\EFI\Microsoft\WINNT50\ia64ldr.
OS Friendly Name: Windows Server 2003, Enterprise OsLoadOptions: /redirect BootFilePath: \Device\HarddiskVolume1\EFI\Microsoft\WINNT50\ia64ldr.
5. To confirm that the entries were added correctly, run the bootcfg command again: C:\>bootcfg The new boot configuration appears: Boot Options -----------Timeout: 20 Default: \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1\WINDOWS CurrentBootEntryID: 1 Boot Entries -----------Boot entry ID: 1 OS Friendly Name: Windows Server 2003, Enterprise OsLoadOptions: /redirect BootFilePath: \Device\HarddiskVolume1\EFI\Microsoft\WINNT50\ia64ldr.
3. At the Enter OS boot option to modify: prompt, select the first boot option by entering: 1. The system displays the following: 1 LoadIdentifier = Windows Server 2003, Datacenter 2 OsLoadOptions = /REDIRECT /NOVESA 3 EfiOsLoaderFilePath = cf5f2ddc-b885-11d7-b831-000000000000 :: \efi\microsoft\winnt50\ia64ldr.efi 4 OsLoaderFilePath = e605a034-b885-11d7-b831-000000000000 :: \windows Enter VAR to modify: 2 4. 5.
3. Enable the debugger for the desired boot entry: C:\>bcdedit /debug {identifier_of_boot_entry_targeted_for_kernel_debugging} ON Once again, for a complete description this tool, refer to the Microsoft documentation found here: http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/ BCDedit_reff.doc Enable IPMI LAN access and the debugging option Enable the Windows debugging option and enable LAN access to the management processor (MP) by completing the following steps: 1. 2.
3 Debugging HP Virtual Machines guests HP Virtual Machines (HPVM) is a soft partitioning and virtualization technology that provides operating system isolation with CPU allocation and shared I/O. HPVM enables a single Integrity server to emulate multiple virtual machines running distinct operating systems and environments.