Advertisement
Guest User

fajar

a guest
Apr 24th, 2009
9,378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. Part 1. Creating a Centos HVM domU with working PV drivers
  2. #=======================================================================
  3.  
  4. start with standard Centos 5.3 x86_64 HVM install.
  5. - my HVM domU config file :
  6. #=================================================
  7. memory = 500
  8.  
  9. vif = [ 'mac=00:16:3E:49:CA:65, bridge=br6' ]
  10. disk = [
  11. 'phy:/dev/rootVG/testlv,hda,w',
  12. 'file:/data/iso/centos.iso,hdc:cdrom,r',
  13. ]
  14.  
  15. boot="cd"
  16.  
  17. device_model = '/usr/lib64/xen/bin/qemu-dm'
  18. kernel = "/usr/lib/xen/boot/hvmloader"
  19. builder='hvm'
  20.  
  21. sdl=0
  22. vnc=1
  23. vnclisten="0.0.0.0"
  24. #vncunused=0
  25. vncpasswd=''
  26. #stdvga=0
  27. serial='pty'
  28. #localtime=1
  29.  
  30. usbdevice='tablet'
  31. acpi=1
  32. apic=1
  33. pae=1
  34.  
  35. vcpus=1
  36. #=================================================
  37.  
  38. Note boot="cd". With this config if you're using "fresh" LVM or image file, the harddisk will be unbootable initally and it will boot from CD. After installation it will automatically boot from harddisk.
  39.  
  40. - if you want serial text console (like I do), on DVD installation splash screen start installation with
  41. linux text console=vga console=ttyS0
  42.  
  43. - during package selection, unselect "desktop GNOME" if you want text login like I do. Although not required, this will reduce resource needs (e.g. memory) and make subsequent setup easier.
  44. - proceed untill installation finished
  45.  
  46.  
  47. activate PV drivers
  48.  
  49. - edit /boot/grub/menu.lst so it looks like this (note ide0=noprobe)
  50. #=================================================
  51. default=0
  52. timeout=5
  53. serial --unit=0 --speed=9600
  54. terminal --timeout=5 serial console
  55. title CentOS (2.6.18-128.el5)
  56. root (hd0,0)
  57. kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 console=ttyS0 ide0=noprobe
  58. initrd /initrd-2.6.18-128.el5.img
  59. #=================================================
  60.  
  61. - edit /etc/modprobe.conf so it looks like this
  62. #=================================================
  63. #alias eth0 8139cp
  64. blacklist 8139cp
  65. blacklist 8139too
  66. alias scsi_hostadapter ata_piix
  67. # xen HVM
  68. alias eth0 xen-vnif
  69. alias scsi_hostadapter1 xen-vbd
  70. #=================================================
  71.  
  72. -recreate initrd
  73. cd /boot
  74. mv initrd-2.6.18-128.el5.img initrd-2.6.18-128.el5.img.bak
  75. mkinitrd -v initrd-2.6.18-128.el5.img 2.6.18-128.el5
  76.  
  77. - init 6
  78. - reconnect to domU console (with either "xm console" or vncviewer)
  79. - login, check whether xen-vbd activates correctly
  80. # ls -la /sys/class/net/eth0/device
  81. lrwxrwxrwx 1 root root 0 Apr 25 11:50 /sys/class/net/eth0/device -> ../../../devices/xen/vif-0
  82. # ls -la /sys/block/hda/device
  83. lrwxrwxrwx 1 root root 0 Apr 25 11:50 /sys/block/hda/device -> ../../devices/xen/vbd-768
  84.  
  85. #=======================================================================
  86. End of part 1.
  87.  
  88.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement