VMware Communities
dngthe93
Contributor
Contributor

debugStub does not work on Windows 10 2004 with Hyper-V

Hi all, I just found that the VMware's debugStub feature does not work on Windows 10 2004, Hyper-V enabled pc.

I enable the VirtualMachinePlatform on Windows 10 2004 to enable the wsl2 and install VMware 15.5.6 build-16341506.

It seems to work perfectly with the Hyper-V, but there's a problem with debugStub.

VMware does not make a listen-socket, so I cannot connect to the guest OS.

(I tried to enable debugStub by adding debugStub.listen.guest64 = "TRUE" in the *.vmx file)

There is no log about the debugStub on the vmware.log file.

When I disable the VirtualMachinPlatform feature, VMware's debugStub feature works fine.

It creates the listening socket(port 8864), and it is possible to connect to the guest OS. (target remote localhost:8864)

Is there any plan to support the debugStub feature on Hyper-V enabled machine? or is it technically impossible to use debugStub feature on Hyper-V-enabled machine?

6 Replies
hotvooboy
VMware Employee
VMware Employee

Hi,

Thank you for posting your query in community. Do you still have this problem ?

I just added debugStub.listen.guest64 = "TRUE"  in the *.vmx file and can find the  message from the vmware.log:

2020-07-07T16:14:40.848+08:00| vmx| I005: SOCKET 2 (1112) Created new IPv4 socket listener for (127.0.0.1:8864)

2020-07-07T16:14:40.848+08:00| vmx| W003: Debug stub: VMware Workstation is listening for debug connection on port 8864.

2020-07-07T16:14:40.848+08:00| vmx| W003: Debug stub:     (gdb) target remote localhost:8864

2020-07-07T16:14:40.848+08:00| vmx| W003: Debug stub:     (lldb) gdb-remote 8864

my VM is win10-64bit VM running on Hyper-V enabled Host. Thanks.

dngthe93
Contributor
Contributor

Thank you for your reply.

I tried again, but it did not make any listening socket...

I tried both Windows 10 x64 and Ubuntu 20.04 x64 as the Guest VM, but they both failed.

Here is the search result in vmware.log for 'debug'.

...

2020-07-07T23:39:34.855+09:00| vmx| I005: DICT     guestOS.detailed.data = ""

2020-07-07T23:39:34.855+09:00| vmx| I005: DICT  debugStub.listen.guest64 = "TRUE"

2020-07-07T23:39:34.855+09:00| vmx| I005: DICT           floppy0.present = "FALSE"

...

That's all. That is the only part says about the debugStub.... Smiley Sad

I'm using Windows 10 Home 2004 (build 19041.329) as Host PC.

Also, In my PC, WSL2 is enabled and Ubuntu is installed on WSL2.

Do you think it(WSL2 installed) could be the reason why the debugStub is not working on my PC?

Reply
0 Kudos
hotvooboy
VMware Employee
VMware Employee

I think it should not be. anyway you can disable WSL2 for a try. also you can check  the port on the host OS by windows cmd netstat -aon  if it is being used.

Thanks.

Reply
0 Kudos
dngthe93
Contributor
Contributor

I tried a lot, but all of the attempts have failed.

Disable wsl -> Failed

Disable Virtual Machine Platform -> Success

In all of my experiments, VMware's debugStub feature got enabled only when Windows' 'Virtual Machine Platform' and 'Hypervisor Platform' got disabled.

I also disassemble the vmware-vmx.exe file to see what's happening inside there.

What I found from the result is, the vmware-vmx.exe does not enable debugStub feature when the monitor mode is ULM.

If I disable the ULM by adding 'monitor.allowULM = 0' on the *.vmx file, VMware failed to run the VM, when the Virtual Machine Platform feature is enabled.

That is to say, 'Virtual Machine Platform'-enabled PC does not support VMware's CPL0 monitor mode, and it also means that debugStub feature cannot be enabled.

If I disable the 'Virtual Machine Platform', VMware only run with monitor mode:CPL0, and debugStub can be enabled.

I'm quite sure that the VMware's debugStub is not compatible with Windows' Virtual Machine Platform feature.

Reply
0 Kudos
dariusd
VMware Employee
VMware Employee

You are right that Workstation 15.5.6 does not allow debugStub to be enabled while the ULM (host Hyper-V compatibility) is in use.

Have you tried with the latest Workstation Tech Preview? VMware Workstation Tech Preview 20H2 July User Guide

I believe that Tech Preview (released just a few hours ago!) will enable the debug stub again, although it might not be all that useful yet: I do not think it is functionally complete at this stage.

Thanks,

--

Darius

Reply
0 Kudos
hotvooboy
VMware Employee
VMware Employee

Sorry for making you confused. I just checked my workstation  is TP2 build.

As Darius's pointed above, please try to use the TP2 build to see if it is working.

Reply
0 Kudos