From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: Hotplugged devices in Xen 4.5 and domain reboot Date: Tue, 1 Dec 2015 16:56:27 +0100 Message-ID: <565DC32B.7010300@citrix.com> References: <20151201140208.GA25722@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Iurii Mykhalskyi , Wei Liu Cc: Pavlo Suikov , Andrii Anisov , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hello, El 01/12/15 a les 15.58, Iurii Mykhalskyi ha escrit: > 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" This is not possible by design, you should only be able to execute `xl block-attach ...` from the control domain (Dom0). This is due to the fact that attaching a new device to a guest requires write permissions in the guest xenstore paths, which the driver domain should not have. > > 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. Do you have either the `xl devd` command running or udev rules correctly setup inside of the driver domain? Does something like the following work? If not, could you paste the error when running it with -vvv. xl block-attach DomU format=raw,vdev=hdc,access=rw,backend=DomD,target=/path/to/dev Roger.