VMware
4 Replies Last post: Sep 24, 2009 9:13 AM by Andreas Johan…  

Typo in VMCI socket documentation and other issues posted: Feb 9, 2009 12:18 AM

Click to view Andreas Johansson's profile Enthusiast 43 posts since
Nov 18, 2006
Hi,

I'm experimenting with the new VMCI-socket library at the moment and thought I should share some of the issues I have stumbled upon.

1. You can't use the new library with VMs that are created using VMware Workstation older than version 6.0.
  • Issue: VMCI is grayed out in the GUI. (The new pciBridge isn't available in earlier versions)
  • Solution: Upgrade the VM to at least version 6.0 (VM -> Upgrade or change version... - when the VM is powered off)

2. There is a typo in the documentation that results in that you can't call the getsockname() function on a VM (it works on the host though) if you are following the datagram instructions.
  • Issue: In the stream section of the documentation the "my_addr_size" variable is initialized with "sizeof my_addr", but in the datagram section this is left out.
  • Solution: Add the same assignment (but to the "svm_size" variable) in the datagram section before calling the getsockname() function.

Since VMware doesn't provide an example application for testing I coded a proof of concept implementation (Only datagram at the moment) that you can use as a base in your own tests.

Kind Regards
Andreas

Message was edited by: Andreas Johansson - updated the VmciSocketExample to v0.0.2 (It's now possible to provide servers listening port)
Attachments:
Click to view tut's profile Enthusiast 43 posts since
Apr 4, 2008

Andreas, thanks very much for correcting our documentation for the next release. Thanks also for your sample program, which will be useful to the community.

For use with VMCI Sockets, VMware recommends upgrading virtual machines to virtual hardware version 7, not 6. Experimental VMCI (without Sockets) was first supported in vHW version 6, but VMCI Sockets is not tested with version 6. Interesting that you imply version 6 works!

Click to view AnthonySowden's profile Novice 14 posts since
Jan 18, 2007


Andreas

Many thanks for uploading your vmciSocketExample program. I have used this to bootstrap my own development.

One small bug in your example: when you parse the CID value from the command args, you have to use an unsigned integer conversion, rather than the signed atoi. I guess you were lucky with your CIDs. I was initially too. I then had a CID with the top bit set, which was printed as a very large positive number, but parsed by atoi as a quite different value. Took me a while to work this one out.

Anthony

Developer Social Media

Communities