2011年10月31日 星期一

[XEN] Install Xen on openSUSE 11.04

最近學校的電腦拿到了一台 i7-860,雖然是去年的 i7,但是怎麼說他也是 i7 呀!!!所以就拿來裝 Xen 啦!其實起因是想拿來做實驗,想玩看看 Xen,試試看 Hardware Virtualization,沒選用 KVM 的原因單純是我手上的書講的是 Xen (看的是這本書:
Xen 虛擬化技術),為了不要忘記過程,決定馬上來寫 Blog ...



所以就開始來裝 Xen 吧!

在 openSUSE 11.04 上安裝 Xen 是相當容易的事情,網路上有一大堆的文件在說明這件事,
所以我一開始也覺得我應該一小時就可以順利弄好吧,不過實際上卻沒有這麼簡單,但是在 openSUSE 上,已經算是很簡單的囉。:-)


Step 1:
打開你的 Yast,在 openSUSE 上最美妙的就是 Yast 這個工具啦,找到 Virtualization 這段,裡面會有 Install Hypervisor and Tools 這個選項。


當你安裝完就會跟我一樣有兩個多出來的選項:Create Virtual Machines 和 Virtual Machine Manager,目前就先忽略它們吧。

Step 2:
勇敢的點下「Install Hypervisor and Tools」,會跳出一個畫面:



點下去就會自動安裝了!

Step 3:
經過一陣子的等待之後,就可以重新開機了! 當你興高采烈把 Virtual Machine Manager 打開,想說準備來安裝 Guest OS 時,你可能跟我一樣會看到這個訊息:

Unable to open a connection to the Xen hypervisor/daemon.

Verify that:
- A Xen host kernel was booted
- The Xen service has been started

找了一下,看到有人為我們解答了:http://unix.stackexchange.com/questions/18479/xen-on-opensuse-11-4,就是執行 chkconfig xencommons off ; reboot

Step 4:
又重開機之後,你可能還會遇到這個問題:

ERROR unable to connect to ‘localhost:8000′: Connection refused

遇到這個問題的話,可以去看看這個 link:http://www.vpsee.com/2010/04/install-xen-on-centos-from-source/,去修改 /etc/xen/xend-config.sxp,把 (xend-port 8000) 這行的 comment 打開。
在新增 VM 的時候,如果遇到:

Error: Device 0 (vif) could not be connected. Could not find bridge, and none was specified.


請參考這個 Link:http://www.virtuatopia.com/index.php/Ubuntu_DomainU_Fails_to_boot_with_%22Error:_Device_0_%28vif%29_could_not_be_connected._Could_not_find_bridge,_and_none_was_specified%22.

我是註解掉所有 network-script 和 vif-script,只留下:(vif-script vif-nat),後來就可以正常跑  Xen 啦!也順利的安裝 Windows XP!

沒有留言:

張貼留言