[libvirt] PV loader in capabilities?

Why is it NULL instead of the path to pygrub? On Solaris, the path is different. regards john

On Thu, Jul 10, 2008 at 12:07:18AM +0100, John Levon wrote:
Why is it NULL instead of the path to pygrub? On Solaris, the path is different.
Loader is refering specifically to the <loader> tag which is a BIOS firmware blob. It seems we've not specified any tag in the capabilities for bootloader info. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Thu, Jul 10, 2008 at 09:08:33AM +0100, Daniel P. Berrange wrote:
On Thu, Jul 10, 2008 at 12:07:18AM +0100, John Levon wrote:
Why is it NULL instead of the path to pygrub? On Solaris, the path is different.
Loader is refering specifically to the <loader> tag which is a BIOS firmware blob.
virt-install code seems to disagree: elif self.boot_caps.loader == "pygrub" or (self.boot_caps.loader is None and self.boot_caps.type == "xen"): osblob += " </os>\n" osblob += " <bootloader>/usr/bin/pygrub</bootloader>" Now, if that's an error, that's fine. I have a patch on the way that fixes up the pygrub path based upon caps.host.arch when available (as this is always i86pc on Solaris). The other Daniel wrote:
(xend in that case), but the information is not provided there, are you suggesting to check a few locations on the filesystem ?
Hard-coding it in libvirt would be fine (in much the same way you do for emulator and HVM loader today). My patch to virt-install (hopefully) fixes the code to actually query capabilities for these values, pygrub excepted. regards john

On Thu, Jul 10, 2008 at 02:22:10PM +0100, John Levon wrote:
On Thu, Jul 10, 2008 at 09:08:33AM +0100, Daniel P. Berrange wrote:
On Thu, Jul 10, 2008 at 12:07:18AM +0100, John Levon wrote:
Why is it NULL instead of the path to pygrub? On Solaris, the path is different.
Loader is refering specifically to the <loader> tag which is a BIOS firmware blob.
virt-install code seems to disagree:
elif self.boot_caps.loader == "pygrub" or (self.boot_caps.loader is None and self.boot_caps.type == "xen"): osblob += " </os>\n" osblob += " <bootloader>/usr/bin/pygrub</bootloader>"
Now, if that's an error, that's fine. I have a patch on the way that fixes up the pygrub path based upon caps.host.arch when available (as this is always i86pc on Solaris).
Yep, that virt-install code is wrong. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Thu, Jul 10, 2008 at 12:07:18AM +0100, John Levon wrote:
Why is it NULL instead of the path to pygrub? On Solaris, the path is different.
You mean that when dumping the capabilities on a Xen host the sections <guest> <os_type>xen</os_type> <arch ... don't have a <loader> section under <arch> ? The pygrub path is not provided by xen as far as i can tell, and not hardcoded anywhere into libvirt it usually comes from the xen PV config files directly. the Capabilities dump gets its informations from the kernel and hypervisor (xend in that case), but the information is not provided there, are you suggesting to check a few locations on the filesystem ? Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
John Levon