I'm missing the easiest of things? - connecting USB Flash drive to VM


Recommended Posts

HI All,

 

Moved to unraid a while ago. have set it up and is Working well.

Well enough that I moved my main gaming PC to a VM in unraid, including GPU pass though - again working well.

I've setup a second VM and while I was physically installing another gpu, I also added a sandisk cruzer fit drive (fresh drive straight out of packet) to in the internal on board USB, as i thought i might be able to save some time by installing unraid on this drive with a licence and then just copying the files from the "old" trial drive across.

idea in my head being turn off the server, unplug old drive, turn on the server, and unraid is now running as expected on the new drive but now licenced....

 

however, the first step in this has stumped me and the search terms I am using don't seem to be giving me the answers I'm after. 

 

Question: how can I see the drive in my VM? what easy step have I overlooked?

 

 

I can see the drive in unraid (6.9.2). I've edited the VM so the drive is included in the USB devices. but after turning on the vm. the drive isn't appearing. So i cant even start the process.

 

all the solutions i found talk about passing through the usb contoller...

I can't pass the USB controller through as all the usb ports on the server seem to be placed under the same physical bus. - i think from reading around i need to look into editing the bios to alter this as i should have 4 buses according to info.

Can someone please link me to a place where i tutorial where i can add the usb drive to the VM (not the bios thing)

Edited by Belcraig
Link to comment

can you provide output of lsusb run from a command prompt.

 

You could also try my USB_Manager plugin to see if that allows you to attach the 2nd USB.  It is an alternative way to connect USB devices to VMs, you need to remove from the template.

Edited by SimonF
Link to comment

output from lsUSB

Bus 002 Device 002: ID 8087:8002 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:800a Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0424:5537 Standard Microsystems Corp. USB5537B
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 013: ID 045e:082c Microsoft Corp. Microsoft Ergonomic Keyboard
Bus 003 Device 011: ID 046d:c07e Logitech, Inc. G402 Gaming Mouse
Bus 003 Device 010: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 003 Device 008: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 003 Device 007: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 014: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 005: ID 0781:5575 SanDisk Corp. Cruzer Glide
Bus 003 Device 003: ID 04c5:114f Fujitsu, Ltd 
Bus 003 Device 012: ID 046b:ff10 American Megatrends, Inc. Virtual Keyboard and Mouse
Bus 003 Device 009: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 003 Device 006: ID 04d8:0b2a Microchip Technology, Inc. U2717D_0B2A_15091601
Bus 003 Device 004: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 003 Device 002: ID 0424:2137 Standard Microsystems Corp. USB2137B
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

using USB manager plugin gives a Virsh Error

Edited by Belcraig
Link to comment

How many USB devices are you connecting to the VM.

 

Default is to use USB Controller 2.0 in VM template, try changing to image.png.deafffeccdd4c1dc19a47247159268b9.png

 

You only get 2-3 devices with the 2.0 controller and 14 with 3.0.

 

If you hover over the virsh error, does it say some like Document 1 invalid? Unplugging and replugging USB device may fix issue. I need to look at the setup to initialise correctly I think.

Edited by SimonF
Link to comment

can't see the whole error _ possible bug i need to move the screen to the right, but moveing the mouse means there is no role over, so i dont need to move anymore? using keys to move the screen means hte mouse isn't over the error and so no role over and thus no need to move the screen to the right... 

 

however what i can read is in pic, ill try the USB change as i didn't realise the USB Setting in the VM...

USB Error.jpg

Link to comment
13 minutes ago, Belcraig said:

can't see the whole error _ possible bug i need to move the screen to the right, but moveing the mouse means there is no role over, so i dont need to move anymore? using keys to move the screen means hte mouse isn't over the error and so no role over and thus no need to move the screen to the right... 

 

however what i can read is in pic, ill try the USB change as i didn't realise the USB Setting in the VM...

 

There should be a syslog entry for the virsh process.

 

cat /var/log/syslog | grep usb_manager

 

Jul  4 13:43:45 computenode usb_manager: Info: rc.usb_manager  vm_action Ubuntu prepare begin -
Jul  4 13:44:31 computenode usb_manager: usb_manager virsh called Ubuntu 1 5 Device attached successfully  
Jul  4 13:45:17 computenode usb_manager: usb_manager virsh called Ubuntu 1 5 Device detached successfully  
Jul  4 13:45:20 computenode usb_manager: usb_manager virsh called Ubuntu 1 5 Device attached successfully  
Jul  4 13:45:24 computenode usb_manager: usb_manager virsh called Ubuntu 1 5 Device detached successfully  
Jul  4 13:45:57 computenode usb_manager: usb_manager virsh called Ubuntu 1 5 Device attached successfully  
Jul  4 13:45:59 computenode usb_manager: usb_manager virsh called Ubuntu 1 5 Device detached successfully  
Jul  4 13:46:29 computenode usb_manager: Info: rc.usb_manager  vm_action Ubuntu stopped end -
Jul  4 13:46:32 computenode usb_manager: Info: rc.usb_manager  vm_action Ubuntu prepare begin -
Jul  4 13:48:14 computenode usb_manager: Removing configuration '04b3_USB_Optical_Mouse'.
Jul  4 13:48:35 computenode usb_manager: usb_manager virsh called Ubuntu 1 5 Device attached successfully  
Jul  4 13:48:38 computenode usb_manager: usb_manager virsh called Ubuntu 1 5 Device detached successfully  

Link to comment

Thanks Simon,

Sorry didn't get time to make last adjustments.

I changed the USB Setting to 3.0 (qemu XHCI) but the VM then seemed to stall every couple of minutes for a few minutes with the VM showing 10 out of the 12 threads maxed out. However there was also a windows update applied at the same time. so I turned it back to 2.0 and everything worked as it was before so I assumed it wasn't the update causing it to stall. I just tried the 3.0 nec XHCI version out of curiosity and forgot to assign the usb in the settings. However i added it via the usb manager and it attached and seams to be working fine.

 

So I figure the problem was I have too Many USB Attached, and changing to 3.0 solved it. For anyone who might be having a Similar problem, 

 

thanks for your help.

 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.