Xp under virtualbox does not see usb devices. Virtualbox does not see USB in Ubuntu

I think many have already been puzzled by the question of how to still configure USB on Virtualbox in their beloved Ubuntu. Sometimes it is so necessary to connect a USB flash drive directly to Virtualbox, but instead you have to copy data from the flash drive to a shared folder and use the data from this folder in the virtual system (note my article “Share the XP guest folder under Ubuntu”). I also tried to solve this problem for a long time, but it didn’t work out for me, and I didn’t really need it then, but now I accidentally came across a video from YouTube where it was shown how to connect USB devices. 1. So, first, add yourself to the virtualbox group. To do this, run sudo gedit /etc/group and find the line vboxusers:x:121: and add your username there. 2. Then write getent group vboxusers in the terminal and you will see something like this in the output vboxusers:x: 121 :user If you correctly added the user to the group in the previous step, then after the three-digit number there will be your login, in my case user. From this line we need to remember gid this is a three-digit number, in my case it is 123, I highlighted it in bold, you may have a completely different number. Attention: remember this number, we will need it for the next step. 3. Open in a text editor fstab: sudo gedit /etc/fstab and paste the line there: none /sys/bus/usb/drivers usbfs devgid= XXX,devmode=666 0 0 where XXX, the same qid that we remembered in the previous step. Save the changes and restart your computer. 4. After reboot, launch Virtualbox and go to the properties of your virtual machine. Move to the USB section and there check the boxes “enable USB” and “enable USB 2.0” (my system is in English, I translated these names on the fly, maybe they won’t be called that way in the Russian interface). Then you start the system and to connect USB devices in the navigation window of your virtual machine, go to “Devices - USB devices” and check the required devices. You can also add so that USB devices are connected automatically when the virtual OS starts. To do this, in the virtual machine settings, in the USB section, add the required device to the filter. From the sponsor: Italian furniture factories are famous for their products all over the world. Such furniture is created within the framework of the requirements of European quality standards and will serve its owner for a long time. In addition, Italian furniture factories use natural materials in the production process. Buying furniture from Italian manufacturers means getting a quality product with a beautiful design at an affordable price.

In this post, I will tell you how to connect a USB drive to a virtual machine so that the guest system treats it as a regular hard drive.

This trick will not only allow you to boot from the installation USB - which, in my opinion, is quite pointless, since an ISO image is written to a flash drive, which is much easier to connect to a virtual computer in VirtualBox. If you connect a USB drive or flash drive to the guest system as a regular drive, you can do such interesting things as:

  • booting from a physical SATA drive via a USB adapter
  • installing Windows on a USB disk or flash drive

If you do not have the opportunity to connect a SATA drive directly to a computer - for example, to a laptop - but you really need to boot into the operating system that is deployed on it, then the trick described here will help you do this: connect the SATA drive to the computer using a USB adapter, and then connect the USB disk to the virtual machine as a regular disk, as shown in this instruction.

Regarding the second point - installing Windows on a USB drive - if you want to install Linux on a flash drive (not burn a Live image, but install a full-fledged system), then for installation it is not necessary to do the trick shown here - since Linux installs perfectly on a portable drive. But Windows prohibits installation on USB drives and flash drives.

I'll show you how to boot from USB in Windows and Linux. The principle is the same in both of these operating systems, but the commands are slightly different due to the specifics of the OS.

How to boot from USB in VirtualBox in Windows

Connect the USB flash drive or disk to your computer. Then click Win+r and execute diskmgmt.msc.

Find your flash drive and remember the disk number:

For example, in my screenshot the flash drive is number 2.

Close all VirtualBox windows if they are open.

In the window that opens, enter:

Now go to the folder where you have VirtualBox installed. If this program is installed in the default directory, then the command to go to is:

Cd %programfiles%\Oracle\VirtualBox

If you chose a different location for VirtualBox, then edit the previous command accordingly.

Now in the command line paste the following command in which replace # on the disk number that we looked at just above, then press Enter:

VBoxManage internalcommands createrawvmdk -filename C:\usb.vmdk -rawdisk \\.\PhysicalDrive#

For example, this is my second disk, then the command looks like this:

VBoxManage internalcommands createrawvmdk -filename C:\usb.vmdk -rawdisk \\.\PhysicalDrive2

If everything went well, the following message should appear:

RAW host disk access VMDK file C:\usb.vmdk created successfully.

Please note that you can replace C:\usb.vmdk to any file location you wish.

This command creates a virtual machine disk (VMDK) file pointing to the physical disk you selected. When you load a VMDK file as a disk in VirtualBox, then VirtualBox will actually have access to the physical disk.

Now open VirtualBox as an administrator - this is mandatory, otherwise it will not work as expected. To do this, click the button Start, dial VirtualBox and select " Run as administrator»:

VirtualBox can only access raw disk devices with administrator rights.

Now in VirtualBox, create a new virtual machine, select the appropriate operating system and when it comes to choosing a hard drive, instead of creating a new one, select Use an existing virtual hard disk:

Now open the file C:\usb.vmdk(or another one if you saved it in a different location or under a different name):

Boot your virtual machine, now it should see your USB flash drive as a regular hard drive. That is, if it is a correctly recorded boot disk or flash drive, then the system will boot from it.

Please note that the USB device must be the first hard drive in your VirtualBox virtual machine, otherwise booting will not occur. If you are connecting a new USB drive to an existing machine, try changing the media order in the settings of that machine, or selecting the appropriate drive at the start of booting.

How to boot from USB in Linux in VirtualBox

To understand the principle, read the previous section about Windows. In Linux, to find out the name of the USB drive, run the command:

Sudo fdisk -l

In my case, the disk has a name /dev/sdb.

To create a virtual disk file pointing to a real disk, run a command like:

Sudo VBoxManage internalcommands createrawvmdk -filename /root/usb.vmdk -rawdisk /dev/sd#

Where instead # Enter the letter of the corresponding drive. Example for my conditions:

Sudo VBoxManage internalcommands createrawvmdk -filename /root/usb.vmdk -rawdisk /dev/sdb

In this command, you can replace /root/usb.vmdk with another location of your choice.

To run VirtualBox with administrator rights, run the command:

Sudo VirtualBox

Everything else - creating a virtual machine and selecting an existing virtual disk as a hard disk - is exactly the same as in Windows.

VirtualBox is a popular program for emulating a personal computer and running various operating systems. You can connect various devices to your virtual machine, including USB devices connected to the main system.

But many users are faced with the problem that VirtualBox does not see USB. The devices are connected to the system and work exactly, but they are simply not in the connection menu. In this article we will look at what to do if virtualbox linux does not see usb devices. The article is intended primarily for Ubuntu, but will also be suitable for users of other distributions.

Error Virtualbox does not see USB

Most often, this error occurs because the user under whose name you launched VirtualBox does not have access to the necessary files. This can be solved very simply, you just need to add your user to the vboxusers group. To do this, run the command:

sudo usermod -a -G vboxusers $USER

After that, you just need to log in again for everything to work. You can check if USB devices are detected using the command:

VBoxManage list usbhost

But this doesn't always help. You also need to see if USB controller support is enabled for the virtual machine. To do this, open the context menu for it and select "Settings", then go to the tab "USB":

There should be a check mark next to it "Enable USB controller", and one of the available interfaces is selected. To support USB 2.0 or USB 3.0, you need to install the Virtualbox Extensions Pack. This is a set of proprietary extensions that also include support for this technology. Most likely, you can already connect usb virtualbox.

To do this, download the file for your version of Virtualbox on the official website. Then open the menu "File" -> "Settings" -> "Plugins" and connect the downloaded file here:

In Ubuntu 16.04 this can be done easier, just run the command:

sudo apt install virtualbox-ext-pack

Done, after that you can enable USB 3.0 support.

On some distributions, such as the Red Hat family, usb does not work in virtualbox because support for USB connections is disabled for security reasons. In this case, you will have to turn it on. To do this, you must first uncomment all SUBSYSTEM lines in /etc/udev/rules.d/60-virtualbox.conf. This can be done with the command:

sudo printf "%s\n" "g/^#SUBSYSTEM/s/^#//" w | ed -s /etc/udev/rules.d/60-vboxdrv.rules

Then copy this file to the /usr/lib/udev directory:

sudo cp -v /etc/udev/rules.d/60-vboxdrv.rules /usr/lib/udev/

And reload the rulesets:

sudo udevadm control --reload-rules
$ sudo systemctl restart vboxdrv.service

Now you can check again whether Virtualbox still does not see usb devices or everything is already working.

conclusions

In this article, we looked at what to do if VirtualBox does not see USB in Ubuntu or other Linux distributions. In most cases, the problem can be solved very simply. I hope you found this information helpful.

Related posts:


Often those who like to experiment have a need to use a USB device in a virtual machine. A trivial connection through the main menu implies repeated actions every time the VM starts, so in this article we will figure out how to connect a flash drive to a Virtualbox virtual machine by adding a filter that will allow us to use the drive without a constant connection at startup.

You can connect an external USB drive to the virtual machine.

First of all, we need to find out which version of Virtualbox we are using. It's easy to do. Open the manager, click on the “Help” button, select “About the program”. The required information will be indicated in the appropriate field below. In my case it is 4.3.12.

Go to the official Virtualbox website and look for your version of the program. If you are not using the latest one, then you need to go down and find a link to older versions of Virtualbox (Virtualbox older builds). In the detailed information you need to find the Extension Pack for all platforms. Pay attention to this point, you cannot make a mistake here, otherwise the plugin will not be suitable for our program. Let's download it.

In the Virtualbox manager, go to the “File” and “Settings” menu. Go to the plugins section, click on the “Add plugin” icon and look for our downloaded file. Select and click “Open”. We are warned that plugins can lead to failures, the usual scare, if you agree, then click “Install”. We accept the license agreement, move the slider to the very bottom, the “I agree” button is activated, click on it. The plugin has been successfully installed, click on the “Ok” button twice.

Add a filter

Now we select our machine in the list, click “Configure”, go to the “USB” section, in order to edit these settings, it must be turned off. Check the “Enable USB 2.0 controller” checkbox; if you have a newer version, 3.0 will be available. Click on the “Add filter” button and look for your device in the list. The filter has been added, click “Ok”. Let's start our car.

Permanent setup and one-time connection

The flash drive will only be available on the created system while it is turned on. When the machine is turned off, the flash drive is available in real life. This method is suitable if you don’t want to connect the device every time inside a running machine, although this can be done.

How to open a flash drive in a virtual machine? In the main window of Virtualbox there is a “Properties” item, click on it and select the “USB Devices” item, then just select the desired device, after which the manager will transfer control of the drive from the operating system of the real machine to the created one.

Conclusion

So, we figured out how to connect a flash drive in Virtualbox. The process itself is quite simple and will only take you a few minutes. If we want to disable automatic connection, then we will only need to remove the filter, and that’s it. With each new article about virtual machines, we gain more and more skills when working with them, train, experiment, and after some time they will become your main weapon when working with new applications or utilities.

If you have any questions, ask them in the comments!

VirtualBox can pick up a USB port with the desired device at startup.

For example, we use a USB printer (or want to use a flash drive), which only works under Windows XP. Let's take the port with the connected printer from the main PC (naturally, the printer is physically connected to the real PC).

At first everything is done by hand.

In our virtual machine (control panel below), we select which port we want to connect (all external USB devices will be shown).

After capturing the USB device, hover the mouse over the desired device and see the details.

We need serial number No. 281208003422.

Launch USB setup.

We see the USB device filters and create a new one.

We indicate in the filter the serial number of the port that we found out during the first manual connection. In this case, 281208003422. And we call this filter somehow.

That's all. Now, when launched, the VirtualBox virtual machine will automatically capture this USB device for itself.

VirtualBox (Oracle VM VirtualBox) is a virtualization system designed to create a virtual machine with the hardware parameters of a real computer, on which you can run any operating system. Latest version 5.2. Company website www.virt...

mob_info