楼主: zjf_cumt
收起左侧

[已解决] 实体机XP 装Virtual BOX 虚拟机2003中如何添加串口 在线等高手

 关闭 [复制链接]
IllusionWing
发表于 2010-3-17 13:24:29 | 显示全部楼层
按帮助貌似该选Host Device
zjf_cumt
 楼主| 发表于 2010-3-17 13:39:32 | 显示全部楼层
回复 9# zebao


    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 Section 8.5, “VBoxManage modifyvm”; 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

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 values[8], which are:

COM1: I/O base 0x3F8, IRQ 4

COM2: I/O base 0x2F8, IRQ 3

COM3: I/O base 0x3E8, IRQ 4

COM4: I/O base 0x2E8, IRQ 3

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 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 download at http://www.l4ka.org/tools/vmwaregateway.php. This tool provides a fixed server mode named pipe at \\.\pipe\vmwaredebug and connects incoming 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.

理解起来  比较苦难啊
IllusionWing
发表于 2010-3-17 13:41:05 | 显示全部楼层
回复 12# zjf_cumt


    那帮助对你唯一的作用就是告诉你应该选Host device(如果确实有个设备连在你的电脑上),否则就是Host pipe,其他啥也没说。。
zjf_cumt
 楼主| 发表于 2010-3-17 13:44:51 | 显示全部楼层
回复 13# IllusionWing


    Note
For backwards compatibility, the old setextradata statements, whose description is retained below from the old version of the manual, take precedence over the new way of configuring serial ports. As a result, if configuring serial ports the new way doesn't work, make sure the VM in question does not have old configuration data such as below still active.

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

VBoxManage setextradata "YourVM"
   "VBoxInternal/Devices/serial/0/Config/IRQ" 4
VBoxManage setextradata "YourVM"
   "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
VBoxManage setextradata "YourVM"
   "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
VBoxManage setextradata "YourVM"
   "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
VBoxManage setextradata "YourVM"
   "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location"
   "\\.\pipe\vboxCOM1"
VBoxManage setextradata "YourVM"
   "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 config 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 VirtualBox has the permission to create a new file in the directory. The final command above defines that VirtualBox acts as a server, i.e. it creates the named pipe itself instead of connecting to an already existing one.


这里还有一段呢
IllusionWing
发表于 2010-3-17 13:47:20 | 显示全部楼层
回复 14# zjf_cumt


    早看完了。VB的User Manual,上述的指令是直接对VBOXManage,对VB的核心生效的,对VB的GUI界面版本无效,也用不着。
zjf_cumt
 楼主| 发表于 2010-3-17 14:09:10 | 显示全部楼层
回复 15# IllusionWing


    用
端口号   com1
端口模式 host device
端口路径 com1  (这里是不是这样设置的啊 还是 \\pipe.\vbox 什么的)

虚拟机起来后 设备管理器里没有
IllusionWing
发表于 2010-3-17 14:10:09 | 显示全部楼层
回复 16# zjf_cumt


    PIPE那个是管道。。是用于模拟COM的。。
zjf_cumt
 楼主| 发表于 2010-3-17 14:13:54 | 显示全部楼层
回复 17# IllusionWing


    先不走pipe
走host  device 看看 行不行
zjf_cumt
 楼主| 发表于 2010-3-17 14:25:41 | 显示全部楼层
本帖最后由 zjf_cumt 于 2010-3-17 14:30 编辑

还是不行 按照3图的设置
进虚拟系统后 没有串口 如2 图
IllusionWing
发表于 2010-3-17 14:29:54 | 显示全部楼层
VMGuestAddition装没?
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2025-2-6 19:08 , Processed in 0.096242 second(s), 14 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表