daily pastebin goal
21%
SHARE
TWEET

fajar

a guest Apr 24th, 2009 7,167 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Part 2, converting HVM guest to PV guest
  2. #=======================================================================
  3.  
  4. First we need to install kernel-xen with correct initrd
  5. - yum install kernel-xen
  6. - edit /boot/grub/menu.lst so it looks like this
  7. #=================================================
  8. default=0
  9. timeout=5
  10. serial --unit=0 --speed=9600
  11. terminal --timeout=5 serial console
  12. title CentOS (2.6.18-128.1.6.el5xen)
  13.         root (hd0,0)
  14.         kernel /vmlinuz-2.6.18-128.1.6.el5xen ro root=/dev/VolGroup00/LogVol00 console=xvc0
  15.         initrd /initrd-2.6.18-128.1.6.el5xen.img
  16. title CentOS (2.6.18-128.el5)
  17.         root (hd0,0)
  18.         kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 console=ttyS0 ide0=noprobe
  19.         initrd /initrd-2.6.18-128.el5.img
  20. #=================================================
  21.  
  22. - edit /etc/sysconfig/kernel so it looks like this
  23. #=================================================
  24. UPDATEDEFAULT=yes
  25. DEFAULTKERNEL=kernel-xen
  26. #=================================================
  27.  
  28. - edit /etc/modprobe.conf so it looks like this
  29. #=================================================
  30. alias eth0 xennet
  31. alias scsi_hostadapter xenblk
  32. #=================================================
  33.  
  34. -recreate initrd
  35. cd /boot
  36. mv initrd-2.6.18-128.1.6.el5xen.img initrd-2.6.18-128.1.6.el5xen.img.bak
  37. mkinitrd -v --builtin=xen_vbd --preload=xenblk initrd-2.6.18-128.1.6.el5xen.img 2.6.18-128.1.6.el5xen
  38.  
  39. Next we need to allow login from xvc0 (the default console)
  40. - edit /etc/inittab and add a line like this near the end
  41. #=================================================
  42. xvc:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav
  43. #=================================================
  44.  
  45. - add "xvc0" to the end of /etc/securetty
  46. - shutdown domU
  47.  
  48. Next we start the PV domU
  49.  
  50. - create PV domU config. Mine looks like this
  51. #=================================================
  52. memory = "500"
  53. maxmem = "8000"
  54.  
  55. vcpus=8
  56. vcpu_avail=1
  57.  
  58. disk =  [
  59.         'phy:/dev/rootVG/testlv,hda,w',
  60.         ]
  61. vif =   [
  62.         'mac=00:16:3E:49:CA:65, bridge=br6',
  63.         ]
  64. vfb =['type=vnc,vnclisten=0.0.0.0']
  65. bootloader="/usr/bin/pygrub"
  66. #=================================================
  67.  
  68. - startup domU, connect to it's console (xm create -c ...)
  69.  
  70. #=======================================================================
  71. End of part 2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top