Failed to attach the USB device to the virtual machine

Discussions about using Linux guests in VirtualBox.
Post Reply
harald123
Posts: 64
Joined: 30. Oct 2020, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Mint 19 Tara

Failed to attach the USB device to the virtual machine

Post by harald123 »

Hi,

I start for example the virtual machine . Linux Mint, with heaphones and mouse connected to usb ports. After some time after the system is running I plug the mouse out of the usb port and plug it back in.
Then the issue described here ( https://www.techyv.com/questions/virtua ... l-machine/ ) appears and the usb device cannot be used on the vm.

As in the screenshot visible, there is a usb controller, a filter and devices. I have tried with both usb 2.0 and 3.0 controllers. The devices will work again only after a reboot of the virtual machine.
Is it possible to change some setting to be able to plug usb devices out and back in and have them working again?

Thank you.
Attachments
Screenshot 2022-07-11 080136.png
Screenshot 2022-07-11 080136.png (17.99 KiB) Viewed 2980 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Failed to attach the USB device to the virtual machine

Post by scottgus1 »

It is not normal to add a mouse to a VM through USB Filters, unless it's a secondary mouse that you only want in the VM, and the host already has its own mouse that does not match the filter. Is this 'secondary mouse' situation what you're doing? Or are you trying to attach the host's only mouse to the VM? If this mouse is the only mouse, then problems will happen. Taking the host's only mouse into the VM is not supported.

If you are trying to pass the second mouse, USB basics and troubleshooting will have some commands that can help. Also, have a stopwatch to time when you do certain things in the process.

Run these command on the host:
cd "C:\Program Files\Oracle\Virtualbox" <- only if a Windows host
vboxmanage showvminfo "VM name"
vboxmanage list usbhost

Post these command outputs on the forum as text.

Start the VM from full normal shutdown, not save-state. Start the stopwatch at the same time you start the VM. Run the VM and ensure that everything is working. Run 'lsusb' in the VM's terminal, and save the output as text out onto the host.

Note the elapsed time on the stopwatch, and unplug the mouse at the same time. Wait a minute. Run and save 'lsusb' in the VM again.

Note the elapsed time on the stopwatch again, and plug the mouse back in at the same time. Check to see if the mouse is working. If it is not, Run and save 'lsusb' in the VM a third time. Please label which lsusb output is which.

Shut down the VM from within the VM's OS.

Post the stopwatch times for unplugging and re-plugging the USB mouse.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log.

Zip up the lsusb's and the log, and post the zip file, using the forum's Upload Attachment tab.
harald123
Posts: 64
Joined: 30. Oct 2020, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Mint 19 Tara

Re: Failed to attach the USB device to the virtual machine

Post by harald123 »

Hi and thank you for the detailed answer. There is only one mouse and I want to use it seamlessly between host and guest.

I will take the time during next days and do the suggested steps and come back with the requested data.
harald123
Posts: 64
Joined: 30. Oct 2020, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Mint 19 Tara

Re: Failed to attach the USB device to the virtual machine

Post by harald123 »

There is the output of the commands:

C:\Program Files\Oracle\VirtualBox>vboxmanage showvminfo "Mint"
Name: Mint
Groups: /
Guest OS: Ubuntu (64-bit)
UUID: 4984e20b-8f5d-4e96-8e28-32db666d3a9a
Config file: C:\Daten\Mint\Mint.vbox
Snapshot folder: C:\Daten\Mint\Snapshots
Log folder: C:\Daten\Mint\Logs
Hardware UUID: 4984e20b-8f5d-4e96-8e28-32db666d3a9a
Memory size 6077MB
Page Fusion: disabled
VRAM size: 114MB
CPU exec cap: 100%
HPET: disabled
CPUProfile: host
Chipset: piix3
Firmware: BIOS
Number of CPUs: 1
PAE: disabled
Long Mode: enabled
Triple Fault Reset: disabled
APIC: enabled
X2APIC: enabled
Nested VT-x/AMD-V: disabled
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode: message and menu
Boot Device 1: Floppy
Boot Device 2: DVD
Boot Device 3: HardDisk
Boot Device 4: Not Assigned
ACPI: enabled
IOAPIC: enabled
BIOS APIC mode: APIC
Time offset: 0ms
RTC: UTC
Hardware Virtualization: enabled
Nested Paging: enabled
Large Pages: enabled
VT-x VPID: enabled
VT-x Unrestricted Exec.: enabled
Paravirt. Provider: Default
Effective Paravirt. Prov.: KVM
State: running (since 2022-07-10T04:11:17.533000000)
Graphics Controller: VMSVGA
Monitor count: 1
3D Acceleration: disabled
2D Video Acceleration: disabled
Teleporter Enabled: disabled
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: disabled
Allow Tracing to Access VM: disabled
Tracing Configuration:
Autostart Enabled: disabled
Autostart Delay: 0
Default Frontend:
VM process priority: default
Storage Controller Name (0): IDE
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): SATA
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 1
Storage Controller Bootable (1): on
IDE (1, 0): Empty
SATA (0, 0): C:\Daten\LinuxMint19\LinuxMint19\LinuxMint19.vdi (UUID: 14b0bc79-253f-4549-80be-232adb2d9427)
NIC 1: MAC: 0800271B5D12, Attachment: Bridged Interface 'Intel(R) Wireless-AC 9560 160MHz', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
UART 3: disabled
UART 4: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: DSOUND, Controller: AC97, Codec: AD1980)
Audio playback: enabled
Audio capture: disabled
Clipboard Mode: Bidirectional
Drag and drop Mode: Bidirectional
Session name: GUI/Qt
Video mode: 1894x942x32 at 0,0 enabled
VRDE: disabled
OHCI USB: enabled
EHCI USB: enabled
xHCI USB: disabled

USB Device Filters:

Index: 0
Active: yes
Name: Intel Corp. [0002]
VendorId: 8087
ProductId: 0aaa
Revision: 0002
Manufacturer:
Product:
Remote: 0
Serial Number:

Index: 1
Active: yes
Name: Chicony Electronics Co., Ltd [0027]
VendorId: 04f2
ProductId: b604
Revision: 0027
Manufacturer:
Product:
Remote: 0
Serial Number:

Index: 2
Active: yes
Name: USBest Technology USB Mass Storage Device [0100]
VendorId: 1307
ProductId: 0165
Revision: 0100
Manufacturer: USBest Technology
Product: USB Mass Storage Device
Remote: 0
Serial Number: 0810181145842c

Index: 3
Active: yes
Name: PixArt HP USB Optical Mouse [0100]
VendorId: 03f0
ProductId: 094a
Revision: 0100
Manufacturer: PixArt
Product: HP USB Optical Mouse
Remote: 0
Serial Number:

Index: 4
Active: yes
Name: Neuer Filter 1
VendorId:
ProductId:
Revision:
Manufacturer:
Product:
Remote:
Serial Number:

Available remote USB devices:

<none>

Currently Attached USB Devices:

UUID: 7571e499-079d-4598-904d-79ef197e2970
VendorId: 0x8087 (8087)
ProductId: 0x0aaa (0AAA)
Revision: 0.2 (0002)

Address: \\?\usb#vid_80ee&pid_cafe#5&1d69168d&0&10#{00873fdf-cafe-80ee-aa5e-00c04fb1720b}

Bandwidth groups: <none>

Shared folders:

Name: 'Downloads', Host path: 'C:\Users\xxx\Downloads' (machine mapping), writable, auto-mount, mount-point: 'E:'

VRDE Connection: not active
Clients so far: 0

Capturing: active
Capture audio: active
Capture screens: 0
Capture file: C:\Daten\Mint\Mint.webm
Capture dimensions: 1024x768
Capture rate: 512kbps
Capture FPS: 25kbps
Capture options: vc_enabled=true,ac_enabled=true,ac_profile=med

Guest:

Configured memory balloon size: 0MB
OS type: Linux26_64
Additions run level: 1
Additions version: 6.1.18 r142142

Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2022/07/10 04:11:41 UTC)
Facility "Seamless Mode": active/running (last update: 2022/07/10 04:11:59 UTC)
Facility "Graphics Mode": active/running (last update: 2022/07/10 04:11:59 UTC)



C:\Program Files\Oracle\VirtualBox>vboxmanage list usbhost
Host USB Devices:

UUID: 7571e499-079d-4598-904d-79ef197e2970
VendorId: 0x8087 (8087)
ProductId: 0x0aaa (0AAA)
Revision: 0.2 (0002)
Port: 10
USB version/speed: 2/Full
Manufacturer: Intel Corp.
Address: \\?\usb#vid_80ee&pid_cafe#5&1d69168d&0&10#{00873fdf-cafe-80ee-aa5e-00c04fb1720b}
Current State: Captured

UUID: 8d38215d-d385-4829-af26-f94ef488a944
VendorId: 0x0b0e (0B0E)
ProductId: 0x0300 (0300)
Revision: 3.0 (0300)
Port: 3
USB version/speed: 2/Full
Manufacturer: GN Netcom A/S
Product: Jabra EVOLVE 20 MS
SerialNumber: 0004ACB82A1607
Address: {36fc9e60-c465-11cf-8056-444553540000}\0004
Current State: Busy

UUID: 69da43f5-4921-4364-beaa-0712b256170d
VendorId: 0x04f2 (04F2)
ProductId: 0xb604 (B604)
Revision: 0.39 (0039)
Port: 8
USB version/speed: 2/High
Manufacturer: Chicony Electronics Co.,Ltd.
Product: Integrated Camera
SerialNumber: 0001
Address: {36fc9e60-c465-11cf-8056-444553540000}\0005
Current State: Captured

UUID: b4cecf6e-e449-4307-9c11-064d37415638
VendorId: 0x04f2 (04F2)
ProductId: 0xb604 (B604)
Revision: 0.39 (0039)
Port: 8
USB version/speed: 2/High
Manufacturer: Chicony Electronics Co., Ltd
Address: {36fc9e60-c465-11cf-8056-444553540000}\0005
Current State: Captured

UUID: 87a64061-cf5f-4b1b-aaf4-c927dd0c6c26
VendorId: 0x03f0 (03F0)
ProductId: 0x094a (094A)
Revision: 1.0 (0100)
Port: 4
USB version/speed: 2/Low
Manufacturer: PixArt
Product: HP USB Optical Mouse
Address: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0004
Current State: Busy
harald123
Posts: 64
Joined: 30. Oct 2020, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Mint 19 Tara

Re: Failed to attach the USB device to the virtual machine

Post by harald123 »

timer and lsusb + attached zipped logfile as indicated:

us 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 8087:0aaa Intel Corp.
Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


0:54 sec - unplugged mouse


Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 8087:0aaa Intel Corp.
Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub



2:14 plugged in . not working

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 8087:0aaa Intel Corp.
Bus 002 Device 005: ID 03f0:094a Hewlett-Packard Optical Mouse [672662-001]
Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Attachments
Mint-2022-07-15-08-48-15.zip
(29.96 KiB) Downloaded 11 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Failed to attach the USB device to the virtual machine

Post by scottgus1 »

Thanks for the data, but there's no need to look at it, based on this:
harald123 wrote:There is only one mouse and I want to use it seamlessly between host and guest.
Please note:
scottgus1 wrote:are you trying to attach the host's only mouse to the VM? If this mouse is the only mouse, then problems will happen. Taking the host's only mouse into the VM is not supported.
Virtualbox does not support passing the host's only mouse into the VM.

Remove that mouse filter from the VM. Let Virtualbox's Mouse Integration handle the mouse. Guest Additions are required in the VM. You have these loaded, so Mouse Integration will work.
harald123
Posts: 64
Joined: 30. Oct 2020, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Mint 19 Tara

Re: Failed to attach the USB device to the virtual machine

Post by harald123 »

ok, I removed it and will see how it goes. Thank you.
Post Reply