Sometimes you just need good old serial console access — maybe to troubleshoot a headless server, recover from a broken network config, or simply because SSH isn’t an option. If your Linux host is running on VMware ESXi 5.5.0, you can actually hook into its serial console by using a named pipe and a bit of socat
magic.

Here’s how to get it done.
1. Enable serial access inside the Linux VM
First, make sure the VM itself is ready to serve a serial console session. On most modern Linux distros using systemd
, this means enabling the serial-getty
service:
# systemctl enable serial-getty@ttyS0.service
This will make the login prompt available on ttyS0
after each reboot.
2. List your VMs in ESXi
SSH into your ESXi host and get the list of registered VMs:
# vim-cmd vmsvc/getallvms
Find the VM you want and note its ID (the number in the first column).
3. Power off the VM
You can either shut it down from inside the guest OS:
# poweroff
Or, if that’s not possible, do it from ESXi:
# vim-cmd vmsvc/power.off ID
4. Make sure it’s really powered off
Double-check the VM’s state:
# vim-cmd vmsvc/power.getstate ID
It should return Powered off.
5. Edit the VM’s configuration
Open the VM’s .vmx
file (located in its directory on the datastore) and add these lines:
serial0.fileType = "pipe"
serial0.fileName = "/vmfs/volumes/datastore1/vm-host-dir/serial0.pipe"
serial0.tryNoRxLoss = "TRUE"
serial0.yieldOnMsrRead = "TRUE"
serial0.present = "TRUE"
serial0.pipe.endPoint = "server"
Make sure to adjust the path to match your VM’s folder.
6. Power the VM back on
# vim-cmd vmsvc/power.on ID
7. Get socat
on ESXi
ESXi doesn’t come with socat
built-in, but we need it to connect to our serial pipe.
You can build it yourself using my repo here:
https://github.com/heroseloi/socat-builder
Once compiled, SCP it over to your ESXi host.
8. Connect to the serial console
With socat
in place, run:
# socat -,raw,echo=0 UNIX-CONNECT:/vmfs/volumes/datastore1/vm-host-dir/serial0.pipe
If all went well, you should see something like:
Rocky Linux 8.10 (Green Obsidian)
Kernel 6.15.9-1.el8.elrepo.x86_64 on an x86_64
server login:
Boom — you’re in the VM’s console without needing a virtual display.
Summary
That’s it — you’ve just set up a working serial console for a Linux VM on ESXi 5.5.0.
The key steps were:
- Enabling the serial-getty service in Linux.
- Configuring the VMX file to use a named pipe for serial output.
- Using
socat
to hook into that pipe from ESXi.
It’s a handy trick for rescue situations, minimal VM setups, or when you just want a bit of retro charm in your sysadmin life.