XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Attaching USB storage via XOA

    Scheduled Pinned Locked Moved Xen Orchestra
    22 Posts 10 Posters 27.8k Views 8 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rlyons20R Offline
      rlyons20 @olivierlambert
      last edited by

      @olivierlambert unfortunately, I can't get the xe pusb-list command to return my USB devices, even though I see them with dmesg.

      So, I may have bigger problems here...

      rlyons20R 1 Reply Last reply Reply Quote 0
      • rlyons20R Offline
        rlyons20 @rlyons20
        last edited by rlyons20

        @rlyons20 soooo... xe pusb-list only exposes STORAGE devices. I verified by plugging in a USB thumb drive, and that shows up.

        So, my use case of running HomeAssistant as a VM with Zigbee/Zwave USB devices is probably dead in the water.

        That's disappointing...

        1 Reply Last reply Reply Quote 0
        • olivierlambertO Offline
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          You might modify the filter to get your dongle detected 🙂

          1 Reply Last reply Reply Quote 0
          • G Offline
            gpoole
            last edited by

            I wrote a script to set up USB device passthrough for a specific device by name to a specific VM by name in the same basic way the XCP-ng Centre UI does it when you follow the steps described in the original post. Here's the script: https://gist.github.com/gpoole/c89807e9de9cb5c87bbcc2da27e0c3e4

            Are those the commands you're looking for @olivierlambert?

            Either way hopefully useful to anyone who wants to do this without using XCP-ng Centre. I've found it needs to be done every boot, so the script is intended to be something I can quickly SSH in and run. I'm sure it could be automated properly but works for me.

            E 1 Reply Last reply Reply Quote -1
            • olivierlambertO Offline
              olivierlambert Vates 🪐 Co-Founder CEO
              last edited by

              Thanks for the commands. I just find it weird you need to do it at each boot, I don't remember having to do it here 🤔

              1 Reply Last reply Reply Quote 0
              • E Offline
                EyesUnclouded @gpoole
                last edited by

                @gpoole Thank you! I'm sure this will be quite useful in my homelab, but maybe not at work just yet... particularly because I am hopeful Olivier and Vates are able to integrate this into XOA.

                This is because I am looking into integrating at least one HSM into our xcp-ng infrastructure, and the $650 USB-A YubiHSM2 is quite attractive. It would be great to be able to reliably pass this through via XOA to a Windows Server VM. I could imagine this use case being potentially important for small-medium sized companies looking for alternatives to typical expensive HSMs.

                C 1 Reply Last reply Reply Quote 1
                • C Offline
                  cyrus104 @EyesUnclouded
                  last edited by

                  @xenoNfluX @olivierlambert

                  I would agree this would be great for the Z-wave/Zigbee dongles in Home Automation.

                  Right now I'm working on a small homelab that can pass through the intel Quicksync to a Plex server and the USB to support HA.

                  Having this in XOA/XOCE, even XO-lite (understandably not really a "lite" feature).

                  S 1 Reply Last reply Reply Quote 1
                  • Ethan6123E Offline
                    Ethan6123
                    last edited by

                    I am also interested in this feature.

                    We use XCP-NG to run the virtual hosts in our DMZ. As you can imagine, the DMZ is completely separated from our internal network and the only way to transfer a file to a virtual server is to physically connect a usb drive to a host.

                    We use Xen Orchestra for everything except this. When we need to mount a USB drive we have to physically connect a laptop to the DMZ network and then attach the USB drive with XCP-NG Center.

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      SpoonyLove @cyrus104
                      last edited by

                      @cyrus104 @olivierlambert I'm also interested in USB support, and specifically USB dongle connectivity for HomeAsssistant.

                      @olivierlambert , you mentioned filter modification. is that at the xen level? Similar to many, i'm at the beginner level- I'm willing to tackle a problem or provide specification for further development, but i'm not sure where to start.

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        SpoonyLove @SpoonyLove
                        last edited by

                        @SpoonyLove

                        Found some resources that answered my own question. For the sake of future google searches, please redirect my question to:

                        https://psychogun.github.io/docs/xcp-ng/USB-passthrough/

                        G 1 Reply Last reply Reply Quote 0
                        • G Offline
                          gn_ro @SpoonyLove
                          last edited by

                          @SpoonyLove @olivierlambert
                          For usb passthrough we are using USB redirector over network
                          For anything storage related we use something like this:

                          mkdir /adm/passSR
                          
                          passUUID=`xe sr-create name-label="Direct access SR" name-description="Direct acces to hdd with simlink" type=udev content-type=disk device-config:location=/adm/passSR`
                          
                          ln -s /dev/sdb /adm/passSR/sdb
                          
                          xe sr-scan uuid=$passUUID
                          xe vdi-list sr-uuid=$passUUID
                          

                          Remember to replace /dev/sdb with your device.

                          1 Reply Last reply Reply Quote 0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • First post
                            Last post