How to redirect a Hyper-V COM port named pipe to a file

comhyper-vserialvirtual-machinesvmware-esx

I would like to redirect the serial port output on RedHat 5.7 to some recordable or reviewable medium.

The normal way to do this on a physical machine is to add the console parameters to the kernel in grub like what's below, connect it to another machine via a serial port and null modem cable and use minicom, hyperterminal or TeraTerm with matching settings, which would enable viewing the console startup messages on the machine and debug output if the kernel crashes (and log them to a file in the case of Tera Term).

kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=128M@16M console=tty0 console=ttyS0,38400 hda=noprobe hdb=noprobe

In VMWare ESX I could do something similar, where the serial port can be redirected to a file giving me the same effect.

Hyper-V redirects serial output to a named pipe, no file option.

Is there a program that I can run on the Hyper-V hypervisor that lets me capture the named pipe to a file? (Could I do this with HyperTerminal or TeraTerm somehow?) Or would I have to write a program from scratch to accomplish this?

Best Answer

Under Windows 10

  1. Run PuTTY as administrator
  2. In the session options, select Serial
  3. Set the Serial Line to the named pipe, e.g. \\.\pipe\my_named_pipe
  4. Set the Speed to something faster if desired
Related Topic