Attaching USB-device automatically

Discussions related to using VirtualBox on Linux hosts.
Post Reply
trilogik
Posts: 7
Joined: 1. Jul 2015, 10:03

Attaching USB-device automatically

Post by trilogik »

Hi everyone!

I'd like to have a virtualbox-VM use a connected USB-device automatically. The device is permanently connected to the host of the virtualbox-guest. There is an extensive manual available at the virtualbox homepage, but somehow, this does not help me out.

If I do the following:

Code: Select all

:~$ vboxmanage list usbhost
Host USB Devices:

UUID:               4a8f3943-27b3-4a43-9519-385b90ee0b5b
VendorId:           0x0922 (0922)
ProductId:          0x0019 (0019)
Revision:           1.18 (0118)
Manufacturer:       DYMO
Product:            DYMO LabelWriter 400
SerialNumber:       07091323353399
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.3/usb9/9-1//device:/dev/vboxusb/009/002
Current State:      Busy
...and then this:

Code: Select all

:~$ vboxmanage usbfilter add 0 --target WinXP --name LabelWriter --action hold --active yes --vendorid 0922 --productid 0019 --revision 0118 --manufacturer DYMO --product "DYMO LabelWriter 400" --serialnumber 07091323353399
...then the device still won't be connected automatically on bootup. I am still forced to do this manually, while the VM is up and running

Code: Select all

:~$ vboxmanage controlvm WinXP usbattach 7f25e553-550d-4e27-ae5d-5e49c84e9372
What am I doing wrong?

Thanks a lot in advance for any hint.

Best regards
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Attaching USB-device automatically

Post by mpack »

Add a USB filter to the VM settings - this is what they're for.
trilogik
Posts: 7
Joined: 1. Jul 2015, 10:03

Re: Attaching USB-device automatically

Post by trilogik »

Thanks for the hint, but I already did that:

Code: Select all

:~$ vboxmanage showvminfo WinXP
(...)

USB Device Filters:

Index:            0
Active:           yes
Name:             LabelWriter
VendorId:         0922
ProductId:        0019
Revision:         0118
Manufacturer:     DYMO
Product:
Remote:
Serial Number:    07091323353399

Available remote USB devices:

<none>

Currently Attached USB Devices:

UUID:               66bd0b94-36ed-4567-ae87-91779177ba55
VendorId:           0x0922 (0922)
ProductId:          0x0019 (0019)
Revision:           1.18 (0118)
Manufacturer:       DYMO
Product:            DYMO LabelWriter 400
SerialNumber:       07091323353399
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.3/usb9/9-1//device:/dev/vboxusb/009/002
The USB device is currently attached, because I manually added it while the VM was running - as can be read in my post above.

So, this does not seem to solve the problem...

Any other ideas?

Best regards
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Attaching USB-device automatically

Post by mpack »

Post a VM log file.

Right click the VM in the GUI. Select "Show Log". Save "VBox.log" to a file. Compress that file and attach it to a message here. Make sure the VM is fully shut down before taking a log
trilogik
Posts: 7
Joined: 1. Jul 2015, 10:03

Re: Attaching USB-device automatically

Post by trilogik »

Hi!

Please find the file attached. It is filled with messges like this:

Code: Select all

00:00:00.621 nspr-3   ERROR [COM]: aRC=NS_ERROR_INVALID_ARG (0x80070057) aIID={662c175e-a69d-40b8-a77a-1d719d0ab062} aComponent={SessionMachine} aText={CpuId override leaf 0x0 is not set}, preserve=false
Best regards
Attachments
VBoxSVC.rar
(1.34 KiB) Downloaded 7 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Attaching USB-device automatically

Post by mpack »

I am not interested in the VBoxSVC log. Please read the clear and simple instructions I gave in my previous post.
trilogik
Posts: 7
Joined: 1. Jul 2015, 10:03

Re: Attaching USB-device automatically

Post by trilogik »

Hi mpack!

As you can see in my previous posts, I am running Virtualbox on the console, and it is even a headless system. Therefore, I cannot "right click" anything. For that reason, I could not find any "VBox.log" file, just the one, that I posted. I you could point me to that file, I'd gladly attach it to my posts.

Best regards
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Attaching USB-device automatically

Post by mpack »

VM logs are stored in the "Logs" subfolder of the VM folder.
trilogik
Posts: 7
Joined: 1. Jul 2015, 10:03

Re: Attaching USB-device automatically

Post by trilogik »

Hi mpack!

Ok, now I got it. Sorry.

Best regards
Attachments
VBox.rar
(9.27 KiB) Downloaded 14 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Attaching USB-device automatically

Post by mpack »

The VirtualBox version in use here is very old: 4.0.26. Has the VM ever worked? If so, what has changed in the host since it last worked?

Another confusing thing is that your command line actions posted earlier show you manipulating a VM called "WinXP". However the log you have given me is for a VM which uses a Win7-64bit template, and is called "Buchhaltungsrechner", rather than "WinXP". Can you clear up this confusion?
Post Reply