[Pkg-xen-devel] Bug#912381: xen-utils-4.11: /usr/lib/xen-4.11/bin/pygrub is missing after upgrade from xen-utils-4.8

Hans van Kranenburg hans at knorrie.org
Wed Oct 31 18:26:14 GMT 2018


On 10/31/2018 07:16 PM, Hans van Kranenburg wrote:
> Hi,
> 
> On 10/31/2018 05:51 PM, Dimitar Angelov wrote:
>> On Wed, 31 Oct 2018 17:13:10 +0100 Hans van Kranenburg
>> <hans at knorrie.org> wrote:
>>> On 10/31/2018 08:49 AM, Dimitar Angelov wrote:
>>>> On Wed, 31 Oct 2018 00:47:46 +0100 Hans van Kranenburg
>>>> <hans at knorrie.org> wrote:
>>>>> Hi,
>>>>>
>>>>> I see that there's no /usr/lib/xen-4.11/bin/pygrub indeed, and that's
>>>>> something that sounds wrong. Apparently, noone involved in helping
>>>>> getting Xen 4.11 into Debian so far has been a pygrub user.
>>>>>
>>>>> So... thanks for reporting, and thanks for trying out the new
>>> packages.
>>>>>
>>>>> I suspect it's rather obvious there's a problem, since there's no
>>> pygrub
>>>>> file at all, so we have to find out why and how it can be fixed.
>>>>>
>>>>> Missing pygrub stops booting paravirtualized Debian guests with
>>>> grub-legacy.
>>>> Can you suggest how to workaround?
>>>
>>> The quickest way, for now, would be to get it from the source package,
>>> and put the pygrub file from it in /usr/lib/xen-4.11/bin:
>>>
>>> https://sources.debian.org/data/main/x/xen/4.11.1~pre.20180911.5acdd26fdc+dfsg-5/tools/pygrub/src/pygrub
>>
>> Thank you for reply.
>> I've copied pygrub from source package to /usr/lib/xen-4.11/bin, but now
>> receive following error:
>>
>> Traceback (most recent call last):
>>   File "/usr/lib/xen-4.11/bin/pygrub", line 23, in <module>
>>     import fsimage
>> ImportError: No module named fsimage
> 
> Ah, more regressions... The script is missing a patch to set the lib
> directory in the path
> 
> In 4.8, it has a line...
>   sys.path.insert(1, sys.path[0] + '/../lib/python')
> ...which is missing now. That patch was lost somewhere apparently.

Oh no, duh, it's not in the file in the source package, obviously, heh.

Still, it's missing in the packaging it seems.

It was at the end of
  debian/patches/prefix-abiname/tools-pygrub-prefix.diff
before.

That file got removed in commit 0a18352eb, and the sys.path line didn't
return in any other place in a patch.

I just added a patch back for it.

> But even then, it fails:
> 
> dom0:/usr/lib/xen-4.11/bin -# python
> Python 2.7.15+ (default, Aug 31 2018, 11:56:52)
> [GCC 8.2.0] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import fsimage
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named fsimage
>>>> import sys
>>>> sys.path
> ['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu',
> '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old',
> '/usr/lib/python2.7/lib-dynload',
> '/usr/local/lib/python2.7/dist-packages',
> '/usr/lib/python2.7/dist-packages']
>>>> sys.path.insert(1, '/usr/lib/xen-4.11/lib/python')
>>>> import fsimage
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: libfsimage.so: cannot open shared object file: No such file
> or directory
> 
> I guess this is because of renaming of fsimage -> libfsimage that has
> been going on? Ian?
> 
> ---- >8 ----
> 
> An alternative that might help you now might be to switch to pvgrub2?
> 
> https://blog.xenproject.org/2015/01/07/using-grub-2-as-a-bootloader-for-xen-pv-guests/
> 
> Search for "Debian" in that page to find pointers to the grub-xen packages.
> 
>> I also can mention something other, when creating PV VM using
>> xen-create-image it reports:
>> warning: something called deprecated script
>> /usr/lib/xen-common/bin/xen-toolstack
>>
>>
>> The command is:
>> xen-create-image \
>>    --hostname=test2 --memory=1gb -vcpus=1 \
>>    --lvm=vg0 --size=10gb --noswap \
>>    --pygrub \
>>    --fs=ext4 \
>>    --dist=stretch \
>>    --role=udev \
>>    --gateway=10.10.10.1 --ip=10.10.10.12 --netmask=255.255.254.0 \
>>    --bridge=xenbr0 \
> 
> /usr/lib/xen-common/bin/xen-toolstack is a helper script that returned
> either 'xm' or 'xl' in the past. The xm toolstack is long gone now, and
> xl is the only choice. That message is harmless, and it points out that
> xen-create-image needs to be changed to just use xl.
> 
> This should be in a separate bug against the xen-tools package. I'll
> file it, thanks for reporting.
> 
> Hans
> 



More information about the Pkg-xen-devel mailing list