Tuesday, June 9, 2015

Mac, Fusion, and Serial Console

I use a Mac. I use Fusion. So far, so good.

One day, I want to debug window kernel. I have two VMWare Fusion VMs. So...how hard can it be!

Well, Fusion (at least with 7.1) does not give you the pretty GUI for configuring serial port. Yes, you can add a serial port. But no, you may not connect that port to another port on another VM. What the hell.... So, after quite some pain trying to connect two VMs in Fusion, I noted the steps here to make life easier for me, and for others.


  • Make sure you have 2 VMs: One debugger, aka the god mode machine. With an attached debugger, you can pretty much tell the other guy what to do. One debugee, aka your sand box, playbox, what ever. Make sure you know and remember which one is which.
  • Add a serial port to both machines, using the pretty GUI and your shiny Mac. Use whatever names you want for the port/file. If you can not get pass this step, please close the laptop and stop reading.
  • Power off both machines cleanly.
  • Open the VMX file for your debugger machine with your favorite text editor. I use VI. Now, depend on the number of serial ports you have, the number X in "serialX" may change. Add these settings to your debugger:
  • serialX.fileType = "pipe"
    serialX.fileName = "/path/to/temporary_pipe"
    serialX.pipe.endPoint = "client"
  • Open the VMX file on your debugee. Also, add these settings to the proper serial device:
  • serialX.fileType = "pipe"
    serialX.fileName = "/path/to/temporary_pipe"
    serialX.pipe.endPoint = "client"
  • Voila, done!
If you have an easier (official) way to do it, please let me know.

No comments:

Post a Comment