Attach USB Device to VM automatically

Hi,

I have a specific USB-Device which I need to attach to a VM every time the VM starts.

The device is connected to the NAS and stays in the same port all the time - hence it doesn’t really matter if I attach the device by serial number or attach a specific port.

But I haven’t found a configuration option to auto-attach a USB port or device.

Any idea how I can accomplish this?

I have not done this but here’s what I think you will need to do. Edit the VM. Then in the Others Tab make sure to set the type of USB Controller and the Auto Start Policy is set to Always (I’m not 100% sure this setting is tied to USB though).

Now in the Physical Devices tab, select USB and click Edit.

You should see your USB devices. Check the one you want t mount.

Then you see it in your list:

You should be good after this point…

Thanks for the quick reply!

That’s exactly what I have done.

After shutdown and start of the VM the USB setting is gone :sob:

It doesn’t save the settings?

Shure it does - but the Auto Start Policy only refers to starting the VM nocht reattaching the USB Port/Device.

Maybe try virtualhere?

regards

OK. But is the USB Device still listed as enabled under “physical devices”? If so then it should mount with the VM when it starts.

I have seen USB devices auto detected and useable through file station but not being available to the VM on start despite selecting and applying in VS4. The problem was just flakey. You are limited to 4 USB devices anyway for a VM. I used a work around in the end (Virtual here).

regards

Thank you for your feedback!

I will confirm with the internal team whether this feature currently exists, and if not, I will ask the team to evaluate relevant optimizations. Thanks!

Could you please check for a compatibility issue? Some earlier operating system versions do not natively support USB 3.0. Thanks!

Why is my USB 3.0 device not recognized when using Virtualization Station? | QNAP

We are not talking about compatibility.

The USB device in question is detected by the NAS and when manually connected to the VM is also working within the VM perfectly.

It is really just auto-reconnect the device after VM reboot.

I’m not entirely certain of your settings or what you are doing, but I just tried attaching a USB hard drive to my Ubuntu VM in Virtualization Station.

The drive is there when I start the VM. All good.

I reboot the VM from within the VM - when it boots back up the drive is there.

I shut down the VM from within Linux. When I start the VM, the drive is there.

I think it is working the way you want it to work. Are you physically disconnecting the USB drive in between your VM usage?

edit: I also forced a shutdown from Virtualization Station and when I restarted the VM, guess what - the drive was still there.

I’ve never setup a VM, but could it have anything to do with the user that runs / creates the VM? (i.e. need admin?)

Would it be convenient for you to provide which VM OS (Virtual Machine Operating System) you are using and the model of the USB device?

Our internal team would like to attempt to reproduce your issue. Thanks!

HI,

Currently, automatic connection doesn’t seem to be possible, but my solution is as follows for your reference:

  1. Install a USB expansion card in the PCIe slot.

  2. Assign the USB expansion card to the VM.

Afterwards, connect USB devices to the USB expansion card, and automatic connection will be achieved.

I have demonstrated that automatic connection is possible. There’s no need to install a USB card in the PCIe slot. If you follow my steps, the drive automatically connects. I have verified this. If it is not, then there is some other error being made.

hmm - probably I need to revisit my initial request. It might only be when I reboot the NAS.

Due to another issue (which is currently under investigation with QNAP support) I had to reboot the NAS extremely frequently (about every 2 weeks or so). Probably I have mixed up things - sorry for that.

I’ll doublecheck at the weekend.