Virtual Machine USB Connection for non storage Devices

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.
Post Reply
tre4b
Starting out
Posts: 23
Joined: Mon Feb 08, 2016 5:08 am

Virtual Machine USB Connection for non storage Devices

Post by tre4b »

I have a Virtual machine that runs my home automation server. It uses a USB based device to connect the device to the wider home devices.

To connect the device I simply click the USB button in the settings and add the device in. It works perfectly. The problem is that this USB connection is dropped when the server requires rebooting. I need to go back into the device and re-enable the USB before things will work again. Once enabled it is once again perfect until the next time. The server itself is restarted after the reboot however as it does not reconnect it to the USB there is limited use in this.

Is there a way for me to set the USB association so that it is re-established after the VM is restarted? Is this a failure in my config, a missing feature in QNAP virtualisation or something that is just not possible to achieve?
User avatar
Trexx
Ask me anything
Posts: 5393
Joined: Sat Oct 01, 2011 7:50 am
Location: Minnesota

Re: Virtual Machine USB Connection for non storage Devices

Post by Trexx »

Need more info re VS version, NAS mode, QTS version, etc.


Sent from my iPhone using Tapatalk
Paul

Model: TS-877-1600 FW: 4.5.3.x
QTS (SSD): [RAID-1] 2 x 1TB WD Blue m.2's
Data (HDD): [RAID-5] 6 x 3TB HGST DeskStar
VMs (SSD): [RAID-1] 2 x1TB SK Hynix Gold
Ext. (HDD): TR-004 [Raid-5] 4 x 4TB HGST Ultastor
RAM: Kingston HyperX Fury 64GB DDR4-2666
UPS: CP AVR1350

Model:TVS-673 32GB & TS-228a Offline[/color]
-----------------------------------------------------------------------------------------------------------------------------------------
2018 Plex NAS Compatibility Guide | QNAP Plex FAQ | Moogle's QNAP Faq
tre4b
Starting out
Posts: 23
Joined: Mon Feb 08, 2016 5:08 am

Re: Virtual Machine USB Connection for non storage Devices

Post by tre4b »

Hi Trex

I'm using a TS-453BE with 8gb Ram. It is about to be running 4.3.6.1050 build 20190830 as I went in to look up the version and it asked to do a firmware update. I keep it up to date with the QTS version. I'm not sure what you mean by NAS mode. Normally it runs with about half the ram free and less than 20% processor utilisation even running the VM. That VM is simply running Linux with Domoticz running on it.
User avatar
Trexx
Ask me anything
Posts: 5393
Joined: Sat Oct 01, 2011 7:50 am
Location: Minnesota

Re: Virtual Machine USB Connection for non storage Devices

Post by Trexx »

Sorry.. mode = typo for NAS model. Make sure you are on the latest VS version.

I as assuming you are using the USB for a zigbee/z-wave type dongle.

One way you can do this which will be a little lighter weight (and still supports USB dongle) would be doing a docker deployment instead. See here as an example: https://qiot.qnap.com/blog/2018/05/21/i ... r-station/

I have used USB devices with VS before (mainly logitech transceivers) , and don't recall those being disconnected on shutdown in the latest versions but it has been a while. Now if you reboot the NAS, then that might drop the USB device. It may also be dependent of if you are direct connecting the USB dongle vs. plugging it into a hub then into the qnap.
Paul

Model: TS-877-1600 FW: 4.5.3.x
QTS (SSD): [RAID-1] 2 x 1TB WD Blue m.2's
Data (HDD): [RAID-5] 6 x 3TB HGST DeskStar
VMs (SSD): [RAID-1] 2 x1TB SK Hynix Gold
Ext. (HDD): TR-004 [Raid-5] 4 x 4TB HGST Ultastor
RAM: Kingston HyperX Fury 64GB DDR4-2666
UPS: CP AVR1350

Model:TVS-673 32GB & TS-228a Offline[/color]
-----------------------------------------------------------------------------------------------------------------------------------------
2018 Plex NAS Compatibility Guide | QNAP Plex FAQ | Moogle's QNAP Faq
RumoMM
Starting out
Posts: 17
Joined: Mon Aug 19, 2019 3:36 am

Re: Virtual Machine USB Connection for non storage Devices

Post by RumoMM »

You can PCIe passtrough the Qnap 3.1 USB PCIe adapter. All USB devices connected to this adapter are reconnected if you boot the vm.
tre4b
Starting out
Posts: 23
Joined: Mon Feb 08, 2016 5:08 am

Re: Virtual Machine USB Connection for non storage Devices

Post by tre4b »

@Paul. Yes that is roughly what I am doing. I was going to use a container however the system I want to change to is essentially a container manager. When you try and run it in a container it fails as it does not have enough capabilities. I did try some changes documented in the QIOT forum however that made the containers grab all the memory and essentially killed off the NAS. I have concluded going with VM is my only option.

@RumoMM that sounds like an interesting idea. I'm not likely to plug anything else in so that might give me an options. I shall go look on Amazon.
User avatar
Trexx
Ask me anything
Posts: 5393
Joined: Sat Oct 01, 2011 7:50 am
Location: Minnesota

Re: Virtual Machine USB Connection for non storage Devices

Post by Trexx »

RumoMM wrote: Fri Sep 06, 2019 10:44 pm You can PCIe passtrough the Qnap 3.1 USB PCIe adapter. All USB devices connected to this adapter are reconnected if you boot the vm.
Interesting idea RumoMM, I hadn’t thought of that one.
Paul

Model: TS-877-1600 FW: 4.5.3.x
QTS (SSD): [RAID-1] 2 x 1TB WD Blue m.2's
Data (HDD): [RAID-5] 6 x 3TB HGST DeskStar
VMs (SSD): [RAID-1] 2 x1TB SK Hynix Gold
Ext. (HDD): TR-004 [Raid-5] 4 x 4TB HGST Ultastor
RAM: Kingston HyperX Fury 64GB DDR4-2666
UPS: CP AVR1350

Model:TVS-673 32GB & TS-228a Offline[/color]
-----------------------------------------------------------------------------------------------------------------------------------------
2018 Plex NAS Compatibility Guide | QNAP Plex FAQ | Moogle's QNAP Faq
tre4b
Starting out
Posts: 23
Joined: Mon Feb 08, 2016 5:08 am

Re: Virtual Machine USB Connection for non storage Devices

Post by tre4b »

Quick question, how compatible is the QNAP PCIe slot? You can get a good PCIe 3.1 card of a generic nature for a lot less than a QNAP version and it feels like something that would just be based off a standard USB chipset anyway. What I don't want to do is fry something because I plug a non qnap card in. Scanning their compatibility list I could find no USB cards listed even their own. When you look everything just says PCIe which hints it just complies with the standard and anything should fit electrically. My guess would be if there is an issue it would be because the OS carries no drivers for the device and cannot be updated to have them.
RumoMM
Starting out
Posts: 17
Joined: Mon Aug 19, 2019 3:36 am

Re: Virtual Machine USB Connection for non storage Devices

Post by RumoMM »

tre4b wrote: Fri Sep 06, 2019 11:41 pm Quick question, how compatible is the QNAP PCIe slot? You can get a good PCIe 3.1 card of a generic nature for a lot less than a QNAP version and it feels like something that would just be based off a standard USB chipset anyway. What I don't want to do is fry something because I plug a non qnap card in. Scanning their compatibility list I could find no USB cards listed even their own. When you look everything just says PCIe which hints it just complies with the standard and anything should fit electrically. My guess would be if there is an issue it would be because the OS carries no drivers for the device and cannot be updated to have them.
I had the same idea. But nope. If you use a bootable (int19) card the box is not booting up any more because the boot device of Qnap is a USB drive. (don't ask) With other cheap USB cards i was not able to passthrough the PCIe slot. It was just not available in VS.

The Qnap card is running fine but if you find a cheap card please let me know.
tre4b
Starting out
Posts: 23
Joined: Mon Feb 08, 2016 5:08 am

Re: Virtual Machine USB Connection for non storage Devices

Post by tre4b »

Thanks RumoMM, sounds like it has something other than just straight USB on it...
tre4b
Starting out
Posts: 23
Joined: Mon Feb 08, 2016 5:08 am

Re: Virtual Machine USB Connection for non storage Devices

Post by tre4b »

@RumoMM, can you tell me how you USB card shows up? I bought a genuine one and installed, I just cannot seem to see it anywhere and have no way to know if it is working or not. Is there somewhere I can see PCI devices and configure passthrough or does this just work after plugging it in?
Post Reply

Return to “Miscellaneous”