Port number refers to the symbol of serial port in WinXP in VirtualBox;
Selecting the host device as the port mode means that VirtualBox and Ubuntu*** use the same physical serial port;
The port location /dev/ttyS0 indicates the device number of the physical port used for virtual reality * * * in the host OS Ubuntu.
-So the port 1 in VirtualBox is set successfully.
2. After entering the guest operating system WinXP:
(1) Although a serial port device has been set for Guest OS WinXp in VirtualBox, I can't see it in the device manager after entering WinXp, so I enter the control panel->; Add hardware and select "Yes, I have connected this hardware"-> "add a new hardware device"->; "Automatically search for installation hardware", sometimes this can automatically detect and install COM1;
(2) If there is no automatic search for com devices, you need to manually select "Port (COM and LPT)"->; "standard port type"->; "communication port", but this will not get COM 1 but COM3 equipment, and the driver is incorrect; In the device manager, right-click com 3- > properties->; Resources-> Manual configuration, in fact, nothing needs to be changed here, just confirm it directly, and then the system will prompt to restart. After restarting, COM3 can be used normally;
After the restart, if you don't like COM3 and want to use COM 1, this time is also very easy. Uninstall the COM3 device in the Device Manager and repeat the above process (1). COM 1 will definitely be detected automatically.
In this way, you can use the physical serial port directly and normally in VirtualBox like the host ~ ~ ~ ~
-
The purpose of this paper is to explain in English how to configure a serial port in VirtualBox official website:
serial port
Translate it into Chinese, and the screenshot shows how to configure it accordingly.
Before translation, write a cross-sectional diagram to explain that the virtual machine in the common VirtualBox does not open the corresponding serial port by default, and its configuration corresponds to this:
(Take an XP virtual machine in VirtualBox as an example. )
Regarding the virtual machine in VirtualBox, why do you still need to use the serial port part? I won't translate it.
Direct translation, and configuration of serial port related content:
How to configure serial port
You can configure the corresponding serial port through the graphical interface of VirtualBox or the command line tool VBoxManage.
Graphical interface: it is the virtual machine configuration in the screenshot above-> Serial port->; Port 1, just set it directly;
VBoxManage: There is not much explanation here. If you are interested, take a look at it yourself: VBoxManage modifyvm, and download the necessary tools here: VMWare serial line gateway.
Limit on the number of serial ports
Each virtual machine supports up to 2 serial ports, namely, port 1 and port 2 in the screenshot above.
Because most people don't use serial ports, by default, neither port is open.
To configure a serial port
Set serial number
Which COM to use.
By default, there are four types, namely:
COM 1: I/O base address 0x3F8, IRQ 4.
COM2: I/O-based 0x2F8, IRQ 3
COM3: I/O-based 0x3E8, IRQ 4
COM4: I/O-based 0x2E8, IRQ 3
In the graphical interface, corresponding to the port number:
Set the type of port (mode)
Currently, four modes are supported:
Not connected
Set to not connected, then what you see in the virtual machine is a serial port, but there is no physical connection.
The corresponding setting is the simplest:
Main engine pipeline
Set the serial port on the host as a pipe (a software concept of pipe)
How to set:
In Windows system: the first name must be
\ \. \ Pipeline \< Name & gt
Name yourself (of course, you should have a meaningful name corresponding to your virtual machine)
Mac/Linux/Soloris: a local domain socket. At the same time, it is necessary to ensure that the virtual machine has corresponding access rights. Among them, /tmp is commonly used, and then corresponding tools such as socat are used for management and operation.
Here, you can set the following:
Host equipment
To put it bluntly, it corresponds to the serial port in the real computer with your host.
For example, if you have a COM 1 in your computer, it will be set as the corresponding host device and written to the corresponding port.
Windows system: COM 1
Linux class system: similar to /dev/ttyS0.
Here, for the XP virtual machine, it should be set as follows:
Bare file
Output the serial port and put it into a file.
The specific settings are very simple, such as I created a file under the corresponding virtual machine disk. Vdi path:
d:\ tmp \ tmp _ dev _ root \ virutalbox \ XP \ deepin _ XP _ com 1 . txt
Then set it as an empty file and fill in the above file:
Do it.
Some preventive measures
It is easy to think that if two serial ports are used, it is best not to set them to the same COM, for example, they are both set to COM 1, which is easy to cause problems. Because two * * * share the same interrupt.
In addition, if two serial ports are used, it is better to use COM 1 and COM2 instead of COM 1 and COM3, because COM 1 and COM2.
Its principle can be seen from the initial configuration of COM 1 to COM4. Try to make two serial ports, and the use of resources should not conflict.