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

Re: [Xen-devel] [PATCH 2 of 2] libxl: add support for booting PV domains from NetBSD using raw files as disks



> Yes.
>
> The other elements of the block hotplug scripts don't do anything any
> more on Linux I think, and currently libxl does not cope with script=
> being set, so from a Linux pov this is a new feature for libxl.
>
>> Would we then need special handling to turn "file:<X>" into
>> "phy:<X>,script=block-loop"?
>
> I think this should be done behind the scenes. ÂThe backend-specific
> code in libxl should call some kind of "invoke this script" function
> which would also be used for explicit "script=".
>
> On NetBSD, how do "more exciting" script= things work ? ÂEg, iscsi or
> nbd.

NetBSD only has block and vif scripts currently, nothing fancy.

> On Linux the idea is that the hotplug script sets up your nbd
> which causes a real block device to appear, and that block device is
> used by blkback.

NetBSD uses this approach to mount virtual images, the image is
mounted on the vnd device, and then this physical device is handled as
a regular 'phy' backend.

>
>> I seem to remember something about setting up a faked out backend area
>> for each backend and running the scripts against that instead of the
>> real one.
>
> We would need to do that to support (eg) pygrub over nbd.
>
>> There was a subtle difference between NetBSD's and Linux's handling of
>> these with xend. On Linux xend used to setup and manage the loopback
>> device and create a simple phy backend referencing it. On NetBSD xend
>> just sets up a file or phy backend as appropriate and the scripts which
>> run out of xenbackendd take care of setting up the loopback as necessary
>> and filing in the real device in xenstore. On teardown the loopback
>> device needs to be cleaned up (and this is what currently fails).
>
> I'm not a fan of these approaches with a separate daemon. ÂWe should
> avoid that if we can as it produces a lot of complication.

I also think it's stupid to have two different programs watching
xenstore, because that's what xenbackendd does. Instead, the code in
xenbackendd could be move to libxl without much problem. The proper
calls to the block, vif and other scripts can be added to
libxl__device_destroy function to unplug vbd and network interfaces,
but I don't know if that's the best place to put them, because I still
don't have enough knowledge of libxl to decide that. As for the
startup script, I have to look at the source to decide where to put
them. Some advice about where would be the best place to put this
calls is welcome.

Regards, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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