
3 Configuring virtual machines
3.9 Serial ports
VirtualBox fully supports virtual serial ports in a virtual machine in an
Ever since the original IBM PC, personal computers have been equipped with one or two serial ports (also called COM ports by DOS and Windows). While these are no longer as important as they were until a few years ago (especially since mice are no longer connected to serial ports these days), there are still some important uses left for them. For example, serial ports can be used to set up a primitive network over a null- modem cable, in case Ethernet is not available. Also, serial ports are indispensable for system programmers needing to do kernel debugging, since kernel debugging software usually interacts with developers over a serial port. In other words, with virtual serial ports, system programmers can do kernel debugging on a virtual machine instead of needing a real computer to connect to.
If a virtual serial port is enabled, the guest operating system sees it a standard
You can use either the graphical user interface or the
In either case, you can configure up to two virtual serial ports simultaneously. For each such device, you will need to determine
1.what kind of serial port the virtual machine should see by selecting an I/O base address and interrupt (IRQ). For these, we recommend to use the traditional values4, which are:
a)COM1: I/O base 0x3F8, IRQ 4
b)COM2: I/O base 0x2F8, IRQ 3
c)COM3: I/O base 0x3E8, IRQ 4
d)COM4: I/O base 0x2E8, IRQ 3
2.Then, you will need to determine what this virtual port should be connected to. For each virtual serial port, you have the following options:
•You can elect to have the virtual serial port “disconnected”, which means that the guest will see it as hardware, but it will behave as if no cable had been connected to it.
•You can connect the virtual serial port to a physical serial port on your host. (On a Windows host, this will be a name like COM1; on Linux or OpenSolaris hosts, it will be a device node like /dev/ttyS0). VirtualBox
3Serial port support was added with VirtualBox 1.5.
4See, for example, http://en.wikipedia.org/wiki/COM_(hardware_interface).
55