Hi Folks:
When I provision my dom0 server using cobbler, it uses the wrong xen kernel in the /boot/grub/grub.conf file which causes xend to fail with a permissions problem. I can fix it manually but I would like to fix automatically. There are at least two possible choices:
1) edit during the %post of kickstart or 2) configure the pxe templates (/etc/cobbler/pxe) correctly.
I think that I can manage the kickstart stuff but I do not know how to fix the templates. Can someone help me with that or at least point me to a reference? I didn't see anything detailed on the Trac site.
The problem and the fix are shown in detail below. The grub.conf files are identical except for line 8.
Here is the broken grub.conf:
1 # BROKEN: it should be using /xen.gz-3.4.3 at line 8 2 default=0 3 timeout=5 4 splashimage=(hd0,0)/grub/splash.xpm.gz 5 hiddenmenu 6 title CentOS (2.6.18-194.26.1.el5xen) 7 root (hd0,0) 8 kernel /xen.gz-2.6.18-194.26.1.el5 9 module /vmlinuz-2.6.18-194.26.1.el5xen ro root=/dev/VolGroup00/LogVol00 10 module /initrd-2.6.18-194.26.1.el5xen.img 11 title CentOS-base (2.6.18-194.26.1.el5) 12 root (hd0,0) 13 kernel /vmlinuz-2.6.18-194.26.1.el5 ro root=/dev/VolGroup00/LogVol00 14 initrd /initrd-2.6.18-194.26.1.el5.img
Here is the fixed grub.conf:
1 # FIXED: changed /xen.gz-2.6.18-194.26.1.el5 --> /xen.gz-3.4.3 at line 8 2 default=0 3 timeout=5 4 splashimage=(hd0,0)/grub/splash.xpm.gz 5 hiddenmenu 6 title CentOS (2.6.18-194.26.1.el5xen) 7 root (hd0,0) 8 kernel /xen.gz-3.4.3 9 module /vmlinuz-2.6.18-194.26.1.el5xen ro root=/dev/VolGroup00/LogVol00 10 module /initrd-2.6.18-194.26.1.el5xen.img 11 title CentOS-base (2.6.18-194.26.1.el5) 12 root (hd0,0) 13 kernel /vmlinuz-2.6.18-194.26.1.el5 ro root=/dev/VolGroup00/LogVol00 14 initrd /initrd-2.6.18-194.26.1.el5.img
Error message from /var/log/xen/xend.log:
[2011-01-05 13:54:00 6148] ERROR (SrvDaemon:349) Exception starting xend ((13, 'Permission denied')) Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvDaemon.py", line 341, in run servers = SrvServer.create() File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvServer.py", line 251, in create root.putChild('xend', SrvRoot()) File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvRoot.py", line 40, in __init__ self.get(name) File "/usr/lib64/python2.4/site-packages/xen/web/SrvDir.py", line 84, in get val = val.getobj() File "/usr/lib64/python2.4/site-packages/xen/web/SrvDir.py", line 52, in getobj self.obj = klassobj() File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvNode.py", line 30, in __init__ self.xn = XendNode.instance() File "/usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line 948, in instance inst = XendNode() File "/usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line 91, in __init__ self.other_config["xen_pagesize"] = self.xeninfo_dict()["xen_pagesize"] File "/usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line 937, in xeninfo_dict return dict(self.xeninfo()) File "/usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line 881, in xeninfo info['xen_scheduler'] = self.xenschedinfo() File "/usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line 871, in xenschedinfo sched_id = self.xc.sched_id_get() Error: (13, 'Permission denied')
Thanks,
Joe
On Wed, 5 Jan 2011 14:29:33 -0800, "Joe Linoff" jlinoff@tabula.com wrote:
Hi Folks:
When I provision my dom0 server using cobbler, it uses the wrong xen kernel in the /boot/grub/grub.conf file which causes xend to fail with a permissions problem. I can fix it manually but I would like to fix automatically. There are at least two possible choices:
- edit during the %post of kickstart or
I am pretty sure grub.conf is something that the kernel-xen rpm should be modifying and keeping up to date itself. I'm not sure how cobbler would be responsible for the file not getting laid down properly, but fixing it in post seems like a valid work around.
- configure the pxe templates (/etc/cobbler/pxe) correctly.
Again, I'm not sure how the pxe templates affect the grub.conf. Perhaps you are looking at the new UEFI boot support? That grub.conf is only used for install time and only on hosts that support UEFI PXE booting.
Hi Scott:
Thank you for the feedback.
but fixing it in post seems like a valid work around.
That makes sense and is what I implemented. It works perfectly.
Again, I'm not sure how the pxe templates affect the grub.conf. Perhaps you are looking at the new UEFI boot support? That grub.conf is only used for install time and only on hosts that
support UEFI PXE booting.
That explains things. I was definitely off base with that approach. Thanks for the explanation.
Best regards,
Joe
-----Original Message----- From: Scott Henson [mailto:shenson@redhat.com] Sent: Thursday, January 06, 2011 6:55 AM To: Joe Linoff; cobbler mailing list Subject: Re: invalid xen kernel in dom0 /boot/grub/grub.conf -- how can i fix it automatically?
On Wed, 5 Jan 2011 14:29:33 -0800, "Joe Linoff" jlinoff@tabula.com wrote:
Hi Folks:
When I provision my dom0 server using cobbler, it uses the wrong xen kernel in the /boot/grub/grub.conf file which causes xend to fail with
a permissions problem. I can fix it manually but I would like to fix automatically. There are at least two possible choices:
- edit during the %post of kickstart or
I am pretty sure grub.conf is something that the kernel-xen rpm should be modifying and keeping up to date itself. I'm not sure how cobbler would be responsible for the file not getting laid down properly, but fixing it in post seems like a valid work around.
- configure the pxe templates (/etc/cobbler/pxe) correctly.
Again, I'm not sure how the pxe templates affect the grub.conf. Perhaps you are looking at the new UEFI boot support? That grub.conf is only used for install time and only on hosts that support UEFI PXE booting.
-- Scott Henson Red Hat CIS Operator WVU Alum BSAE/BSME
cobbler@lists.fedorahosted.org