2.9. Legacy Commands for Using Serial Ports

In legacy releases, Oracle VM VirtualBox provided support for virtual serial ports. This was rather complicated to set up, requiring a sequence of VBoxManage setextradata statements. That method of setting up serial ports is no longer necessary and deprecated. To set up virtual serial ports, use the methods described in Serial Ports.

Note

For backwards compatibility the legacy setextradata statements, which are described below, take precedence over the new way of configuring serial ports. As a result, if configuring serial ports the new way does not work, make sure the VM in question does not have old configuration data such as below still active.

The legacy sequence of configuring a serial port used the following commands:

VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/serial/0/Config/IRQ" 4
VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location" "\\.\pipe\vboxCOM1"
VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/IsServer" 1

This sets up a serial port in the guest with the default settings for COM1 (IRQ 4, I/O address 0x3f8) and the Location setting assumes that this configuration is used on a Windows host, because the Windows named pipe syntax is used. Keep in mind that on Windows hosts a named pipe must always start with \\.\pipe\. On Linux the same configuration settings apply, except that the path name for the Location can be chosen more freely. Local domain sockets can be placed anywhere, provided the user running Oracle VM VirtualBox has the permission to create a new file in the directory. The final command above defines that Oracle VM VirtualBox acts as a server. It creates the named pipe itself instead of connecting to an already existing one.