VirtualBox VM failing to start with virtual serial port

I recently needed to emulate an RS232 serial port in a Linux guest VM running in VirtualBox on Windows 7.

Specifically I needed to map the virtual serial port to a TCP network port.

 

This didn’t work as expected. When the serial port was enabled the virtual machine crashed immediately on startup with this message:

The instruction at 0xcdcfdcab referenced memory at 0x00000018.
The memory could not be read.

Click on OK to terminate the program
Click on CANCEL to debug the program

 

Followed by another message:

Failed to open a session for the virtual machine PM Devel.

The VM session was aborted.

Result Code: E_FAIL (0x80004005)
Component:   SessionMachine
Interface:   ISession {7844aa05-b02e-4cdd-a04f-ade4a762e6b7}

 

I checked for problem causes using Event Viewer, VBox.log, Process Monitor, Procdump and WinDbg. Unfortunately none of these revealed the cause.

 

I rechecked the settings and noticed: Connect to existing pipe/socket

This was checked by default. Tried unchecking the setting.

 

This solved the problem.

The virtual machine could start normally and communication between the virtual RS232 serial port and the TCP network port worked.

Be aware that a VirtualBox VM may also crash on shutdown in a similar way, if the TCP port is still connected.

VirtualBox only running 32-bit VMs

Today I experienced that VirtualBox would only run 32-bit virtual machines on a laptop.

That was a problem for me, because I wanted to do try some things on a 64-bit Ubuntu Server.

Troubleshooting

I decided to reboot and check the BIOS virtualization settings.

There I discovered that both “Intel Virtualization Technology” and “Intel VT-d Feature” were disabled.

I enabled the settings, started Windows and after that 64-bit virtual machines could run again in VirtualBox.

I was convinced that the settings were enabled before, but I suspect that BIOS settings were reset the last time I updated to a new BIOS version.

Conclusion

If you can’t run 64-bit virtual machines in VirtualBox, check and adjust your virtualization settings in BIOS/UEFI.