Virtual USB

Here you can provide suggestions on how to improve the product, website, etc.
Solrac42
Posts: 20
Joined: 26. Jul 2016, 09:07

Virtual USB

Post by Solrac42 »

How about create a virtual USB for VirtualBox instead of having to use a real USB on the host computer ?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtual USB

Post by socratis »

A virtual USB ... controller? ...device?

I think you mean controller, but can you please point me to a use case? How would you use it? In what cases?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: Virtual USB

Post by michaln »

What is "virtual USB" and how is it different from the current implementation?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual USB

Post by mpack »

We've had the request before, from people who don't understand what the request means.

He wants virtual USB devices, a bit like a pipe provides a virtual UART.

In the past we've also had people request virtual USB mass storage, i.e. removable VDIs, so I guess he could also mean that.

Huge guess: he's playing with Android, so he's trying to get the functionality of GA shared folders.
Solrac42
Posts: 20
Joined: 26. Jul 2016, 09:07

Re: Virtual USB

Post by Solrac42 »

socratis wrote:A virtual USB ... controller? ...device?

I think you mean controller, but can you please point me to a use case? How would you use it? In what cases?
Yes, a virtual controller just like the optical drive controller so that system recovery partitions can write the stored recovery data to a virtual USB drive, ATM they cannot format the USB in the host computer, it always fails, but copying and pasting data works fine, so read-write access is functioning properly.

I have tried it on VirtualBox 5.024 and 5.0.26, but no luck, I can't get VirtualBox 5.1.2 working on my setup, I always get a "machine_wrap" error when using it.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtual USB

Post by socratis »

Solrac42 wrote:they cannot format the USB in the host computer
Who's "they"? What fails? Exact error messages and programs used would be helpful. Please post the output of the following commands (with the USB device plugged in):
   VBoxManage list usbhost
   VBoxManage showvminfo "Your_Virtual_Machine_Name"
If your host is Windows, you first have to navigate to the VirtualBox installation directory (typically "C:\Program Files\Oracle\VirtualBox\").
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Solrac42
Posts: 20
Joined: 26. Jul 2016, 09:07

Re: Virtual USB

Post by Solrac42 »

Hi Socratis,

I have pasted the files you requested, i can't find a way of attaching files on this forum.

Code: Select all

Format failed(Error Code 040E2E-0A-00000000)

List USB Host:-

Host USB Devices:

UUID:               b9afbdec-964f-4cac-93ae-d72370d3aa71
VendorId:           0x045e (045E)
ProductId:          0x07b9 (07B9)
Revision:           1.20 (0120)
Port:               0
USB version/speed:  2/High
Manufacturer:       LITEON Technology
Product:            USB Keyboard
Address:            {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0011
Current State:      Busy

UUID:               acbdc788-3c25-4a4f-9df4-53cd6e111b84
VendorId:           0x046d (046D)
ProductId:          0xc05b (C05B)
Revision:           84.0 (8400)
Port:               0
USB version/speed:  2/High
Manufacturer:       Logitech
Product:            USB Optical Mouse
Address:            {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0005
Current State:      Busy

UUID:               256f1fae-837f-4660-aae0-9160cbaac7d6
VendorId:           0x05dc (05DC)
ProductId:          0xa838 (A838)
Revision:           17.0 (1700)
Port:               0
USB version/speed:  2/High
Manufacturer:       Lexar
Product:            USB Flash Drive
SerialNumber:       AAY4016HCOK70BBB
Address:            {36fc9e60-c465-11cf-8056-444553540000}\0020
Current State:      Busy

Code: Select all

ShowVMinfo-:

Name:            TEST
Groups:          /
Guest OS:        Windows 7 (64-bit)
UUID:            6f105864-5e88-4ba8-9920-c2a8315f8274
Config file:     C:\Users\User\VirtualBox VMs\TEST\TEST.vbox
Snapshot folder: C:\Users\User\VirtualBox VMs\TEST\Snapshots
Log folder:      C:\Users\User\VirtualBox VMs\TEST\Logs
Hardware UUID:   6f105864-5e88-4ba8-9920-c2a8315f8274
Memory size:     1024MB
Page Fusion:     off
VRAM size:       27MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
PAE:             off
Long Mode:       on
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): HardDisk
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     on
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
State:           aborted (since 2016-07-26T17:02:31.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
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): F:\Virtual VHD Files\TEST.vhd (UUID: 8650eb77-d1ef-40ed-9eed-5dd44e209eb6)
SATA (1, 0): Empty
NIC 1:           disabled
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: HDA, Codec: STAC9221)
Clipboard Mode:  disabled
Drag and drop Mode: disabled
VRDE:            disabled
USB:             enabled
EHCI:            enabled
XHCI:            disabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

Video capturing:    not active
Capture screens:    0
Capture file:       C:\Users\User\VirtualBox VMs\TEST\TEST.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25

Guest:

Configured memory balloon size:      0 MB
Last edited by socratis on 26. Jul 2016, 21:47, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtual USB

Post by socratis »

You didn't answer a couple of questions:
socratis wrote:
Solrac42 wrote:they cannot format the USB in the host computer
Who's "they"? What fails? Exact error messages and programs used would be helpful.
PS. I edited your post and enclosed the information in

Code: Select all

 tag for better readability. I should have mentioned it before...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Solrac42
Posts: 20
Joined: 26. Jul 2016, 09:07

Re: Virtual USB

Post by Solrac42 »

Hi Socratis,
Thanks for your reply,

Sorry, I forgot to include that "they" is the HDD factory recovery software on the Toshiba Satellite Pro C660D virtual image that I am testing, everything works fine except that the factory restore software tries to format the USB flash drive in the host computer and fails to do so, however I can read and write files within VirtualBox to the USB flash drive, so access to it is available.

I was able to use a virtual read/write optical drive software within VirtualBox and the factory restore software completed successfully and generated a working ISO disc image, but it would be nice to be able to use a virtual USB controller instead, that said, why not have a virtual read/write optical drive incorporated into VirtualBox, now there's a good idea, perhaps I should create a new suggestion for that.
Last edited by Solrac42 on 12. Aug 2016, 10:41, edited 2 times in total.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtual USB

Post by socratis »

Solrac42 wrote:the factory reset software tries to format the USB flash drive in the host computer and fails to do so, however I can read and write files within VirtualBox to the USB flash drive, so access to it is available.
You say that you have read/write access to the filesystem. That's not the same as having full control of the device. Did you use the "shared folders" feature of VirtualBox to get access to the filesystem?
Solrac42 wrote:why not have a virtual read/write optical drive incorporated into VirtualBox
Because that is not what you need. What you need to do is to create a "USB filter". You have none setup. You need to have full control of the USB device, if you want to be able to format it. I am assuming that the device in question is the Lexar USB stick and it is attached to a USB2 port:
  1. Make sure that the Extension Pack is installed on the host. The same version as VirtualBox.
  2. Make sure that at least USB 2.0 is enabled in your VM settings.
  3. Create a USB filter in your guest settings while the device is plugged in the host. Delete all values except Name ("Lexar USB stick" or something meaningful to you), VendorID (05DC) and ProductID (A838).
  4. Unplug the device.
  5. Start your guest (the one that you applied the filter to). Let it start completely. Log in if you have to.
  6. Plug your device. The filter should capture it and pass control to your guest.
  7. If the device shows up in your host and is not captured by the filter, either the filter is incorrect, or there might be a problem with your filter installation.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Solrac42
Posts: 20
Joined: 26. Jul 2016, 09:07

Re: Virtual USB

Post by Solrac42 »

Ahh ... I see ... said the blind man, I did not know to use a USB filter to get "full control" of the USB flash drive, I will give it a go tomorrow and report back here.
Solrac42
Posts: 20
Joined: 26. Jul 2016, 09:07

Re: Virtual USB

Post by Solrac42 »

Just tried your USB filter settings idea to get full control of the host USB flash drive following exactly the steps in your post, but the format operation still fails.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtual USB

Post by socratis »

Can you format the USB stick from your host? Not through the backup utility, but through the OS itself.

You haven't answered my question: Did you use the "shared folders" feature of VirtualBox to get access to the filesystem?

Please refresh the two previously requested command outputs and post the result. With the device plugged in and captured by the host. "it fails" is a little short on the details. Is there any more specific error codes and/or messages? A screenshot perhaps?

Finally, a last question (for the moment): what are you trying to do? Restore something on the USB and boot from it? A quick search shows that the HDD factory recovery software on the Toshiba Satellite Pro requires you to intervene at the PC boot sequence. I don't quite understand what's going on...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Solrac42
Posts: 20
Joined: 26. Jul 2016, 09:07

Re: Virtual USB

Post by Solrac42 »

socratis wrote:Can you format the USB stick from your host? Not through the backup utility, but through the OS itself.
ANSWER ... YES, AND IN THE GUEST ALSO
socratis wrote:You haven't answered my question: Did you use the "shared folders" feature of VirtualBox to get access to the filesystem?
ANSWER ... NO I DONT USE SHARED FOLDERS AS YET
socratis wrote:Please refresh the two previously requested command outputs and post the result. With the device plugged in and captured by the host. "it fails" is a little short on the details. Is there any more specific error codes and/or messages? A screenshot perhaps?
ANSWER ... NO TIME TO DO THIS YET BUT... Format Failed (Error Code: 040E2E-0A-00000000)
socratis wrote:Finally, a last question (for the moment): what are you trying to do? Restore something on the USB and boot from it?
ANSWER ... YES ...
socratis wrote:A quick search shows that the HDD factory recovery software on the Toshiba Satellite Pro requires you to intervene at the PC boot sequence.
ANSWER ... INTERVENTION IS REQUIRED TO PROCEED WITH FACTORY RESTORE AFTER WARNINGS ABOUT DELETING ALL USER DATA...
Last edited by socratis on 27. Jul 2016, 23:08, edited 1 time in total.
Reason: Cleaned formatting
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtual USB

Post by socratis »

First of all, you're a little shy on the details. Try not to answer with one word sentences. Remember, you are sitting in front of the computer that has the problem; I am not. You'll have to do a better job of explaining the situation. Like this one:
Solrac42 wrote:
socratis wrote:A quick search shows that the HDD factory recovery software on the Toshiba Satellite Pro requires you to intervene at the PC boot sequence.
ANSWER ... INTERVENTION IS REQUIRED TO PROCEED WITH FACTORY RESTORE AFTER WARNINGS ABOUT DELETING ALL USER DATA...
What does that mean? Do you have to use the BIOS or not?

Now, since you don't use shared folders and you don't have a filter enabled, can you explain to me how on earth did you get read/write access to the USB from your guest? Doesn't compute.

PS. In some circles, typing in all CAPS is considered shouting...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply