[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Attaching dom0 external USB HD to domU

On Sun, Mar 18, 2018 at 11:48 AM, John Naggets <hostingnuggets@xxxxxxxxx> wrote:
> Hi,
> I have an external USB 3.0 hard disk connected to my dom0 physical
> server. Now I would like the whole disk to be available in a specific
> domU. My conclusion is that there are 3 possible ways to configure
> that with the xl.cfg file of the domU: using usb, using pci
> passthrough and using the disk.
> The easiest of all 3 seems to be to simply add an extra entry in the
> disk [] parameter such as:
> 'phy:/dev/sdf,xvdb,w',
> /dev/sdf is the device name of my USB external storage on the dom0 and
> would be available as xvdb on my domU.
> Would this work? or is it not recommended and I should rather use the
> usb config for that purpose?

It should work, with the following caveats:

1. Your guest OS won't know that it's a removable device, and so may
not be as aggressive about flushing data out to it to avoid data loss
in the case of unexpected force removal.
2. The device name (/dev/sdf) may not be stable: that is, every time
you remove or insert the device, or every time you reboot, you might
get a different device name, so you'll need to change the config file.
(Or alternately, create a custom udev rule that would recognize that
particular USB device and give it a consistent name.)

If you're using an HVM guest, and have a new enough version of Xen to
have the 'usbdevice' directive, you can use the "bus.addr" naming
scheme, which should (I believe) be consistent across both device
removal and across reboots (as long as you always plug it into the
same slot); but that does mean restricting your guest type, as well as
emulating a USB controller and so on, which could potentially be less

Hope that helps. :-)


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.