VMWare: Serial port communication between 2 guests

Now now.. one of the best things that has happened to kernel programmers (like me on Linux) is the stability of the desktop virtualization. I am mean with super awesome stability and features of virtualization softwares like VMWare & VirtualBox the otherwise scary kernel debugging has taken a new sweet turn. I still remember how I needed 2 desktop (well, we used to work on desktops & not laptops for a long time!) to debug an ‘apparently unsolvable’ kernel crash. I remember doing days & weeks of reviewing the code & taking like a zillion kernel dumps and never solved it. Then I fought my way into the 2nd desktop, setup a remote debugging session and solved the issue in less than few hours! That is the power of connecting 2 computers, at least in the linux kernel debugging world.

Before we can remote debug linux kernel crash, let us first see how to connect 2 guest OS in, say, VMWare. This post is about how to enable ‘serial communication’ between 2 VMWare guest OS with windows host. JFYI, I am using ‘VMWare Workstation 8.0.6 build-1035888

Steps on Guest 1

  • Create a Serial port
step1 - create serial port
step1 – create serial port

 

  • Output the port data to named pipe
step2 - output data to named pipe
step2 – output data to named pipe

 

  • Enter the socket details as below:
    • Windows: \\.\pipe\com_1 (has to have the prefix: \\.\pipe\)

          Linux: /tmp/socket1 (pick any path, actually)

    • For the kernel to be debugged, select: ‘This end is the server.

         (pssst…. At the other end, select: ‘This end is the client.’)

    • Select ‘The other end is a virtual machine.
    • Device status: ‘Connected at power on
step3 - socket details
step3 – socket details

 

 

Steps on Guest 2

Exactly the same except in step 3b, where you select ‘This end is the client.

Voila! You are done! 🙂
These 2 virtual machines are now connected via a virtual serial cable & ready to start communicating!! The next step is start debugging 🙂

Pssst… on a later article, shall write about how to set up a serial port communication between guest & host. Another very useful use case.

No Comments

Post a Comment

%d bloggers like this: