xen虚拟化实战系列(一)之xen虚拟化环境安装
xen目前還是RHEL/CentOS/OEL5.X支持情況比較好。RHEL6.X就默認不支持了,但是也可以通過安裝xen的源進行安裝。本文采用OEL5.8?x64進行環境配置。今后將發布一個系列的純文本配置xen實戰配置文章,這里不討論半虛擬化,完全虛擬化等概念,只講實戰,以此對xen學習做一個總結。
?
xen虛擬化實戰系列文章列表
xen虛擬化實戰系列(一)之xen虛擬化環境安裝
xen虛擬化實戰系列(二)之xen虛擬機安裝
xen虛擬化實戰系列(三)之xen虛擬機復制
xen虛擬化實戰系列(四)之xen虛擬機擴展磁盤空間一法
xen虛擬化實戰系列(五)之xen虛擬機擴展磁盤空間再一法
xen虛擬化實戰系列(六)之xen虛擬機破解密碼
xen虛擬化實戰系列(七)之xen虛擬機VNC訪問配置
xen虛擬化實戰系列(八)之xen虛擬機開機自啟動配置
xen虛擬化實戰系列(九)之xen虛擬機時間配置
xen虛擬化實戰系列(十)之xen虛擬機雙網卡配置
xen虛擬化實戰系列(十一)之xen虛擬機磁盤文件掛載
xen虛擬化實戰系列(十二)之xen虛擬機高可用之在線遷移
xen虛擬化實戰系列(十三)之xen虛擬機集中管理之convirt
CentOS6.x安裝xen4.2虛擬化實踐
http://koumm.blog.51cto.com/703525/1536666?
1.?操作系統安裝?
采用OEL5.8?X64安裝,安裝過程中選中圖形界面,開發包,開發庫,老的軟件開發包等,其它都不選。?
OEL下載地址大全:?http://koumm.blog.51cto.com/703525/1283801
#?uname?-a???
Linux?oradb?2.6.18-308.el5?#1?SMP?Sat?Feb?25?12:40:07?EST?2012?x86_64?x86_64?x86_64?GNU/Linux?
?
2.?配置yum源?
說明:通過安裝源進行安裝是最簡單的。?
#?cd?/etc/yum.repos.d????
#?wget?http://public-yum.oracle.com/public-yum-el5.repo
#?vi?public-yum-el5.repo?
#將對應的enable改為1,如下圖所示?
Oracle?Enterprise?linux(OEL)官方yum源配置???
http://koumm.blog.51cto.com/703525/1283867
?
3.?yum安裝xen?
#?yum?install?kernel-xen?xen-libs?xen?virt-viewer???
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | Loaded?plugins:?rhnplugin,?security This?system?is?not?registered?with?ULN. ULN?support?will?be?disabled. el5_latest??????????????????????????????????????????????????????????????????????????????????????????????|?1.4?kB?????00:00 el5_latest/primary??????????????????????????????????????????????????????????????????????????????????????|??16?MB?????01:20 el5_latest?????????????????????????????????????????????????????????????????????????????????????????????????????????11750/11750 ol5_UEK_base????????????????????????????????????????????????????????????????????????????????????????????|?1.2?kB?????00:00 ol5_UEK_base/primary????????????????????????????????????????????????????????????????????????????????????|?685?kB?????00:03 ol5_UEK_base?????????????????????????????????????????????????????????????????????????????????????????????????????????????28/28 Setting?up?Install?Process Resolving?Dependencies -->?Running?transaction?check --->?Package?kernel-xen.x86_64?0:2.6.18-348.16.1.0.1.el5?set?to?be?installed --->?Package?virt-viewer.x86_64?0:0.0.2-3.el5?set?to?be?updated -->?Processing?Dependency:?libvirt.so.0(LIBVIRT_0.0.3)(64bit)?for?package:?virt-viewer -->?Processing?Dependency:?libvirt.so.0(LIBVIRT_0.0.5)(64bit)?for?package:?virt-viewer -->?Processing?Dependency:?libgtk-vnc-1.0.so.0()(64bit)?for?package:?virt-viewer -->?Processing?Dependency:?libvirt.so.0()(64bit)?for?package:?virt-viewer --->?Package?xen.x86_64?0:3.0.3-142.el5_9.3?set?to?be?updated -->?Processing?Dependency:?python-virtinst?for?package:?xen -->?Processing?Dependency:?bridge-utils?for?package:?xen -->?Processing?Dependency:?libSDL-1.2.so.0()(64bit)?for?package:?xen --->?Package?xen-libs.i386?0:3.0.3-142.el5_9.3?set?to?be?updated -->?Processing?Dependency:?libext4fs.so.2?for?package:?xen-libs -->?Processing?Dependency:?liblzma.so.0?for?package:?xen-libs --->?Package?xen-libs.x86_64?0:3.0.3-142.el5_9.3?set?to?be?updated -->?Processing?Dependency:?libext4fs.so.2()(64bit)?for?package:?xen-libs -->?Running?transaction?check --->?Package?SDL.x86_64?0:1.2.10-9.el5?set?to?be?updated --->?Package?bridge-utils.x86_64?0:1.1-3.el5?set?to?be?updated --->?Package?e4fsprogs-libs.i386?0:1.41.12-3.el5?set?to?be?updated --->?Package?e4fsprogs-libs.x86_64?0:1.41.12-3.el5?set?to?be?updated --->?Package?gtk-vnc.x86_64?0:0.3.8-3.el5?set?to?be?updated --->?Package?libvirt.x86_64?0:0.8.2-29.0.1.el5_9.1?set?to?be?updated -->?Processing?Dependency:?cyrus-sasl-md5?for?package:?libvirt -->?Processing?Dependency:?ebtables?for?package:?libvirt --->?Package?python-virtinst.noarch?0:0.400.3-13.0.1.el5?set?to?be?updated -->?Processing?Dependency:?libvirt-python?>=?0.2.1?for?package:?python-virtinst --->?Package?xz-libs.i386?0:4.999.9-0.3.beta.20091007git.el5?set?to?be?updated -->?Running?transaction?check --->?Package?cyrus-sasl-md5.x86_64?0:2.1.22-7.el5_8.1?set?to?be?updated -->?Processing?Dependency:?cyrus-sasl-lib?=?2.1.22-7.el5_8.1?for?package:?cyrus-sasl-md5 --->?Package?ebtables.x86_64?0:2.0.9-5.el5?set?to?be?updated --->?Package?libvirt-python.x86_64?0:0.8.2-29.0.1.el5_9.1?set?to?be?updated -->?Running?transaction?check -->?Processing?Dependency:?cyrus-sasl-lib?=?2.1.22-5.el5_4.3?for?package:?cyrus-sasl -->?Processing?Dependency:?cyrus-sasl-lib?=?2.1.22-5.el5_4.3?for?package:?cyrus-sasl-devel -->?Processing?Dependency:?cyrus-sasl-lib?=?2.1.22-5.el5_4.3?for?package:?cyrus-sasl-devel -->?Processing?Dependency:?cyrus-sasl-lib?=?2.1.22-5.el5_4.3?for?package:?cyrus-sasl-plain -->?Processing?Dependency:?cyrus-sasl-lib?=?2.1.22-5.el5_4.3?for?package:?cyrus-sasl-plain --->?Package?cyrus-sasl-lib.i386?0:2.1.22-7.el5_8.1?set?to?be?updated --->?Package?cyrus-sasl-lib.x86_64?0:2.1.22-7.el5_8.1?set?to?be?updated -->?Running?transaction?check --->?Package?cyrus-sasl.x86_64?0:2.1.22-7.el5_8.1?set?to?be?updated --->?Package?cyrus-sasl-devel.i386?0:2.1.22-7.el5_8.1?set?to?be?updated --->?Package?cyrus-sasl-devel.x86_64?0:2.1.22-7.el5_8.1?set?to?be?updated --->?Package?cyrus-sasl-plain.i386?0:2.1.22-7.el5_8.1?set?to?be?updated --->?Package?cyrus-sasl-plain.x86_64?0:2.1.22-7.el5_8.1?set?to?be?updated -->?Finished?Dependency?Resolution Dependencies?Resolved =============================================================================================================================== Package???????????????????????Arch????????????????Version???????????????????????????????????????Repository???????????????Size =============================================================================================================================== Installing: kernel-xen????????????????????x86_64??????????????2.6.18-348.16.1.0.1.el5???????????????????????el5_latest???????????????23?M virt-viewer???????????????????x86_64??????????????0.0.2-3.el5???????????????????????????????????el5_latest???????????????25?k xen???????????????????????????x86_64??????????????3.0.3-142.el5_9.3?????????????????????????????el5_latest??????????????1.9?M xen-libs??????????????????????i386????????????????3.0.3-142.el5_9.3?????????????????????????????el5_latest??????????????177?k xen-libs??????????????????????x86_64??????????????3.0.3-142.el5_9.3?????????????????????????????el5_latest??????????????175?k Installing?for?dependencies: SDL???????????????????????????x86_64??????????????1.2.10-9.el5??????????????????????????????????el5_latest??????????????213?k bridge-utils??????????????????x86_64??????????????1.1-3.el5?????????????????????????????????????el5_latest???????????????30?k cyrus-sasl-md5????????????????x86_64??????????????2.1.22-7.el5_8.1??????????????????????????????el5_latest???????????????47?k e4fsprogs-libs????????????????i386????????????????1.41.12-3.el5?????????????????????????????????el5_latest??????????????108?k e4fsprogs-libs????????????????x86_64??????????????1.41.12-3.el5?????????????????????????????????el5_latest??????????????105?k ebtables??????????????????????x86_64??????????????2.0.9-5.el5???????????????????????????????????el5_latest??????????????104?k gtk-vnc???????????????????????x86_64??????????????0.3.8-3.el5???????????????????????????????????el5_latest???????????????80?k libvirt???????????????????????x86_64??????????????0.8.2-29.0.1.el5_9.1??????????????????????????el5_latest??????????????3.2?M libvirt-python????????????????x86_64??????????????0.8.2-29.0.1.el5_9.1??????????????????????????el5_latest??????????????239?k python-virtinst???????????????noarch??????????????0.400.3-13.0.1.el5????????????????????????????el5_latest??????????????384?k xz-libs???????????????????????i386????????????????4.999.9-0.3.beta.20091007git.el5??????????????el5_latest??????????????100?k Updating?for?dependencies: cyrus-sasl????????????????????x86_64??????????????2.1.22-7.el5_8.1??????????????????????????????el5_latest??????????????1.2?M cyrus-sasl-devel??????????????i386????????????????2.1.22-7.el5_8.1??????????????????????????????el5_latest??????????????1.4?M cyrus-sasl-devel??????????????x86_64??????????????2.1.22-7.el5_8.1??????????????????????????????el5_latest??????????????1.4?M cyrus-sasl-lib????????????????i386????????????????2.1.22-7.el5_8.1??????????????????????????????el5_latest??????????????126?k cyrus-sasl-lib????????????????x86_64??????????????2.1.22-7.el5_8.1??????????????????????????????el5_latest??????????????130?k cyrus-sasl-plain??????????????i386????????????????2.1.22-7.el5_8.1??????????????????????????????el5_latest???????????????27?k cyrus-sasl-plain??????????????x86_64??????????????2.1.22-7.el5_8.1??????????????????????????????el5_latest???????????????27?k Transaction?Summary =============================================================================================================================== Install??????16?Package(s) Upgrade???????7?Package(s) Total?download?size:?34?M Is?this?ok?[y/N]: Running?rpm_check_debug Running?Transaction?Test Finished?Transaction?Test Transaction?Test?Succeeded Running?Transaction Updating???????:?cyrus-sasl-lib?????????????????????????????????????????????????????????????????????????????????????????1/30 Updating???????:?cyrus-sasl?????????????????????????????????????????????????????????????????????????????????????????????2/30 Installing?????:?bridge-utils???????????????????????????????????????????????????????????????????????????????????????????3/30 Installing?????:?cyrus-sasl-md5?????????????????????????????????????????????????????????????????????????????????????????4/30 Updating???????:?cyrus-sasl-plain???????????????????????????????????????????????????????????????????????????????????????5/30 Installing?????:?e4fsprogs-libs?????????????????????????????????????????????????????????????????????????????????????????6/30 Installing?????:?xen-libs???????????????????????????????????????????????????????????????????????????????????????????????7/30 Installing?????:?gtk-vnc????????????????????????????????????????????????????????????????????????????????????????????????8/30 Installing?????:?ebtables???????????????????????????????????????????????????????????????????????????????????????????????9/30 Installing?????:?libvirt???????????????????????????????????????????????????????????????????????????????????????????????10/30 Installing?????:?libvirt-python????????????????????????????????????????????????????????????????????????????????????????11/30 Installing?????:?SDL???????????????????????????????????????????????????????????????????????????????????????????????????12/30 Updating???????:?cyrus-sasl-lib????????????????????????????????????????????????????????????????????????????????????????13/30 Installing?????:?xz-libs???????????????????????????????????????????????????????????????????????????????????????????????14/30 Updating???????:?cyrus-sasl-plain??????????????????????????????????????????????????????????????????????????????????????15/30 Installing?????:?e4fsprogs-libs????????????????????????????????????????????????????????????????????????????????????????16/30 Installing?????:?python-virtinst???????????????????????????????????????????????????????????????????????????????????????17/30 Installing?????:?kernel-xen????????????????????????????????????????????????????????????????????????????????????????????18/30 Installing?????:?xen???????????????????????????????????????????????????????????????????????????????????????????????????19/30 Installing?????:?virt-viewer???????????????????????????????????????????????????????????????????????????????????????????20/30 Installing?????:?xen-libs??????????????????????????????????????????????????????????????????????????????????????????????21/30 Updating???????:?cyrus-sasl-devel??????????????????????????????????????????????????????????????????????????????????????22/30 Updating???????:?cyrus-sasl-devel??????????????????????????????????????????????????????????????????????????????????????23/30 Cleanup????????:?cyrus-sasl-plain??????????????????????????????????????????????????????????????????????????????????????24/30 Cleanup????????:?cyrus-sasl????????????????????????????????????????????????????????????????????????????????????????????25/30 Cleanup????????:?cyrus-sasl-lib????????????????????????????????????????????????????????????????????????????????????????26/30 Cleanup????????:?cyrus-sasl-devel??????????????????????????????????????????????????????????????????????????????????????27/30 Cleanup????????:?cyrus-sasl-devel??????????????????????????????????????????????????????????????????????????????????????28/30 Cleanup????????:?cyrus-sasl-plain??????????????????????????????????????????????????????????????????????????????????????29/30 Cleanup????????:?cyrus-sasl-lib????????????????????????????????????????????????????????????????????????????????????????30/30 Installed: kernel-xen.x86_64?0:2.6.18-348.16.1.0.1.el5??????virt-viewer.x86_64?0:0.0.2-3.el5?????????xen.x86_64?0:3.0.3-142.el5_9.3 xen-libs.i386?0:3.0.3-142.el5_9.3????????????????xen-libs.x86_64?0:3.0.3-142.el5_9.3 Dependency?Installed: SDL.x86_64?0:1.2.10-9.el5????????????????????????????????????????bridge-utils.x86_64?0:1.1-3.el5 cyrus-sasl-md5.x86_64?0:2.1.22-7.el5_8.1?????????????????????????e4fsprogs-libs.i386?0:1.41.12-3.el5 e4fsprogs-libs.x86_64?0:1.41.12-3.el5????????????????????????????ebtables.x86_64?0:2.0.9-5.el5 gtk-vnc.x86_64?0:0.3.8-3.el5?????????????????????????????????????libvirt.x86_64?0:0.8.2-29.0.1.el5_9.1 libvirt-python.x86_64?0:0.8.2-29.0.1.el5_9.1?????????????????????python-virtinst.noarch?0:0.400.3-13.0.1.el5 xz-libs.i386?0:4.999.9-0.3.beta.20091007git.el5 Dependency?Updated: cyrus-sasl.x86_64?0:2.1.22-7.el5_8.1????????????????????????????cyrus-sasl-devel.i386?0:2.1.22-7.el5_8.1 cyrus-sasl-devel.x86_64?0:2.1.22-7.el5_8.1??????????????????????cyrus-sasl-lib.i386?0:2.1.22-7.el5_8.1 cyrus-sasl-lib.x86_64?0:2.1.22-7.el5_8.1????????????????????????cyrus-sasl-plain.i386?0:2.1.22-7.el5_8.1 cyrus-sasl-plain.x86_64?0:2.1.22-7.el5_8.1 Complete! |
?
4.?修改啟動列表,使用運行xen的內核啟動系統?
#?vi?/boot/grub/grub.conf
說明:?yum安裝后,grub菜單是自動安裝好了。?
?
5.?reboot?自動進入xen組件的內核。?
#?reboot?
?
6.?查看xen啟動情況?
默認xen服務開機自啟動???
[root@node1?~]#?chkconfig?--list?|grep?xend????
xend????????????0:off???1:off???2:on????3:on????4:on????5:on????6:off????
xendomains??????0:off???1:off???2:off???3:on????4:on????5:on????6:off?
查看xen內核???
[root@node1?~]#?uname?-a????
Linux?node1?2.6.18-348.16.1.0.1.el5xen?#1?SMP?Tue?Aug?20?13:57:31?PDT?2013?x86_64?x86_64?x86_64?GNU/Linux?
查看xen情況???
[root@node1?~]#?xm?list????
Name??????????????????????????????????????ID?Mem(MiB)?VCPUs?State???Time(s)????
Domain-0???????????????????????????????????0?????1744?????1?r-----?????32.8?
?
?
到此xen虛擬化環境配置完畢,下面就開始安裝虛擬機了。
本文出自 “koumm的linux技術博客” 博客,請務必保留此出處http://koumm.blog.51cto.com/703525/1284516
總結
以上是生活随笔為你收集整理的xen虚拟化实战系列(一)之xen虚拟化环境安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 套接字编程——基于UDP协议
- 下一篇: Android与Swift iOS开发: