Page 1 of 1

[Solved] Cannot attach USB

Posted: 11. Mar 2019, 13:40
by bigbaldbob
How can I attach a USB stick to my Win10 vm?

I am unable to attach a USB stick either from command line (using vboxmange) or creating a filter in GUI.

After following "USB basics and troubleshooting" I am still unable to create a filter or otherwise attach a USB drive.

Here is the Minimal Information Needed:
-Virtualbox 6.04, extensions and Guest Additions for 6.04 installed
-Host: Ubuntu64 18.04 (actually, Pop-os64 18.04)
-Guest Win10Pro64
-VM log attached

Additional information:
ID:
uid=1000(bob) gid=1000(bob) groups=1000(bob),4(adm),27(sudo),125(vboxusers)

VBoxManage list usbhost:
Host USB Devices:

<none>
notes:
1) I get the same result whether I have VM running or not
2) If I try to attach usb I get:
vboxmanage controlvm "Win10Pro64 "  usbattach ca6cc119-223c-4868-89fd-27220d8c0043 

VBoxManage: error: Machine 'Win10Pro64 ' is not currently running
3) If I try to attach with VM runnning,I get:
vboxmanage controlvm "Win10Pro64 "  usbattach ca6cc119-223c-4868-89fd-27220d8c0043
VBoxManage: error: The USB device with UUID {ca6cc119-223c-4868-89fd-27220d8c0043} is not currently attached to the host
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component 		USBProxyService, interface IHost, callee nsISupports
VBoxManage: error: --------
VBoxManage: error: Could not load the Host USB Proxy service: VERR_DISK_FULL
VBoxManage: error: Details: code Unknown Status 0x4005 (0x4005), component 			HostWrap, interface IHost
VBoxManage: error: Context: "AttachUSBDevice(usbId.raw(), 							captureFilename.raw())" at line 1386 of file VBoxManageControlVM.cpp
4) The error above (numbered 3) above occurs whether or not USB is attached to host.
VBoxManage list usbfilters
Global USB Device Filters:

<none>

Code: Select all

$ VBoxManage showvminfo "Win10Pro64 "
Name:                        Win10Pro64 
Groups:                      /
Guest OS:                    Windows 10 (64-bit)
UUID:                        39ad713a-23d7-4117-bf2d-86cf33673f4e
Config file:                 /home/bob/VirtualBox VMs/Win 10 Pro 64 /office /dropbox /1pass/Win 10 Pro 64 /office /dropbox /Win10Pro64 .vbox
Snapshot folder:             /home/bob/VirtualBox VMs/Win 10 Pro 64 /office /dropbox /1pass/Win 10 Pro 64 /office /dropbox /Snapshots
Log folder:                  /home/bob/VirtualBox VMs/Win 10 Pro 64 /office /dropbox /1pass/Win 10 Pro 64 /office /dropbox /Logs
Hardware UUID:               39ad713a-23d7-4117-bf2d-86cf33673f4e
Memory size                  14095MB
Page Fusion:                 disabled
VRAM size:                   128MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    EFI
Number of CPUs:              3
PAE:                         disabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      disabled
Nested VT-x/AMD-V:           disabled
CPUID Portability Level:     0
CPUID overrides:             None
Boot menu mode:              message and menu
Boot Device 1:               HardDisk
Boot Device 2:               Not Assigned
Boot Device 3:               Not Assigned
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
RTC:                         local time
Hardw. virt.ext:             enabled
Nested Paging:               enabled
Large Pages:                 disabled
VT-x VPID:                   enabled
VT-x unr. exec.:             enabled
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   HyperV
State:                       powered off (since 2019-03-11T10:09:17.000000000)
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:            
Storage Controller Name (0):            SATA
Storage Controller Type (0):            IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  30
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
SATA (0, 0): /home/bob/VirtualBox VMs/Win 10 Pro 64 _office _dropbox _1pass/Win10Pro_VM-disk001.vmdk (UUID: 37b6661b-99eb-46d7-a8ae-975f1ca1a3a3)
SATA (1, 0): /usr/share/virtualbox/VBoxGuestAdditions.iso (UUID: 279ce142-5def-4b68-9402-48167d7c7475)
NIC 1:                       MAC: 080027D6086E, Attachment: Bridged Interface 'wlp0s20f3', 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: PulseAudio, Controller: HDA, Codec: STAC9221)
Audio playback:              disabled
Audio capture:               enabled
Clipboard Mode:              Bidirectional
Drag and drop Mode:          Bidirectional
VRDE:                        disabled
OHCI USB:                    disabled
EHCI USB:                    disabled
xHCI USB:                    enabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:<none>

Capturing:                   not active
Capture audio:               not active
Capture screens:             0
Capture file:                /home/bob/VirtualBox VMs/Win 10 Pro 64 /office /dropbox /1pass/Win 10 Pro 64 /office /dropbox /Win10Pro64 .webm
Capture dimensions:          1024x768
Capture rate:                512kbps
Capture FPS:                 25kbps
Capture options:             ac_enabled=false

Guest:

Configured memory balloon size: 0MB

Re: Cannot attach USB

Posted: 11. Mar 2019, 13:45
by mpack
Why not simply access the drive as a shared folder? Why mess with the complexities of having a VM use a physical USB device?

Re: Cannot attach USB

Posted: 11. Mar 2019, 16:47
by bigbaldbob
I tried using it as a shared folder as well and was likewise unable to do so.

There are other USB devices that I think cannot be shared as folders as they are not folders.

If the intention is to no longer support USB in Virtualbox, than this would be a potential solution.

Re: Cannot attach USB

Posted: 11. Mar 2019, 17:42
by Martin
Does the 'groups' commands also list the vboxusers group membership of your current user?

Re: Cannot attach USB

Posted: 11. Mar 2019, 17:53
by mpack
bigbaldbob wrote: There are other USB devices that I think cannot be shared as folders as they are not folders.
My answer addressed the implied question asked, not "other USB devices". Obviously my question has a very easy answer if USB is truly required: but that does not seem to be your scenario.

Re: Cannot attach USB

Posted: 11. Mar 2019, 21:20
by bigbaldbob
Martin wrote:Does the 'groups' commands also list the vboxusers group membership of your current user?
I think so. It includes me (the one and only user) and vboxuser (as well as adm and sudo).

Is that what you mean?

Re: Cannot attach USB

Posted: 12. Mar 2019, 18:25
by bigbaldbob
I think I have found the problem:

The cli command:
VBoxManage list usbhost

Results in: "None"

However:
sudo VBoxManage list usbhost

Results in list of all (several) USB devices.

I tried to run sudo VBoxmanage startvm [vm] but the VMs were not available to user "root". After playing around a bit, I found that although I was in vboxusers group, the VM did NOT have permissions for vboxusers. I am not sure how this changed.

Resolution:
Changed permissions on VM to "groups" "vboxusers". This appears to be the solution; ability to capture USB restored (file sharing problem also incidentally resolved). :D