VMware Cloud Community
senthilchinnara
Contributor
Contributor

How to change ESX 5.0 Operating system release to debug mode

Hi All,

I am trying to setup vmware debug setup in our project  using serial console. I had installed vmware workbench in server machine and also installed vmware workbench plugins (tool chain and sdk) in development machine.I had installed ESX 5.0 Server in debug machine. I referred the DDK development guide for CLI ESX 5.0.

I had enabled live debugging commands debug the ESX OS.

To enable live debugging process, issue the following command:

esxcfg-advcfg -k com1 gdbPort

I used the following commands testing the serial connection between development and testing machine.

1 Connect the null modem serial cable to the respective COM ports on $dev and $debug.

2 ($debug)esxcfg-advcfg -k GDBPort

3 ($debug)esxcfg-advcfg -j LogPort

LogPort = com1

4 ($debug) reboot

5 To enable debugging, you must start the $debug machine in debug mode by selecting “VMware ESXi

Server (debug mode)” during the boot process.

Please guide me which commands or steps used to change ESX 5.0 Operating system release to debug mode .

Thanks & Regards,

Senthil

0 Kudos
1 Reply
Lambert_Yao
Contributor
Contributor

hi,

Here is my step to do live kernel debug

1): Setup serial port connection.

2): Configure ESXi host:

    esxcfg-advcfg -k none GDBPort

    esxcfg-advcfg -k com1 GDBPort

    esxcfg-advcfg -k none LogPort

    esxcfg-advcfg -k com2 LogPort

    esxcfg-advcfg -s 1 /Misc/LogToSerial

    esxcfg-advcfg -s 1 /Misc/DebugLogToSerial

Then: reboot ESXi host.

    We shall check serial port connection via:

       on workbench:

     /opt/vmware/kmdk-xxx/tools/serial rx /dev/ttyS0 115200

3); If connection is fine,

        a: mkdir -p /home/gdb/debug

        b: export MODULE_DIRS=<project directory>/build/<build type>/xxx

           export VMK_MODE=release or beta

       c: cp -R  <project directory>/build/<build type>/xxx /home/gdb/debug                     

    d: /opt/vmware/kmdk-xxx/debug/dbgvmkdrv /dev/ttyS0 -break

    e: Now, it's GDB world, enjor it!!!

0 Kudos