Dear all, I have been trying to connect a usb external disk to a Windows Server 2008 guest through Xen 3.2. The guest is working properly and its .cfg file is: ******************************************* import os, re arch = os.uname()[4] if re.search(''64'', arch): arch_libdir = ''lib64'' else: arch_libdir = ''lib'' kernel = "/usr/lib/xen/boot/hvmloader" builder=''hvm'' memory = 2048 vcpus=4 shadow_memory = 8 name = "communicator" vif = [ ''bridge=eth0'' ] acpi = 1 apic = 1 disk = [ ''phy:/dev/lvm1/communicator,hda,w'', ''phy:/dev/cdrom,hdc:cdrom,r'' ] vfb = [ ''type=vnc,vncdisplay=10'' ] device_model = ''/usr/'' + arch_libdir + ''/xen/bin/qemu-dm'' boot="dc" monitor=1 sdl=1 vnc=0 serial=''pty''seems to ********************************************** (I got most of the options from some tutorials on how to create windows machines) The USB disk is plugged in to the hypervisor and shows up on "lsusb". According to what I read on some pages, a problem might arise without usbfs active, so I mounted it under /proc/bus/usb and now I can see my device info in /proc/bus/usb/devices . My problem is that, after accessing my VM via virt-viewer and hitting Ctr-Alt-2 to go to the HVMXen prompt, trying "usb_add host:xxx:yyy" (from lsusb) just yields: "Could not connect USB device host:xxx:yyy" I also tried with the bus.addr syntax, with the same error. Nothing seemingly relevant showed up in the logs. Any ideas? I would appreciate some help! Thanks in advance, -- Daniel Gomes (SysAdmin) dgomes@ipfn.ist.utl.pt Ext. 3487 - 218419487 Instituto de Plasmas e Fusão Nuclear Instituto Superior Técnico - UTL Av. Rovisco Pais - 1049-001 Lisboa - Portugal _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Dear all, > > I have been trying to connect a usb external disk to a Windows Server > 2008 guest through Xen 3.2.The current qemu based USB passthrough is USB 1.1, which is really bad for performance, and also completely doesn''t work with some disk devices, although I''m not sure how the mapping between qemu usb 1.1 and a physical usb 2.0 port comes into that. Can you instead pass through the block device? With a bit of creative udev scripting you could make the block device add and remove automatically from the domu every time you plug it into the physical machine. I starting writing USB passthrough for my GPLPV drivers for Windows, and while I got it working for some USB storage devices it''s still full of bugs and has probably suffered some bitrot since I last looked at it. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hey James, first of all, thanks for the really fast reply! Regarding what you said, it was really too much for me hehe. I mean, I admin a Xen server and regularly add/delete Linux guests, but it''s my first time with a Windows guest (and with USB) and, to be honest, I didn''t even know what qemu was until I wiki''ed it right now lol. That being said, could you please explain what you mean by "pass through the block device"? You mean smth like /dev/sdg? That obviously can''t go in the "usb_add" command, so where shall I use that? Sorry for the ignorance... Basically all I want is that the drive gets plugged in at some specific point (it can even be manually). I''m trying to make a "Windows Complete PC Restore" and according to some posts I read (after it failing a couple of times), it only works if the USB stick containing the backup image is inserted after the recovery program is started (go figure Windows out...). That is all I want (a one time thing), so any solution (no matter how "manual") would be great. Thanks again, On 10/13/2010 01:25 PM, James Harper wrote:>> Dear all, >> >> I have been trying to connect a usb external disk to a Windows Server >> 2008 guest through Xen 3.2. > The current qemu based USB passthrough is USB 1.1, which is really bad > for performance, and also completely doesn''t work with some disk > devices, although I''m not sure how the mapping between qemu usb 1.1 and > a physical usb 2.0 port comes into that. > > Can you instead pass through the block device? With a bit of creative > udev scripting you could make the block device add and remove > automatically from the domu every time you plug it into the physical > machine. > > I starting writing USB passthrough for my GPLPV drivers for Windows, and > while I got it working for some USB storage devices it''s still full of > bugs and has probably suffered some bitrot since I last looked at it. > > James > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- Daniel Gomes (SysAdmin) dgomes@ipfn.ist.utl.pt Ext. 3487 - 218419487 Instituto de Plasmas e Fusão Nuclear Instituto Superior Técnico - UTL Av. Rovisco Pais - 1049-001 Lisboa - Portugal _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com [mailto:xen-users- > bounces@lists.xensource.com] On Behalf Of Daniel Gomes > Sent: Thursday, 14 October 2010 00:26 > To: xen-users@lists.xensource.com > Subject: Re: [Xen-users] usb_add to windows guest > > Hey James, > > first of all, thanks for the really fast reply! > > Regarding what you said, it was really too much for me hehe. I mean, I > admin a Xen server and regularly add/delete Linux guests, but it''s my > first time with a Windows guest (and with USB) and, to be honest, I > didn''t even know what qemu was until I wiki''ed it right now lol. > > That being said, could you please explain what you mean by "passthrough> the block device"? You mean smth like /dev/sdg? That obviously can''tgo> in the "usb_add" command, so where shall I use that? Sorry for the > ignorance...Yes the block device like /dev/sdg. xm "block-attach" is what you want to add the device dynamically, although without PV drivers installed in DomU I don''t think you can hot-add devices. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hey, that also didn''t work... Anyway, as it turns out, I dont need to clone that Windows server anymore, so I don''t need to figure this problem out. Thanks for trying to help out, though! Cheers, On 10/13/2010 11:22 PM, James Harper wrote:> >> -----Original Message----- >> From: xen-users-bounces@lists.xensource.com [mailto:xen-users- >> bounces@lists.xensource.com] On Behalf Of Daniel Gomes >> Sent: Thursday, 14 October 2010 00:26 >> To: xen-users@lists.xensource.com >> Subject: Re: [Xen-users] usb_add to windows guest >> >> Hey James, >> >> first of all, thanks for the really fast reply! >> >> Regarding what you said, it was really too much for me hehe. I mean, I >> admin a Xen server and regularly add/delete Linux guests, but it''s my >> first time with a Windows guest (and with USB) and, to be honest, I >> didn''t even know what qemu was until I wiki''ed it right now lol. >> >> That being said, could you please explain what you mean by "pass > through >> the block device"? You mean smth like /dev/sdg? That obviously can''t > go >> in the "usb_add" command, so where shall I use that? Sorry for the >> ignorance... > Yes the block device like /dev/sdg. xm "block-attach" is what you want > to add the device dynamically, although without PV drivers installed in > DomU I don''t think you can hot-add devices. > > James >-- Daniel Gomes (SysAdmin) dgomes@ipfn.ist.utl.pt Ext. 3487 - 218419487 Instituto de Plasmas e Fusão Nuclear Instituto Superior Técnico - UTL Av. Rovisco Pais - 1049-001 Lisboa - Portugal _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users