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

Re: [Xen-devel] Hotplugged devices in Xen 4.5 and domain reboot



Our real usb mass-storage device are located at driver domain (DomD). So we setup second block-device backend there.

To hotplug usb mass-storage from DomD we use follow command:

xl block-attach domU_id phy:/bla-bla,xvda10,w,backend="DomD"

There was no support of attaching block-device in runtime from domain other to Domain-0, so we have made some hacks to allow call block-attach command from non-dom0 privileged domain.
One of patches was - don't update /var/lib/xen/userdata-d.$DOMID-$UUID.libxl-json during execution of this command (because this log located on dom0 rootfs and we don't have any access to it from DomD). So, there is no different in configs before and after hotplug.

Did xen hot-plug mechanism relay on those config?



On Tue, Dec 1, 2015 at 4:02 PM, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
On Tue, Dec 01, 2015 at 03:24:13PM +0200, Pavlo Suikov wrote:
> Hi,
>
> got a question regarding hotplugged devices in Xen 4.5. What we currently
> have is Xen 4.5, Linux in Dom0 and DomD and Android in DomU. All the
> devices are configured via domain config, so they are initialized on domain
> startup: libxl reads config, sets up xenstore branches and fills them for
> driver back ends and front ends; front ends monitor these branches and fill
> in their specific data once connection is established. On DomU reboot,
> config is being re-read and all the devices are started again in the same
> manner.
>
> Problem is we don't really know what to do with hotplugged devices. When
> such a device appears in DomU during runtime, we set up all the xenstore
> insformation on the fly, but it doesn't go to persistent domain
> configuration; so when DomU reboot comes, they are not set up again as they
> should. All the solutions we are considering look like dirty hacks (e.g.
> making separate branch in xenstore for hotplugged devices, reading it on
> domain start in the same way domain config is parsed, and copying data to
> corresponding xenstore domain branches). Are there any existing ways to
> handle these?
>

Do you have the exact runes you use to do the hotplug? How do you reboot
your DomU? What does /var/lib/xen/userdata-d.$DOMID-$UUID.libxl-json
look like before and after hotplug?

Wei.

> Suikov Pavlo
> GlobalLogic
> P +x.xxx.xxx.xxxx M +38.066.667.1296 S psujkov
> www.globallogic.com
> <http://www.globallogic.com/>
> http://www.globallogic.com/email_disclaimer.txt

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel




--

Iurii Mykhalskyi | Senior Software Engineer
GlobalLogic
+38.044.492.9695x3664Â M +38.096.311.5467Â S mad-nemoi
www.globallogic.com

http://www.globallogic.com/email_disclaimer.txt
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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