0xAK
0xAK

Reputation: 229

Kernel-Debugging a windows guest system from a linux system - Setup not working

I'm trying to kernel debug an application on my Guest - WindowsXP OS

My host is a Ubuntu 14.04 x64 with VMware Workstation 12 installed.

The Debugger Guest os is Windows 7 with WinDBG installed.

I've read this article from vmware: https://www.vmware.com/support/ws55/doc/ws_devices_serial_advanced_example_debugging.html

https://www.vmware.com/support/ws55/doc/ws_devices_serial_2vms.html

And i configured my Machines as i understood from the article but it just wont work. One thing i didnt really understand and this might be my problem, is what the NamedPipe should be configured as? Should i be using the \\.\pipe\[NAME] syntax or the /tmp/[NAME] one?

Obviously from within the Windows 7 - Debugger machine it will not recognize the /tmp/[Name] one. So which one is it?

Here are my configurations:

WindowsXP (Debugged guest os):

  1. Use socket (Named pipe)
  2. \\.\pipe\DebugPort
  3. From: Server To: A Virtual Machine
  4. Yield CPU on poll

bootcfg

Boot Loader Settings
--------------------
timeout: 30
default: multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

Boot Entries
------------
Boot entry ID:   1
Friendly Name:   "Microsoft Windows XP Professional"
Path:            multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
OS Load Options: /noexecute=optin /fastdetect /debug /debugport=COM1: /baudrate=115200

Windows7 (The debugger with WinDBG)

  1. Use socket (Named pipe)
  2. \\.\pipe\DebugPort
  3. From: Client To: A Virtual Machine
  4. Yield CPU on poll

Now opening WinDBG on my Windows7, Hitting CTRL + K for KernelDebugging options, going to the `COM' Tab and configured as the following:

  1. Baud Rate: 115200
  2. Port: \\.\pipe\DebugPort
  3. Pipe [Checked]
  4. Reconnect [Checked]

Now resetting the Guest XP os results in nothing.. i dont get anything on my WinDBG client What am i missing? Is my port naming convention wrong because im using a linux host?

Upvotes: 0

Views: 1348

Answers (2)

grv
grv

Reputation: 36

I can see a few issues here

  1. Use linux format pipes/sockets - /tmp/, e.g. /tmp/dbg, if your host OS is linux
  2. In windbg (Debugger system), just mention the name of port, i.e. COM1, not full pipe name (which is used, when debugging on the host OS itself, instead of across VMs)
  3. In windbg (Debugger system), uncheck pipe
  4. Also, "Yield CPU on poll" option is not required for debugger (Windows 7, here)

I'm able to connect windbg across Windows 7 VMs (one debugger & another debuggee) on Ubuntu 14.04 & Workstation 11.1.3

Upvotes: 2

blabb
blabb

Reputation: 9007

you have installed two windows operating systems in two seperate virtual machines inside a single physical host which runs some flavour of linux if such is the case and you prefer to use named pipe

1) edit the boot.ini in xp (no bcdsettings available in xp guest) 
2) add a serial port on both the virtual machines 
3) use named pipe \\.\pipe\com_1  on both virtual machines
4) assign one end as server and other end as virtual machine in first vm
5) assign one end as client and other end as virtual machine in second vm
6) restart

this link has some fancy crap but you can refer the images
http://www.woodmann.com/forum/entry.php?234-connect-two-virtual-machines-on-one-physical-host-and-use-wdeb386-to-debug-win98-app

Upvotes: 0

Related Questions