VirtualBox

Ticket #9007 (new defect)

Opened 3 years ago

Captured/filtered USB devices are released and reacquired when guest reboots

Reported by: Donuts Owned by:
Priority: minor Component: USB
Version: VirtualBox 4.0.8 Keywords:
Cc: Guest type: Windows
Host type: Linux

Description

Hi,

Host: Xubuntu 9.10 x86, VirtualBox 4.0.8 (with PUEL extension pack). Guest: Windows XP SP3

When the guest is rebooted, VirtualBox seems to free/release any filtered USB devices, then re-capture them. I think all filtered USB devices should remain filtered when the guest reboots.

This problem is most noticeable when using a USB floppy drive. Most(?) Linux distributions treat USB floppy drives as generic removable drives. So when you insert a disk, the kernel attempts to read the last sector and scans for partition tables. In combination with the default block device readahead of 256 blocks, that process can take 30 seconds or so. *Every time you insert a disk*. It's quite annoying. Floppy disks never have a partition table of course so the scan is pointless. Anyway...

To reproduce the problem:

  • Connect a USB floppy drive to your system.
  • Add the floppy drive to the USB Device Filters of a Windows guest VM.
  • Start the Windows VM. Insert a floppy disk. Notice the drive only spins for a short time. Because it is captured, the Linux host OS doesn't attempt to access it.
  • Reboot the guest OS.
  • Notice how when the guest reboots, the kernel creates a /dev/sdX block device and scans for partitions (taking about 30 seconds). Then the block device is removed when VirtualBox re-captures the device.

Other drives are probably affected similarly, so you get an unnecessary block device creation, partition scan and device removal whenever the guest is rebooted. (That takes less time than for USB floppy drives so will be less noticeable.)

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use