3 Configuring virtual machines You can use either the graphical user interface or the command-line VBoxManage tool to set up virtual serial ports. For the latter, please refer to chapter 8.7, VBoxManage modifyvm, page 109 in that section, look for the --uart and --uartmode options. 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 values8, 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 the device, 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 Solaris hosts, it will be a device node like /dev/ttyS0). VirtualBox will then simply redirect all data received from and sent to the virtual serial port to the physical device. You can tell VirtualBox to connect the virtual serial port to a software pipe on the host. This depends on your host operating system: On a Windows host, data will be sent and received through a named pipe. You can use a helper program called VMware Serial Line Gateway, available for down- load at http://www.l4ka.org/tools/vmwaregateway.php. This tool provides a fixed server mode named pipe at \\.\pipe\vmwaredebug and connects incom- ing TCP connections on port 567 with the named pipe. On a Mac, Linux or OpenSolaris host, a local domain socket is used instead. On Linux there are various tools which can connect to a local domain socket or create one in server mode. The most flexible tool is socat and is available as part of many distributions. In this case, you can configure whether VirtualBox should create the named pipe (or, on non-Windows hosts, the local domain socket) itself or whether VirtualBox should assume that the pipe (or socket) exists already. With the VBoxManage command-line options, this is referred to as “server” or “client” mode, respectively. Up to two serial ports can be configured simultaneously per virtual machine, but you can pick any port numbers out of the above. For example, you can configure two serial ports to be able to work with COM2 and COM4 in the guest. 3.10 USB support 3.10.1 USB settings The “USB” section in a virtual machine’s Settings window allows you to configure VirtualBox’s sophisticated USB support. VirtualBox can allow virtual machines to access the USB devices on your host directly. To achieve this, VirtualBox presents the guest operating system with a virtual USB controller. As soon as the guest system starts using a USB device, it will appear as unavailable on the host. 8See, for example, http://en.wikipedia.org/wiki/COM_(hardware_interface). 49
Previous Page Next Page