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

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



On Tue, 2015-12-01 at 18:52 +0100, Roger Pau Monnà wrote:
> El 01/12/15 a les 17.48, Iurii Mykhalskyi ha escrit:
> > > 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
> > In dom0 we have next issue:
> > /libxl: error: libxl_device.c:283:libxl__device_disk_set_backend: Disk
> > vdev=xvda10 failed to stat: /dev/sda1: No such file or directory//-
> > /this issue occurs due to missing /dev/sda1 device (all hardware are
> > placed in DomD domain).
> 
> I'm not sure how can you get to this path, the libxl chunk in 
> stable-4.5 is:
> 
> 271ÂÂÂÂÂif (disk->format == LIBXL_DISK_FORMAT_EMPTY) {
> 272ÂÂÂÂÂÂÂÂÂif (!disk->is_cdrom) {
> 273ÂÂÂÂÂÂÂÂÂÂÂÂÂLOG(ERROR, "Disk vdev=%s is empty but not cdrom", disk-
> >vdev);
> 274ÂÂÂÂÂÂÂÂÂÂÂÂÂreturn ERROR_INVAL;
> 275ÂÂÂÂÂÂÂÂÂ}
> 276ÂÂÂÂÂÂÂÂÂmemset(&a.stab, 0, sizeof(a.stab));
> 277ÂÂÂÂÂ} else if ((disk->backend == LIBXL_DISK_BACKEND_UNKNOWN ||
> 278ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdisk->backend == LIBXL_DISK_BACKEND_PHY) &&
> 279ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdisk->backend_domid == LIBXL_TOOLSTACK_DOMID &&
> 280ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ!disk->script) {
> 281ÂÂÂÂÂÂÂÂÂif (stat(disk->pdev_path, &a.stab)) {
> 282ÂÂÂÂÂÂÂÂÂÂÂÂÂLOGE(ERROR, "Disk vdev=%s failed to stat: %s",
> 283ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdisk->vdev, disk->pdev_path);
> 284ÂÂÂÂÂÂÂÂÂÂÂÂÂreturn ERROR_INVAL;
> 285ÂÂÂÂÂÂÂÂÂ}
> 286ÂÂÂÂÂ}
> 
> So it seems that block-attach is ignoring the 'backend=foo' field in 
> the disk configuration?
> 
> Can you paste the full output of the execution with -vvv?

Also a dummy attach will print the parsed json of the requested spec, e.g.:

# xl -N block-attach 0 
format=raw,vdev=hdc,access=rw,backend=DomD,target=/path/to/dev
disk: {
ÂÂÂÂ"backend_domname": "DomD",
ÂÂÂÂ"pdev_path": "/path/to/dev",
ÂÂÂÂ"vdev": "hdc",
ÂÂÂÂ"format": "raw",
ÂÂÂÂ"readwrite": 1
}

I'm not sure if -vvv on a proper attach will do the same in 4.5, so having
the output of both would be useful.

Ian.
> 
_______________________________________________
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®.