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

Re: [Xen-devel] pygrub/hvm boot with alternate script= for block devices

On 21/01/13 11:48, Ian Campbell wrote:
> On Mon, 2013-01-21 at 10:19 +0000, Roger Pau Monne wrote:
>> On 21/01/13 11:01, Ian Campbell wrote:
>>> On Mon, 2013-01-21 at 09:56 +0000, Roger Pau Monnà wrote:
>>>> On 19/01/13 16:46, James Dingwall wrote:
>>>>> Hi,
>>>>> I am doing some experimentation with xen and Ceph and have a problem
>>>>> booting my guest when my disk = [] uses an alternate block script.
>>>>> Installation from a .iso was ok since the boot device was a file but 
>>>>> now
>>>>> trying to boot from the rbd neither the hvmbuilder or pygrub can start
>>>>> as they treat the first value after target= as the /dev node to try and
>>>>> use.
>>>> Yes, this is known problem which I'm trying to solve with this series:
>>>> http://lists.xen.org/archives/html/xen-devel/2012-12/msg01753.html
>>>>> My disk parameter looks like:
>>>>> disk = [ 'format=raw, script=block-rbd, vdev=xvda, access=w,
>>>>> target=image=ubuntu-test' ]
>>>>> In the pygrub log:
>>>>> OSError: [Errno 2] No such file or directory: 'image=ubuntu-test'
>>>>> and there is a similar error trying an HVM boot.
>>>>> My block-rbd script parses the value passed after target= to
>>>>> dynamically rbd map the image and then call the write_dev function from
>>>>> block-common.sh to save the corresponding /dev name in xenstore.
>>>>> According to the logging that I have in my block-rbd script this isn't
>>>>> even called before pygrub is executed.
>>>> The only solution right now will be to use PV guests and boot directly
>>>> with the kernel (no pygrub)
>>> Does commenting out the stat & check in the short term allow things to
>>> work well enough for James' purposes?
>> Current hotplug scripts don't have any need to write the dev in
>> xenstore, they only need to write the device major:minor in the
>> physical-device xenstore backend entry. The only way to solve this (with
>> current hotplug scripts) will be to call libxl_device_disk_add earlier
>> on (before pygrub), fetch "physical-device" from xenstore and translate
>> that back into the physical device it points to, and overwrite pdev_path
>> in libxl_device_disk struct with this value.
> OK, I think I follow. Presumably a similar hack would be needed to make
> the local_attach interface do something useful here too.
>> I would rather wait for the new interface to be finished rather than
>> adding this "hack" to libxl.
> Fair enough.
> In the meantime I suppose James could work around this by logging into
> rdb manually (or in a script) before starting the domain and
> specifying /dev/rdbN in the guest config?

Yes, I guess that's what most high-level toolstacks (like libvirt or
XAPI) do for supporting this kind of backends.

Xen-devel mailing list



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