Advertisement
Guest User

fajar

a guest
May 15th, 2009
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. Step 2 : Convert ubuntu-9.04-server-amd64 HVM to PV
  2. ========================================================================
  3.  
  4. -> Login to HVM domU
  5.  
  6. -> Add apt source list for Debian Lenny. Create a file /etc/apt/sources.list.d/lenny.list with this content
  7. ########################################################################
  8. deb http://ftp.debian.org/debian/ lenny main
  9. deb http://ftp.debian.org/debian/ lenny-proposed-updates main
  10. ########################################################################
  11.  
  12. -> install Lenny's linux-image-xen-amd64
  13. # for key in A70DAF536070D3A1 4D270D06F42584E6;do sudo gpg --keyserver subkeys.pgp.net --recv-key $key;sudo gpg -a --export $key|sudo apt-key add -;done
  14. # sudo apt-get update
  15. # sudo apt-get install linux-image-xen-amd64
  16.  
  17. -> edit /boot/grub/menu.lst. Add these lines on the end (adjust UUID with the one on your system and kernel version with the one you just installed)
  18. ########################################################################
  19. title Ubuntu 9.04, kernel 2.6.26-2-xen-amd64
  20. uuid 8da532f7-9314-438b-8cc2-dc1da4ddb683
  21. kernel /boot/vmlinuz-2.6.26-2-xen-amd64 root=UUID=8da532f7-9314-438b-8cc2-dc1da4ddb683 ro
  22. initrd /boot/initrd.img-2.6.26-2-xen-amd64
  23. ########################################################################
  24.  
  25. -> also on /boot/grub/menu.lst, change the default entry to the one you just created (on my system, "default 3")
  26.  
  27. -> create a suitable upstart entry for hvc0
  28. # cd /etc/event.d/
  29. # sudo cp tty1 hvc0
  30. # sudo sed -i "s/tty1/hvc0/g" hvc0
  31.  
  32. -> poweroff domU
  33.  
  34. -> Create domU PV config file. Here's mine
  35. ########################################################################
  36. memory = "500"
  37. maxmem = "8000"
  38. cpus="1-7"
  39. cpu_cap=100
  40. cpu_weight=128
  41. vcpus=8
  42. vcpu_avail=1
  43.  
  44. vif = [ 'mac=00:16:3E:23:2C:52, bridge=br129' ]
  45. disk = [
  46. 'phy:/dev/disk/by-path/ip-192.168.129.89:3260-iscsi-iqn.1986-03.com.sun:02:8f570606-7acc-cc9f-cfae-eda9a39a9208-lun-0,hda,w',
  47. ]
  48.  
  49. vfb =['type=vnc,vnclisten=0.0.0.0']
  50. bootloader="/usr/bin/pygrub"
  51. ########################################################################
  52.  
  53. -> start PV domU with "xm create -c" (don't forget the "-c". It's helpful for debug purposes)
  54.  
  55. -> almost done :) Now you should be able to acess PV domU either from xen text console or from VNC. Login to domU.
  56.  
  57. -> copy /boot/grub/menu.lst, put it somewhere safe. You might need it later if you decide to turn this domU back to HVM
  58.  
  59. -> update domU's grub
  60. # sudo update-grub
  61.  
  62. -> change /boot/grub/menu.lst to have "default 0" again.
  63.  
  64. You're done :)
  65.  
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement