:wq - blog » kernel http://writequit.org/blog Tu fui, ego eris Mon, 22 Dec 2014 14:54:59 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.5 How to convert a non-SMP RedHat VM into a SMP RedHat VM http://writequit.org/blog/2008/01/28/how-to-convert-a-non-smp-redhat-vm-into-a-smp-redhat-vm/ http://writequit.org/blog/2008/01/28/how-to-convert-a-non-smp-redhat-vm-into-a-smp-redhat-vm/#comments Mon, 28 Jan 2008 20:04:13 +0000 http://writequit.org/blog/?p=136 Today I got an interesting request, a user needed to change his 64 bit non-SMP VM image (running RedHat 4.0) to a SMP machine, problem is, I don’t really want to have to go through reconfiguring the kernel and rebuilding it, so here’s the easy way to do it (it’s pretty simple):

  1. Power the image down
  2. Right-click and edit the settings for the VM image (if you don’t know how to do this, this article is beyond your scope)
  3. Change the CPU settings from 1 to >1 (2 or 4 or 8 or whatever you want to use) (see picture)
    changecpu
  4. Power the VM image back on
  5. Put the RedHat CD #2 in your desktop CD drive (or using the ISO), connect the disc to the VM image (see picture, note that I selected the wrong ISO, should be disc #2)
    mountisoselectiso
  6. On the vmware image, mount the cd with: mount /media/cdrom
  7. Enter the directory: cd /media/cdrom/RedHat/RPMS
  8. In my case, I’m using a 64-bit kernel, so I would use the 64-bit SMP kernel:
    [root@lava2057 RPMS]# rpm -Uvh kernel-smp-2.6.9-42.EL.x86_64.rpm
  9. Unmount the CD, dettach the CD/ISO
  10. Run up2date to make sure the new kernel you installed is up to date (chances are that it isn’t, since RedHat has pushed out a new kernel since putting out the CDs)
  11. Edit the /boot/grub/grub.conf file, mine looks something like this before changes:
    default=2
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title Red Hat Enterprise Linux ES (2.6.9-67.0.1.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-67.0.1.ELsmp ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.9-67.0.1.ELsmp.img
    title Red Hat Enterprise Linux ES (2.6.9-42.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.9-42.ELsmp.img
    title Red Hat Enterprise Linux ES (2.6.9-67.0.1.EL)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-67.0.1.EL ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.9-67.0.1.EL.img
    title Red Hat Enterprise Linux ES (2.6.9-42.EL)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-42.EL ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.9-42.EL.img
  12. I have 4 kernels installed, the initial install 64-bit (non-SMP), the 64-bit SMP I just installed and the most recently updated versions of each of these, as you can see, the line “default=2” is still pointing to our non-SMP image. We need to use the 2.6.9-67.0.1.ELsmp kernel, so I’m going to change it to “default=0
  13. Reboot the machine
  14. After it’s rebooted, log in and check ‘uname -a‘, mine shows:
    Linux lava2057.lss.emc.com 2.6.9-67.0.1.ELsmp #1 SMP Fri Nov 30 11:57:43 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

Simple eh? I know it’s not related to security, but I figured it’d be helpful to someone out there. :)

]]>
http://writequit.org/blog/2008/01/28/how-to-convert-a-non-smp-redhat-vm-into-a-smp-redhat-vm/feed/ 1