VMware Workstation

 View Only
  • 1.  Use vsocket for TCLO messages from host to guest

    Posted Apr 04, 2025 03:30 AM
    Edited by Dimitrios Kalogeropoulos Apr 04, 2025 03:30 AM

    Hello,

    I am trying to use the vsocket interface for the RPCIn channel (Host-->Guest communication) in order to receive TCLO messages using vsockets.
    However, this channel is always falling back to backdoor as seen in the guest's vmsvc.log. Thus, the events for power operations like suspend, resume, shutdown etc arrive in guest VM through backdoor and not vsock. 
    The RPCI channel for guest-->host communication seems to work successfully using vsockets.

    Also, in host's vmware.log the 
    "GuestRpc: Using vsocket for TCLO messaging is disabled"  message is displayed.

    I use the default settings of VMware Tools in host and guest.
    Could anyone help me how to explicitly use TCLO channel with vsockets


    Some usefuls logs can be seen below:

    Guest: vmsvc.log with debugs enabled
    [2025-04-03T10:13:11.489Z] [    info] [vmsvc] [774] SOCKET creating new socket, connecting to 0:975
    [2025-04-03T10:13:11.489Z] [   debug] [vmsvc] [774] RpcIn: successfully created vsocket connection 8.
    ....
    [2025-04-03T10:13:11.566Z] [   debug] [vmsvc] [774] RpcIn: Error in socket 8, closing connection: Connection error.
    [2025-04-03T10:13:11.566Z] [   debug] [vmsvc] [774] RpcIn: Closing vsocket connection 8
    [2025-04-03T10:13:11.566Z] [   debug] [vmsvc] [774] RpcIn: falling back to use backdoor ...

    Host: vmware.log
    2025-04-03T13:06:35.104Z In(05) vcpu-0 GuestRpc: Successfully created RPCI listening socket.
    2025-04-03T13:06:35.104Z In(05) vcpu-0 GuestRpc: Using vsocket for TCLO messaging is disabled.


    Environment:
    Host: Windows 11 24H2
    VMware Workstation 17 Pro, version 17.6.3 build-24583834
    Guest: Ubuntu 24.02 with the default open-vm-tools 12.4.5.49651 (build-23787635)


    Thanks in advance,
    Dimitris



  • 2.  RE: Use vsocket for TCLO messages from host to guest

    Broadcom Employee
    Posted Apr 16, 2025 08:37 PM

    Hi DImitrios,

    Using vsockets for TCLO is not supported.  What problem are you trying to solve by doing so?

    Thanks.




  • 3.  RE: Use vsocket for TCLO messages from host to guest

    Posted Apr 16, 2025 09:35 PM

    Hello Jonathan,

    I was investigating the source code of open-vm-tools in https://github.com/vmware/open-vm-tools where the vsocket implementation of the RPCIN channel exists for the guest side. So, I would like to use exclusively vsockets for both directions of communication messages between guest and host. However, when starting the vmtoosd daemon in Linux guest, although a vsocket is created in guest for the RPCIN/TCLO channel, the vsocket connection is reset by the host and it is falling back to using backdoor. 

    Will the vsockets be supported for TCLO channel in host? Also, is the bug 859728 related to this? I found a comment in 

    https://github.com/vmware/open-vm-tools/blob/739c5a2f4bfd4cdda491e6a6f6869d88c0bd6972/open-vm-tools/lib/asyncsocket/asyncsocket.c#L4278

    where both the if conditions are false which lead to the RpcInConnErrorHandler.

    Best Regards,

    Dimitris




  • 4.  RE: Use vsocket for TCLO messages from host to guest

    Broadcom Employee
    Posted Apr 21, 2025 05:36 PM

    Thanks Dimitris for raising this.

    I would like to use exclusively vsockets for both directions of communication messages between guest and host.

    What benefits are you expecting out of this? Could you please highlight some of the benefits you see out of this?

    > Will the vsockets be supported for TCLO channel in host?

    Unfortunately, we cannot provide details on this as this is a product roadmap/future question which depends on various factors like priority, resources etc.

    > Also, is the bug 859728 related to this?

    No, it is not related in this context.




  • 5.  RE: Use vsocket for TCLO messages from host to guest

    Posted Apr 22, 2025 10:07 AM

    Thanks for your answer Ravindra.

    > What benefits are you expecting out of this? Could you please highlight some of the benefits you see out of this?
    From VMware documentation and comments in open-vm-tools code, I understand that the vsockets are generally preferred in most cases of communication messages between guest and host, i.e. the RPC channels which can be either vsocket channel or backdoor-based channel.
    Since the VMCI device is present and the VMTOOLS_USE_VSOCKET macro is defined, for example with a Linux VM as guest, the vsocket channel is expected to be used for both directions of communication, RPCIn and RPCOut. In the latter case, it works indeed when sending a message from guest to host.
    I am not trying to gain anything extra by using exclusively the vsocket channel, since automatically reverting to the backdoor channel for the RPCIn works fine. However, I didn't find any official document where it mentions that "Using vsocket for TCLO messaging is disabled" besides the host logs.
    Also, in Vsockets Programming Guide, the following is mentioned: 
     For older virtual hardware versions without VMCI, the hypervisor reverts to a "backdoor" mechanism for communication. However VMware services introduced in new products may have no backdoor fallback, so some services may require VMCI to work correctly.

    So, when finding information like the aforementioned and using the latest VMware Workstation Pro version (17.6.3 build-24583834), I am just curious why the vsockets are not supported for the TCLO channel, as it is considered a more secure and low-latency mechanism compared to backdoor channel.