Ray Barnes
2009-Jun-23 22:25 UTC
[Xen-users] methods of porting RHEL PV guests to real hardware
As the subject states, I''m looking for pointers on porting paravirtualized RHEL guests from Xen back to real hardware. It seems straight-forward enough - ''yum install kernel'' to put a real kernel on the box. Make sure the menu.lst entries are ok. Install the grub boot blocks on the hard drive. Etc. etc. But how to get an initrd that closely matches the real hardware without *a lot* of trial and error whilst manually specifying the kernel modules that you think the real box will use? -Ray _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thaddeus Hogan
2009-Jun-24 01:42 UTC
Re: [Xen-users] methods of porting RHEL PV guests to real hardware
----- "Ray Barnes" <tical.net@gmail.com> wrote:> But how to get an initrd that closely matches the real hardware > without *a lot* of trial and error whilst manually specifying the > kernel modules that you think the real box will use? > > -Ray >Of course an easy, if not somewhat brute force way to do this is to install RHEL on the target and then copy most of the filesystem over (bin, sbin, usr, opt, var, etc, and lib <- but don''t whack the existing modules dir). Usually all you need in an initrd is enough to get the root volume online and the rest of the modules can be loaded from disk. This should include the storage controller and and device mapper features you are using like LVM. I''ve had to peel open a RHEL 5 initrd a couple times while setting up boot from SAN + multipath, and there really wasn''t a lot in there. I would start with scsi_mod, sd_mod, dm_mod, and then any specific hardware module for your HBA. For specific hardware, it may take some research to identify the module name and all dependencies without having a system running those modules. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jun-24 02:02 UTC
Re: [Xen-users] methods of porting RHEL PV guests to real hardware
On Wed, Jun 24, 2009 at 8:42 AM, Thaddeus Hogan<thaddeus@thogan.com> wrote:>> ----- "Ray Barnes" <tical.net@gmail.com> wrote: > >> But how to get an initrd that closely matches the real hardware >> without *a lot* of trial and error whilst manually specifying the >> kernel modules that you think the real box will use? > > Of course an easy, if not somewhat brute force way to do this is to install RHEL on the target and then copy most of the filesystem over (bin, sbin, usr, opt, var, etc, and lib <- but don''t whack the existing modules dir).Yup, that''s the most reliable method. I usually use LVM and have the "original" root filesystem and the one from domU on separate LV.> I would start with scsi_mod, sd_mod, dm_mod, and then any specific hardware module for your HBA. For specific hardware, it may take some research to identify the module name and all dependencies without having a system running those modules.copying /etc/modprobe.conf from a real physical machine to domU, and regenerate initrd should be able to handle most hardware drivers. LVM is another thing though, so it''s easier to simply use a working initrd (the previous method). -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users