David Griswold
2009-May-10 03:48 UTC
[Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server.
Here is my setup - CentOS 5.2, fully yum-updated and Xen 3.0.3. I have a working Windows 2003 Server HVM that has access to one serial port via emulation (serial="/dev/ttySXX in the domU config file.) I have tried, without success, to give two serial ports to the HVM by modifying the config file as follows: serial = "/dev/ttys0" serial = "/dev/ttys1" (this did nothing - no serial ports in the HVM - I realize now this is the wrong syntax) or serial = [ "/dev/ttys0", "/dev/ttys1" ] This is the correct syntax, but the HVM won''t start. I have googled this until my eyes have bled, and the conclusion I have come to is that the binaries are complied to support just one serial port per HVM. So here is my questions: Can I modify the config and recompile the source for xen and/or qemu to provide more than one serial port per HVM. If I can just get someone to point me in the right direction, I would greatly appreciate it. Thanks, David -- View this message in context: http://www.nabble.com/Need-to-Access-2-Serial-Ports-in-HVM-Win-2K3-server.-tp23463476p23463476.html Sent from the Xen - User mailing list archive at Nabble.com. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dustin Henning
2009-May-11 13:39 UTC
RE: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server.
This might not be something you want to mess with, but if you have VT-D or IOMMU capability, you should be able to pass a PCI card through to your guest, and I believe you can still get a PCI card that has serial ports. It may also be more plausible to make PCI passthrough work without those than to add a second virtual one, but it should be noted that doing so would be a security risk. It should also be possible to somehow use serial ports over the network, that may not work for you needs, but one example would be to get a networked usb hub and connect to it, connecting usb -> serial adapter ports to it. I don''t know if you''ll be able to find one that meets your needs, though, I have seen hit and miss functionality using usb -> serial adapter ports for various serial functions. I can''t guarantee that any of these ideas would work, but they might be worth a shot. Dustin -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of David Griswold Sent: Saturday, May 09, 2009 23:48 To: xen-users@lists.xensource.com Subject: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server. Here is my setup - CentOS 5.2, fully yum-updated and Xen 3.0.3. I have a working Windows 2003 Server HVM that has access to one serial port via emulation (serial="/dev/ttySXX in the domU config file.) I have tried, without success, to give two serial ports to the HVM by modifying the config file as follows: serial = "/dev/ttys0" serial = "/dev/ttys1" (this did nothing - no serial ports in the HVM - I realize now this is the wrong syntax) or serial = [ "/dev/ttys0", "/dev/ttys1" ] This is the correct syntax, but the HVM won''t start. I have googled this until my eyes have bled, and the conclusion I have come to is that the binaries are complied to support just one serial port per HVM. So here is my questions: Can I modify the config and recompile the source for xen and/or qemu to provide more than one serial port per HVM. If I can just get someone to point me in the right direction, I would greatly appreciate it. Thanks, David -- View this message in context: http://www.nabble.com/Need-to-Access-2-Serial-Ports-in-HVM-Win-2K3-server.-t p23463476p23463476.html Sent from the Xen - User mailing list archive at Nabble.com. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Griswold
2009-May-11 13:49 UTC
RE: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server.
I don''t think I want to mess with PCI passthrough. The serial ports I am trying to access are actually on a 8 port Mainpine OCTO+ fax/modem. Six of those ports are being used by Hylafax, running in the Dom0, and I want to give the other two ports to the Win2k3 running in the DomU. Currently, I the DomU can access only one. All I want to do is give it access to the other one. David This might not be something you want to mess with, but if you have VT-D or IOMMU capability, you should be able to pass a PCI card through to your guest, and I believe you can still get a PCI card that has serial ports. It may also be more plausible to make PCI passthrough work without those than to add a second virtual one, but it should be noted that doing so would be a security risk. It should also be possible to somehow use serial ports over the network, that may not work for you needs, but one example would be to get a networked usb hub and connect to it, connecting usb -> serial adapter ports to it. I don''t know if you''ll be able to find one that meets your needs, though, I have seen hit and miss functionality using usb -> serial adapter ports for various serial functions. I can''t guarantee that any of these ideas would work, but they might be worth a shot. Dustin -- View this message in context: http://www.nabble.com/Need-to-Access-2-Serial-Ports-in-HVM-Win-2K3-server.-tp23463476p23483701.html Sent from the Xen - User mailing list archive at Nabble.com. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Trolle Selander
2009-May-11 16:58 UTC
Re: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server.
The multiple serial port option is very recent and definitely not in the yum-available xen packaged for CentOS. If you need multiple serial ports with an older version of xen, you''ll need to use a wrapper qemu-dm script that adds the serial ports to the qemu-dm commandline. -- Trolle On Sat, May 9, 2009 at 11:48 PM, David Griswold <david.griswold@gmail.com>wrote:> > Here is my setup - CentOS 5.2, fully yum-updated and Xen 3.0.3. I have a > working Windows 2003 Server HVM that has access to one serial port via > emulation (serial="/dev/ttySXX in the domU config file.) I have tried, > without success, to give two serial ports to the HVM by modifying the > config > file as follows: > > serial = "/dev/ttys0" > serial = "/dev/ttys1" > (this did nothing - no serial ports in the HVM - I realize now this is the > wrong syntax) > > or: > > serial = [ "/dev/ttys0", "/dev/ttys1" ] > > This is the correct syntax, but the HVM won''t start. > > I have googled this until my eyes have bled, and the conclusion I have come > to is that the binaries are complied to support just one serial port per > HVM. So here is my questions: Can I modify the config and recompile the > source for xen and/or qemu to provide more than one serial port per HVM. > > If I can just get someone to point me in the right direction, I would > greatly appreciate it. > > Thanks, > David > -- > View this message in context: > http://www.nabble.com/Need-to-Access-2-Serial-Ports-in-HVM-Win-2K3-server.-tp23463476p23463476.html > Sent from the Xen - User mailing list archive at Nabble.com. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Griswold
2009-May-11 20:35 UTC
Re: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server.
Ok, so I saved the attached script to /usr/lib/xen/bin/qemu.2serial, chmod to 755 and added this to the domU config file: device_model = "/usr/lib/xen/bin/qemu-dm.2serial" and removed the ''serial ='' entries from the config. I started the vm and I get the same results as before with the vm listed but not running. There doesn''t appear to be anything more in the logs. David _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Griswold
2009-May-13 01:52 UTC
RE: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server.
Sorry - I thought I had sent my last reply to the list as well. Thanks for the advice, that is exactly what I did, and it worked, in that I could see and access to serial ports in the Win2k3 domU. Unfortunately, I think I am going to have to scrap this configuration. I am running Hylafax in the dom0 and serial port performance under the xen kernel is not acceptable. I can''t even reliable receive one fax at a time let alone have all 8 ports on the 8 port fax modem active at once. When I boot into the native kernel, I have no issues at all. I would have expected this had I been running hylafax in a domU, but not the dom0. Have you seen performance issues in regards to serial ports? David -----Original Message----- From: Trolle Selander [mailto:trolle.selander@gmail.com] Sent: Tuesday, May 12, 2009 4:59 PM To: David Griswold Subject: Re: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server. You could let the config file create com1 and let the wrapper script only add com2. -- Trolle On Tue, May 12, 2009 at 5:52 PM, David Griswold <david.griswold@gmail.com> wrote: I had a brain fart when I created the qemu.2serial script - forgot to put the ''#! /bin/bash'' at the top of it. Since, I have upgraded to xen 3.3.1 from the the gitco repo. I am still having issues. It seems that by default qemu-dm will provide more emulated hardware, like a serial and parallel port, unless you tell it not to (serial none). When I have attempted to configure the .sxp file with more than one serial port, the vm won''t start. If I use the wrapper script, then I get a ''com1'' and ''com2'' in the device manager, but com1 doesn''t work and in fact hyperterminal sees two ''com1'' ports. I am sure this is a confusion between the default serial port provided to the vm and the serial ports I am trying to give to it via the wrapper script. So, I succeeded in starting a hvm where windows sees two serial ports, but one of them doesn''t work. David On Mon, May 11, 2009 at 3:35 PM, David Griswold <david.griswold@gmail.com> wrote:> Ok, so I saved the attached script to /usr/lib/xen/bin/qemu.2serial, > chmod to 755 and added this to the domU config file: > > device_model = "/usr/lib/xen/bin/qemu-dm.2serial" > > and removed the ''serial ='' entries from the config. I started the vm > and I get the same results as before with the vm listed but not > running. There doesn''t appear to be anything more in the logs. > > David >No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.26/2110 - Release Date: 05/12/09 06:22:00 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Trolle Selander
2009-May-13 03:00 UTC
Re: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 server.
You did send to the list as well - I just forgot to press "reply to all" rather than reply in gmail. :) Anyway, I haven''t looked into this for a long time, but I know there were issues with serial ports when recieving, and though I''m not completely positive exactly what is going on, my guess is an interrupt latency issue - the time between the FIFO threshold interrupt happening and the serial driver actually processing the interrupt may be too long, allowing the FIFO to overfill and characters to be lost. If your 8 port serial card has modern enough UARTs to support hardware flow control, you could try turning that on to see if it makes a difference. I had some success in improving this situation by dedicating one cpu strictly to dom0. Also, the improved serial emulation in qemu-dm in Xen versions from 3.2 and newer also helps some. -- Trolle On Tue, May 12, 2009 at 9:52 PM, David Griswold <david.griswold@gmail.com>wrote:> Sorry - I thought I had sent my last reply to the list as well. > > Thanks for the advice, that is exactly what I did, and it worked, in that I > could see and access to serial ports in the Win2k3 domU. Unfortunately, I > think I am going to have to scrap this configuration. I am running Hylafax > in the dom0 and serial port performance under the xen kernel is not > acceptable. I can''t even reliable receive one fax at a time let alone have > all 8 ports on the 8 port fax modem active at once. When I boot into the > native kernel, I have no issues at all. I would have expected this had I > been running hylafax in a domU, but not the dom0. > > Have you seen performance issues in regards to serial ports? > > David > > -----Original Message----- > *From:* Trolle Selander [mailto:trolle.selander@gmail.com] > *Sent:* Tuesday, May 12, 2009 4:59 PM > *To:* David Griswold > *Subject:* Re: [Xen-users] Need to Access 2 Serial Ports in HVM Win 2K3 > server. > > You could let the config file create com1 and let the wrapper script only > add com2. > > -- Trolle > > On Tue, May 12, 2009 at 5:52 PM, David Griswold <david.griswold@gmail.com>wrote: > >> I had a brain fart when I created the qemu.2serial script - forgot to >> put the ''#! /bin/bash'' at the top of it. >> >> Since, I have upgraded to xen 3.3.1 from the the gitco repo. I am >> still having issues. It seems that by default qemu-dm will provide >> more emulated hardware, like a serial and parallel port, unless you >> tell it not to (serial none). When I have attempted to configure the >> .sxp file with more than one serial port, the vm won''t start. If I >> use the wrapper script, then I get a ''com1'' and ''com2'' in the device >> manager, but com1 doesn''t work and in fact hyperterminal sees two >> ''com1'' ports. I am sure this is a confusion between the default >> serial port provided to the vm and the serial ports I am trying to >> give to it via the wrapper script. >> >> So, I succeeded in starting a hvm where windows sees two serial ports, >> but one of them doesn''t work. >> >> David >> >> On Mon, May 11, 2009 at 3:35 PM, David Griswold >> <david.griswold@gmail.com> wrote: >> > Ok, so I saved the attached script to /usr/lib/xen/bin/qemu.2serial, >> > chmod to 755 and added this to the domU config file: >> > >> > device_model = "/usr/lib/xen/bin/qemu-dm.2serial" >> > >> > and removed the ''serial ='' entries from the config. I started the vm >> > and I get the same results as before with the vm listed but not >> > running. There doesn''t appear to be anything more in the logs. >> > >> > David >> > >> > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.325 / Virus Database: 270.12.26/2110 - Release Date: 05/12/09 > 06:22:00 > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users