The configuration: Dom0: openSuse 11.1 xen kernel for x86_64 and Xen 3.3.1 DomU: MS Windows XP I want to pass a USB device with the identification 05e3:0100 to the DomU First attempt: I added a line usbdevice="host:05e3:0100" to the configuration file for the DomU already existing in /etc/vm. The file also contains the lines usb=1 usbdevice="tablet" . After rebooting the VM in DomU no USB device other than the "tablet" (mouse equivalent) is available. A look at the log files of the Dom0 reveals no mention of "host:05e3:0100". Second attempt: On the graphical console (vnc) of the VM running Windows I switched to the qemu monitor (version 0.9.1) with Alt+Crl+2 and entered the command "usb_add", and qemu answered: "unknown command: ''usb_add''; by the way, "help" doesn''t list "usb_add" either. So both approaches described in the Xen 3.3 User''s Guide and in some other places on the web don''t work. Since the only reason for running Windows is using a software package that isn''t available for Linux and that uses the USB device as input device, I''m stuck and need urgently help. Regards Willy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dustin Henning
2009-Feb-13 17:36 UTC
RE: [Xen-users] Passing USB device to MS Windows guest
I believe I read on this list that the version of qemu that ships with Xen only supports passing through one USB device and the tablet counts (but I can''t find the message). That said, if you get rid of the tablet and qemu will emulate a PS/2 mouse (not sure if it will or not), then you might be able to pass one other USB device through with the commands you are trying. Short of that, you can refer to this thread: http://lists.xensource.com/archives/html/xen-users/2007-06/msg00909.html and try PCI passthrough or network USB. Hopefully someone will correct me if I am wrong or this has changed. Good luck, Dustin -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Willy Weisz Sent: Friday, February 13, 2009 10:01 To: xen-users@lists.xensource.com Subject: [Xen-users] Passing USB device to MS Windows guest The configuration: Dom0: openSuse 11.1 xen kernel for x86_64 and Xen 3.3.1 DomU: MS Windows XP I want to pass a USB device with the identification 05e3:0100 to the DomU First attempt: I added a line usbdevice="host:05e3:0100" to the configuration file for the DomU already existing in /etc/vm. The file also contains the lines usb=1 usbdevice="tablet" . After rebooting the VM in DomU no USB device other than the "tablet" (mouse equivalent) is available. A look at the log files of the Dom0 reveals no mention of "host:05e3:0100". Second attempt: On the graphical console (vnc) of the VM running Windows I switched to the qemu monitor (version 0.9.1) with Alt+Crl+2 and entered the command "usb_add", and qemu answered: "unknown command: ''usb_add''; by the way, "help" doesn''t list "usb_add" either. So both approaches described in the Xen 3.3 User''s Guide and in some other places on the web don''t work. Since the only reason for running Windows is using a software package that isn''t available for Linux and that uses the USB device as input device, I''m stuck and need urgently help. Regards Willy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
jeroen groenewegen van der weyden
2009-Feb-16 09:43 UTC
[Xen-users] quick usb passthrough question
Hello, After reading more and more usb pass through documentation, I got confused My question is: is vt-d needed for usb pass through to work? Regards, Jeroen _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
jeroen groenewegen van der weyden
2009-Feb-16 13:01 UTC
Re: [Xen-users] quick usb passthrough question
This goes for HVM''s too? Best regards, jeroen groenewegen van der weyden J.Witvliet@MINDEF.NL wrote:> Short: no > Longer: I use an old system that has neither vt-d, not even vt support. > I can see USB-etokens in my paravirtualized dom-u > > hw > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jeroen > groenewegen van der weyden > Sent: Monday, February 16, 2009 10:43 AM > To: xen-users@lists.xensource.com > Subject: [Xen-users] quick usb passthrough question > > Hello, > > After reading more and more usb pass through documentation, I got > confused My question is: > is vt-d needed for usb pass through to work? > > > Regards, > > Jeroen > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > ______________________________________________________________________ > Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico''s verbonden aan het elektronisch verzenden van berichten. > > Bezoek onze vernieuwde website www.defensie.nl > > This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. > > Please visit our new website www.defensie.nl > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.0.237 / Virus Database: 270.10.24/1954 - Release Date: 02/15/09 18:09:00 > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
<J.Witvliet@MINDEF.NL>
2009-Feb-16 13:12 UTC
RE: [Xen-users] quick usb passthrough question
Can not say, my dom-0''s has no VT-support, so no HVM''s... Pci-delegation should work on HVM''s also (though a bit overkill) hw -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jeroen groenewegen van der weyden Sent: Monday, February 16, 2009 2:01 PM To: Witvliet, J, CDC/IVENT/OPS/I&S/PLS/SMP/HRM/RP1; xen-users Subject: Re: [Xen-users] quick usb passthrough question This goes for HVM''s too? Best regards, jeroen groenewegen van der weyden J.Witvliet@MINDEF.NL wrote:> Short: no > Longer: I use an old system that has neither vt-d, not even vtsupport.> I can see USB-etokens in my paravirtualized dom-u > > hw > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jeroen > groenewegen van der weyden > Sent: Monday, February 16, 2009 10:43 AM > To: xen-users@lists.xensource.com > Subject: [Xen-users] quick usb passthrough question > > Hello, > > After reading more and more usb pass through documentation, I got > confused My question is: > is vt-d needed for usb pass through to work? > > > Regards, > > Jeroen > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > ______________________________________________________________________ > Dit bericht kan informatie bevatten die niet voor u is bestemd. Indienu niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico''s verbonden aan het elektronisch verzenden van berichten.> > Bezoek onze vernieuwde website www.defensie.nl > > This message may contain information that is not intended for you. Ifyou are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.> > Please visit our new website www.defensie.nl > ---------------------------------------------------------------------- > -- > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.0.237 / Virus Database: 270.10.24/1954 - Release Date: > 02/15/09 18:09:00 > >_______________________________________________ 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
I know this thread says Windows, but that implies HVM, and my response is regarding QEMU, which HVM runs on. That said, while it may go more in depth than you need to, you might want to give it a quick read: http://lists.xensource.com/archives/html/xen-users/2009-02/msg00380.html Obviously, regarding the PCI passthrough suggestion, vt-d would be necessary, but the other options might work. Dustin -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jeroen groenewegen van der weyden Sent: Monday, February 16, 2009 08:01 To: J.Witvliet@MINDEF.NL; xen-users Subject: Re: [Xen-users] quick usb passthrough question This goes for HVM''s too? Best regards, jeroen groenewegen van der weyden J.Witvliet@MINDEF.NL wrote:> Short: no > Longer: I use an old system that has neither vt-d, not even vt support. > I can see USB-etokens in my paravirtualized dom-u > > hw > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jeroen > groenewegen van der weyden > Sent: Monday, February 16, 2009 10:43 AM > To: xen-users@lists.xensource.com > Subject: [Xen-users] quick usb passthrough question > > Hello, > > After reading more and more usb pass through documentation, I got > confused My question is: > is vt-d needed for usb pass through to work? > > > Regards, > > Jeroen > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > ______________________________________________________________________ > Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien uniet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico''s verbonden aan het elektronisch verzenden van berichten.> > Bezoek onze vernieuwde website www.defensie.nl > > This message may contain information that is not intended for you. If youare not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.> > Please visit our new website www.defensie.nl > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.0.237 / Virus Database: 270.10.24/1954 - Release Date: 02/15/0918:09:00> >_______________________________________________ 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
I actually didn''t start the thread I just liked you to, and my setup is probably nothing like yours. Additionally, I am not using any USB devices in my domUs. That said, I should have linked to here from the thread I linked you to: http://lists.xensource.com/archives/html/xen-users/2007-06/msg01046.html Maybe the success story hadn''t been posted yet. Perhaps it helps? Dustin From: jeroen groenewegen van der weyden [mailto:groen692@grosc.com] Sent: Monday, February 16, 2009 08:32 To: Dustin.Henning@prd-inc.com Subject: Re: [Xen-users] quick usb passthrough question I.ve read your thread. this is part of how I got confused :-( . Did you got it working finally? because your setup is similar to mine. I also use openSUSE 11.1 64 bit. Best regards, Jeroen. Dustin Henning wrote: I know this thread says Windows, but that implies HVM, and my response is regarding QEMU, which HVM runs on. That said, while it may go more in depth than you need to, you might want to give it a quick read: http://lists.xensource.com/archives/html/xen-users/2009-02/msg00380.html Obviously, regarding the PCI passthrough suggestion, vt-d would be necessary, but the other options might work. Dustin -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jeroen groenewegen van der weyden Sent: Monday, February 16, 2009 08:01 To: J.Witvliet@MINDEF.NL; xen-users Subject: Re: [Xen-users] quick usb passthrough question This goes for HVM''s too? Best regards, jeroen groenewegen van der weyden J.Witvliet@MINDEF.NL wrote: Short: no Longer: I use an old system that has neither vt-d, not even vt support. I can see USB-etokens in my paravirtualized dom-u hw -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jeroen groenewegen van der weyden Sent: Monday, February 16, 2009 10:43 AM To: xen-users@lists.xensource.com Subject: [Xen-users] quick usb passthrough question Hello, After reading more and more usb pass through documentation, I got confused My question is: is vt-d needed for usb pass through to work? Regards, Jeroen _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users ______________________________________________________________________ Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico''s verbonden aan het elektronisch verzenden van berichten. Bezoek onze vernieuwde website www.defensie.nl This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. Please visit our new website www.defensie.nl ------------------------------------------------------------------------ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.10.24/1954 - Release Date: 02/15/09 18:09:00 _______________________________________________ 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 ________________________________________ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.10.24/1954 - Release Date: 02/15/09 18:09:00 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Willy Weisz
2009-Mar-01 23:56 UTC
[Xen-users] Solved, but rather a crutch (Was: Passing USB device to MS Windows guest)
I''ve found the causes of my problems and have created a fix (but not a real solution) for it. The first step (which is a real solution): ''qemu-dm'' uses the out-fashioned (pre-kernel 2.6) /proc file system to access system information (more precisely the sub-directory /proc/bus/usb) and not the usbfs file system. The file /etc/fstab hass an entry for the mount point /proc/bus/usb that hooks the usbfs up there, but this is not done at boot time since it is prevented by the option ''noauto'' in said entry. The command ''mount /proc/bus/usb'' must be entered manually or put in a file in /etc/init.d/. This first step allows qemu the access to the USB devices. The second step should be to correct a conceptual bug in the handling of ''usbdevice'' in the Python routines called by the commands ''xend'' as well as ''xm'': ''usbdevice'' is considered to be part of the platform definition instead of being handled as a device entry. As part of the platform definition it only accepts a single instantiation with a single value (in my case only ''tablet'' or ''host:Id1:Id2''), handled as a device, it could be instantiated multiple times with different values. Lacking a good documentation on the information flow through the Python routines and the time to make a complete analysis of what parts of the code to patch (at least the routines xend/image.py, xm/main.py, xm/create.py and xm/xenapi_create.py), I decided to find a solution for my problem only: In order to be able to start a VM with multiple USB devices I extended the ''usbdevice'' option of the command ''xm create'' to accept a character string with a comma-separated list of USB devices (e.g. usbdevice=''tablet, host:05e3:0100'' with white-spaces allowed before and after any list entry) which translates to multiple ''usbdevice'' options for the ''qemu-dm'' command. The necessary patch for the routine xend/image.py is attached. This patch isn''t meant to be the solution, but rather a crutch solid enough for my actual needs. I hope that XEN developers will work on a real solution that will include the possibility to include multiple ''usbdevice'' definitions in the configuration files for the VMs, moving ''usbdevice'' from a platform entry to a device entry and defining a syntax for the configuration file entries. As for the unavailable entry ''usb_add'' in the qemu-dm monitor it is the result of a ''censorship'' measure by the authors of the openSuSE rpm package ''xen-tools''. As a consequence of the vulnerability CVE-2007-0998 reported by RedHat they deleted a few monitor commands thought to endanger the confidentiality of some Dom0 informations - neither Mitre nor NIST have yet fully assessed the ''danger'' despite the fact that the initial report dates from more than 2 years ago. The problem is not so much the patch itself (it can easily be removed by commenting out the corresponding patch in the xen.spec file of the source rpm or setting the variable CONFIG_TRUSTED_CLIENT, and rebuilding the package), but simply the fact that there is no mention of it anywhere in the doc files accompanying the rpm package nor on the openSuSE web site. The search for the reason for the ''missing monitor commands'' has cost a lot of the delay in finding a solution. Nevertheless the ''amputed'' qemu monitor is well suited for use with my patch. I hope this lengthy mail helps some XEN users, and kicks off the development of a real solution for the USB configuration of fully virtualised VMs. Regards Willy Willy Weisz wrote:> The configuration: > > Dom0: openSuse 11.1 xen kernel for x86_64 and Xen 3.3.1 > DomU: MS Windows XP > > I want to pass a USB device with the identification 05e3:0100 to the DomU > > First attempt: > I added a line > usbdevice="host:05e3:0100" > to the configuration file for the DomU already existing in /etc/vm. > The file also contains the lines > usb=1 > usbdevice="tablet" > . > > After rebooting the VM in DomU no USB device other than the "tablet" > (mouse equivalent) is available. > A look at the log files of the Dom0 reveals no mention of > "host:05e3:0100". > > Second attempt: > On the graphical console (vnc) of the VM running Windows I switched to > the qemu monitor (version 0.9.1) with Alt+Crl+2 and entered the > command "usb_add", and qemu answered: "unknown command: ''usb_add''; by > the way, "help" doesn''t list "usb_add" either. > > So both approaches described in the Xen 3.3 User''s Guide and in some > other places on the web don''t work. > > Since the only reason for running Windows is using a software package > that isn''t available for Linux and that uses the USB device as input > device, I''m stuck and need urgently help. > > Regards > Willy-- ----------------------------------------------------------- Willy Weisz European Centre for Parallel Computing at Vienna (VCPC) Institute of Scientific Computing University of Vienna Nordbergstrasse 15/C312 A-1090 Wien Tel: (+43 1) 4277 - 39424 Fax: (+43 1) 4277 - 9394 e-mail: weisz@vcpc.univie.ac.at _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Willy Weisz
2009-Mar-02 00:20 UTC
[Xen-users] Solved, but rather a crutch (Was: Passing USB device to MS Windows guest)
A second attempt without digital signature, which seems to impeach the full publication on the xen-users list. -- I''ve found the causes of my problems and have created a fix (but not a real solution) for it. The first step (which is a real solution): ''qemu-dm'' uses the out-fashioned (pre-kernel 2.6) /proc file system to access system information (more precisely the sub-directory /proc/bus/usb) and not the usbfs file system. The file /etc/fstab hass an entry for the mount point /proc/bus/usb that hooks the usbfs up there, but this is not done at boot time since it is prevented by the option ''noauto'' in said entry. The command ''mount /proc/bus/usb'' must be entered manually or put in a file in /etc/init.d/. This first step allows qemu the access to the USB devices. The second step should be to correct a conceptual bug in the handling of ''usbdevice'' in the Python routines called by the commands ''xend'' as well as ''xm'': ''usbdevice'' is considered to be part of the platform definition instead of being handled as a device entry. As part of the platform definition it only accepts a single instantiation with a single value (in my case only ''tablet'' or ''host:Id1:Id2''), handled as a device, it could be instantiated multiple times with different values. Lacking a good documentation on the information flow through the Python routines and the time to make a complete analysis of what parts of the code to patch (at least the routines xend/image.py, xm/main.py, xm/create.py and xm/xenapi_create.py), I decided to find a solution for my problem only: In order to be able to start a VM with multiple USB devices I extended the ''usbdevice'' option of the command ''xm create'' to accept a character string with a comma-separated list of USB devices (e.g. usbdevice=''tablet, host:05e3:0100'' with white-spaces allowed before and after any list entry) which translates to multiple ''usbdevice'' options for the ''qemu-dm'' command. The necessary patch for the routine xend/image.py is attached. This patch isn''t meant to be the solution, but rather a crutch solid enough for my actual needs. I hope that XEN developers will work on a real solution that will include the possibility to include multiple ''usbdevice'' definitions in the configuration files for the VMs, moving ''usbdevice'' from a platform entry to a device entry and defining a syntax for the configuration file entries. As for the unavailable entry ''usb_add'' in the qemu-dm monitor it is the result of a ''censorship'' measure by the authors of the openSuSE rpm package ''xen-tools''. As a consequence of the vulnerability CVE-2007-0998 reported by RedHat they deleted a few monitor commands thought to endanger the confidentiality of some Dom0 informations - neither Mitre nor NIST have yet fully assessed the ''danger'' despite the fact that the initial report dates from more than 2 years ago. The problem is not so much the patch itself (it can easily be removed by commenting out the corresponding patch in the xen.spec file of the source rpm or setting the variable CONFIG_TRUSTED_CLIENT, and rebuilding the package), but simply the fact that there is no mention of it anywhere in the doc files accompanying the rpm package nor on the openSuSE web site. The search for the reason for the ''missing monitor commands'' has cost a lot of the delay in finding a solution. Nevertheless the ''amputed'' qemu monitor is well suited for use with my patch. I hope this lengthy mail helps some XEN users, and kicks off the development of a real solution for the USB configuration of fully virtualised VMs. Regards Willy Willy Weisz wrote:> The configuration: > > Dom0: openSuse 11.1 xen kernel for x86_64 and Xen 3.3.1 > DomU: MS Windows XP > > I want to pass a USB device with the identification 05e3:0100 to the DomU > > First attempt: > I added a line > usbdevice="host:05e3:0100" > to the configuration file for the DomU already existing in /etc/vm. > The file also contains the lines > usb=1 > usbdevice="tablet" > . > > After rebooting the VM in DomU no USB device other than the "tablet" > (mouse equivalent) is available. > A look at the log files of the Dom0 reveals no mention of > "host:05e3:0100". > > Second attempt: > On the graphical console (vnc) of the VM running Windows I switched to > the qemu monitor (version 0.9.1) with Alt+Crl+2 and entered the > command "usb_add", and qemu answered: "unknown command: ''usb_add''; by > the way, "help" doesn''t list "usb_add" either. > > So both approaches described in the Xen 3.3 User''s Guide and in some > other places on the web don''t work. > > Since the only reason for running Windows is using a software package > that isn''t available for Linux and that uses the USB device as input > device, I''m stuck and need urgently help. > > Regards > Willy-- ----------------------------------------------------------- Willy Weisz European Centre for Parallel Computing at Vienna (VCPC) Institute of Scientific Computing University of Vienna Nordbergstrasse 15/C312 A-1090 Wien Tel: (+43 1) 4277 - 39424 Fax: (+43 1) 4277 - 9394 e-mail: weisz@vcpc.univie.ac.at _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users