WinDBG/VMWare on W7/x64

Is there anything specific that needs to be done on W7 x64 host to
use the WinDBG in VMWare guests? The routine of adding a serial port via
pipe and WinDBG kernel debug input via the pipe worked on other machines
for me, but I cannot get it to work on a W7 x64 machine. I tried
Ladislav’s KD VMWare, but I get the same result, i.e. WinDBG just sits
at “Waiting for reconnect”.

UAC is off on the host, and I am sure the pipe name is correct. (and
set up correctly as far as this end being the server and the other an
application).


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.

Are you trying to put the debugger in a VM and the target in a different VM
or will you have the debugger running on the host ?

I’ve been using the debugger on the host with the target in a VM (the second
approach from above) without any issues on a win7 x64 host with both 64 and
32 bit hosts, both by using the COM over named pipe approach and with
VirtualKD (which btw is a very cool tool). No special configuration required
for VirtualKD and with just setting the pipe the right way for COM over
named pipe.

Thanks,
Alex.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Monday, October 18, 2010 5:02 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] WinDBG/VMWare on W7/x64

Is there anything specific that needs to be done on W7 x64 host to use
the WinDBG in VMWare guests? The routine of adding a serial port via pipe
and WinDBG kernel debug input via the pipe worked on other machines for me,
but I cannot get it to work on a W7 x64 machine. I tried Ladislav’s KD
VMWare, but I get the same result, i.e. WinDBG just sits at “Waiting for
reconnect”.

UAC is off on the host, and I am sure the pipe name is correct. (and set
up correctly as far as this end being the server and the other an
application).


Kind regards, Dejan (MSN support: xxxxx@alfasp.com) http://www.alfasp.com
File system audit, security and encryption kits.


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars (including our new fs
mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Ah, if I could have a cent for every time I figure a week long issue a
minute after asking for help… Bill Gates would envy me! :wink: VMWare version
differences…

Dejan Maksimovic wrote:

Is there anything specific that needs to be done on W7 x64 host to
use the WinDBG in VMWare guests? The routine of adding a serial port via
pipe and WinDBG kernel debug input via the pipe worked on other machines
for me, but I cannot get it to work on a W7 x64 machine. I tried
Ladislav’s KD VMWare, but I get the same result, i.e. WinDBG just sits
at “Waiting for reconnect”.

UAC is off on the host, and I am sure the pipe name is correct. (and
set up correctly as far as this end being the server and the other an
application).


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.

I tried to run WinDBG on the host. Fixed now.

Alex Carp wrote:

Are you trying to put the debugger in a VM and the target in a different VM
or will you have the debugger running on the host ?

I’ve been using the debugger on the host with the target in a VM (the second
approach from above) without any issues on a win7 x64 host with both 64 and
32 bit hosts, both by using the COM over named pipe approach and with
VirtualKD (which btw is a very cool tool). No special configuration required
for VirtualKD and with just setting the pipe the right way for COM over
named pipe.

Thanks,
Alex.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Monday, October 18, 2010 5:02 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] WinDBG/VMWare on W7/x64

Is there anything specific that needs to be done on W7 x64 host to use
the WinDBG in VMWare guests? The routine of adding a serial port via pipe
and WinDBG kernel debug input via the pipe worked on other machines for me,
but I cannot get it to work on a W7 x64 machine. I tried Ladislav’s KD
VMWare, but I get the same result, i.e. WinDBG just sits at “Waiting for
reconnect”.

UAC is off on the host, and I am sure the pipe name is correct. (and set
up correctly as far as this end being the server and the other an
application).


Kind regards, Dejan (MSN support: xxxxx@alfasp.com) http://www.alfasp.com
File system audit, security and encryption kits.


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars (including our new fs
mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.

While we are at it, anyone from VMWARE on this list?
And if yes, are there any plans to add a feature like kernel debugging
directly into VMWARE, so we don’t have to write tools that inject DLLs
into vmware-vmx.exe in order to add entry into the private dispatcher
table? I am pretty sure that loads of kernel developers would love
this feature.

For Maxim: I use muy tool for Win7 (x64) and it usually, works, I will recheck.

L.

I presume you meant for Dejan (Maksimovic -> Maximovic :)).

I had no problem running WinDBG on the VM’s pipe output by now, however this is the first time I have ran it on
VMWare >7.0 and on Windows 7 and on x64 host :wink:

I will retry after a reboot just to make sure, but I still can’t get KDVMWare to work :frowning: It either halts on the
waiting reconnect line (in WinDBG) or gives me error 231 (all pipe instances are busy).

xxxxx@volny.cz wrote:

While we are at it, anyone from VMWARE on this list?
And if yes, are there any plans to add a feature like kernel debugging
directly into VMWARE, so we don’t have to write tools that inject DLLs
into vmware-vmx.exe in order to add entry into the private dispatcher
table? I am pretty sure that loads of kernel developers would love
this feature.

For Maxim: I use muy tool for Win7 (x64) and it usually, works, I will recheck.

L.


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.

Ah yes. I meant “Dejan”, wrote “Maxim”. Shame on me :slight_smile:

I need to recheck on 64-bit host, but this are the steps I do:

  1. Copy kdvmware.dll to the guest OS\Windows\System32. Make sure you don’t copy it to the SysWoW64.
  2. Configure it as kernel debugger DLL. I am lazy to use BCDEdit.exe, doing it by BellaVista.exe.
  3. On host, make sure that the injected DLL (KdClient.dll) is in the same folder like KdVMWARE.exe and tun the EXE. Note: Since you are running x64 host, you need to use 64-bit version of both.
  4. Just run the guest OS, the EXE should launch WinDbg and connect it to the correct pipe.

> 1) Copy kdvmware.dll to the guest OS\Windows\System32. Make sure you don’t copy it to the SysWoW64.

Guest is XP x86.

  1. Configure it as kernel debugger DLL. I am lazy to use BCDEdit.exe, doing it by BellaVista.exe.

/debug and /debugport=VMWARE are in boot.ini (XP x86).

  1. On host, make sure that the injected DLL (KdClient.dll) is in the same folder like KdVMWARE.exe and tun the EXE. Note: Since you are running x64 host, you need to use 64-bit version of both.
  2. Just run the guest OS, the EXE should launch WinDbg and connect it to the correct pipe.

Yep, it launches WinDBG, and uses the correct pipe name, but for whatever reason it doesn’t connect.

Stay tuned for after-reboot check.


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.

Confirmed that it works.
Host: Windows 7 64-bit
Guest: WinXP SP3 32-bit

There is gdb support build in into vmx. You can debug Linux kernel by talking to vmx over TCP.
I do not aware of any plans to support Windbg this way. I am not sure if protocol that Windbg uses is documented well enough to develop our own debugging stub directly inside vmx.

Alexei.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@volny.cz
Sent: Tuesday, October 19, 2010 12:26 AM
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] WinDBG/VMWare on W7/x64

While we are at it, anyone from VMWARE on this list?
And if yes, are there any plans to add a feature like kernel debugging
directly into VMWARE, so we don’t have to write tools that inject DLLs
into vmware-vmx.exe in order to add entry into the private dispatcher
table? I am pretty sure that loads of kernel developers would love
this feature.

For Maxim: I use muy tool for Win7 (x64) and it usually, works, I will recheck.

L.


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I retried after the reboot. KDVMWare still does not work. I get either: “too many parameters for debugging” (if it auto starts WinDBG), or no connection if I try to manually connect on the pipe
(set resets to 0, no Reconnect checkbox).

Did you use the latest VMWare Workstation when you checked? (7.1.2)
Let me run the steps by you again:

  • XP x86 Guest:
    Copy 32-bit KdClient.dll to Windows\System32
    Add /debug and /debugport=VMWARE to boot.ini
    No serial port
  • W7 x64 Host
    Run 64-bit KDVMware :wink:

Dejan.

xxxxx@volny.cz wrote:

Ah yes. I meant “Dejan”, wrote “Maxim”. Shame on me :slight_smile:

I need to recheck on 64-bit host, but this are the steps I do:

  1. Copy kdvmware.dll to the guest OS\Windows\System32. Make sure you don’t copy it to the SysWoW64.
  2. Configure it as kernel debugger DLL. I am lazy to use BCDEdit.exe, doing it by BellaVista.exe.
  3. On host, make sure that the injected DLL (KdClient.dll) is in the same folder like KdVMWARE.exe and tun the EXE. Note: Since you are running x64 host, you need to use 64-bit version of both.
  4. Just run the guest OS, the EXE should launch WinDbg and connect it to the correct pipe.

NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.

Sorry I meant KDVMWare.dll into Windows\System32
The exact error in WinDBG is:
The command line arguments cannot specify more than one kind of debugging to start.

xxxxx@volny.cz wrote:

Ah yes. I meant “Dejan”, wrote “Maxim”. Shame on me :slight_smile:

I need to recheck on 64-bit host, but this are the steps I do:

  1. Copy kdvmware.dll to the guest OS\Windows\System32. Make sure you don’t copy it to the SysWoW64.
  2. Configure it as kernel debugger DLL. I am lazy to use BCDEdit.exe, doing it by BellaVista.exe.
  3. On host, make sure that the injected DLL (KdClient.dll) is in the same folder like KdVMWARE.exe and tun the EXE. Note: Since you are running x64 host, you need to use 64-bit version of both.
  4. Just run the guest OS, the EXE should launch WinDbg and connect it to the correct pipe.

NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.

Quite interesting… it works on a Srv08 R2 x64 guest (had to do a manual kernel debug), but it still won’t run
on XP x86… (SP3 also).
Should /debugport be =VMWARE or KDVMWARE?

xxxxx@volny.cz wrote:

Confirmed that it works.
Host: Windows 7 64-bit
Guest: WinXP SP3 32-bit


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.

Hello,

What’s the full command line of the debugger in this case? Do you see any change if you use kd.exe instead of WinDbg?

  • S (Msft)

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Tuesday, October 19, 2010 4:56 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] WinDBG/VMWare on W7/x64

Sorry I meant KDVMWare.dll into Windows\System32
The exact error in WinDBG is:
The command line arguments cannot specify more than one kind of debugging to start.

xxxxx@volny.cz wrote:

Ah yes. I meant “Dejan”, wrote “Maxim”. Shame on me :slight_smile:

I need to recheck on 64-bit host, but this are the steps I do:

  1. Copy kdvmware.dll to the guest OS\Windows\System32. Make sure you don’t copy it to the SysWoW64.
  2. Configure it as kernel debugger DLL. I am lazy to use BCDEdit.exe, doing it by BellaVista.exe.
  3. On host, make sure that the injected DLL (KdClient.dll) is in the same folder like KdVMWARE.exe and tun the EXE. Note: Since you are running x64 host, you need to use 64-bit version of both.
  4. Just run the guest OS, the EXE should launch WinDbg and connect it to the correct pipe.

NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars (including our
new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Kind regards, Dejan (MSN support: xxxxx@alfasp.com) http://www.alfasp.com File system audit, security and encryption kits.


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars (including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

That’s the thing, I don’t know what the arguments are… (it is autostarted by KDVMWare)

Skywing wrote:

Hello,

What’s the full command line of the debugger in this case? Do you see any change if you use kd.exe instead of WinDbg?

  • S (Msft)

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Tuesday, October 19, 2010 4:56 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] WinDBG/VMWare on W7/x64

Sorry I meant KDVMWare.dll into Windows\System32
The exact error in WinDBG is:
The command line arguments cannot specify more than one kind of debugging to start.

xxxxx@volny.cz wrote:

> Ah yes. I meant “Dejan”, wrote “Maxim”. Shame on me :slight_smile:
>
> I need to recheck on 64-bit host, but this are the steps I do:
>
> 1) Copy kdvmware.dll to the guest OS\Windows\System32. Make sure you don’t copy it to the SysWoW64.
> 2) Configure it as kernel debugger DLL. I am lazy to use BCDEdit.exe, doing it by BellaVista.exe.
> 3) On host, make sure that the injected DLL (KdClient.dll) is in the same folder like KdVMWARE.exe and tun the EXE. Note: Since you are running x64 host, you need to use 64-bit version of both.
> 4) Just run the guest OS, the EXE should launch WinDbg and connect it to the correct pipe.
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars (including our
> new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


Kind regards, Dejan (MSN support: xxxxx@alfasp.com) http://www.alfasp.com File system audit, security and encryption kits.


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars (including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.