跳到主要內容

XEN on CentOS

最近因為我申請的開發機器下來了,就玩玩之前沒測完的XEN,先說一下我機器的配備應該算是很高檔.

CPU---QC * 2 ---共8核
RAM---12GB
硬碟----3顆1T

有三台(呵呵很酷喔而且還只拿來開發)

回到正題,上次XEN少了Window,這次給他補足了順便紀錄一下遇到的一些問題
1.要在XEN安裝Window系列,Intel CPU要具備VT,AMD要具備AMD-V如何確認呢
cat /proc/cpuinfo | grep flags
看看有沒有VMX的項目,有就可以安裝.
p.s這裡還要注意一點若是CPU有註明有VT或是AMD-V可是下該指令沒有的話就請確認核心有沒有開啟(SuSe 11.1就沒有)

2.強烈建議使用CentOS5.2進行,OpenSuSe我分別裝了10.1 - 10.3及11統統不行在XEN裡裝Window,CentOS5.2很順。

3.網路設定問題
a.希望外部可以直接連到虛擬機器(domainU),安裝CentOS時先不要在實體網路卡上設定任何IP,但實體線路可以插上去,然後再安裝CentOS,起動虛擬機器管理員(是圖形介面),連接並建立一新的DomainU,依據所需進行設定,到了Host network設定時請選擇第二項shard physical network,就一路安裝下去囉..安裝好DomainU的作業環境,然後再設定網路卡的IP(DomainU的)應該就可以囉.
※這裡可以把DomainO(CentOS)的網路卡當做一個HUB來看就不難理解他不用設IP了,可是不要問我原因我也不知道

b.希望走DHCP方式同a步驟,到Host network請選擇第一項virtual network後面步驟就一樣了,可是要外部連到這台機器時,則要在DominO(CentOS)上利用iptables進行囉

4.可以使用virt-clone進行複製好用喔

留言

這個網誌中的熱門文章

IReport中的條碼類別BcImage

最近有一個繳費單的專案,需要列印條碼,因為IReport本身就有提供列印條碼的功能,所以就用IReport設計繳費單然後再用Jasperreport API寫批次程式去產生PDF,資料量大概3000多筆(頁)拆成幾個檔案,可是就發生了一個問題居然發生部分繳費單的條碼有問題,看了一下程式研判是Race Condition因為程式採用的是多執行緒,若是依序個別產生是不會有問題,但是同時執行的時候就會亂掉,而且都錯在條碼,令我覺得很奇怪,後來我查了一下發現it.businesslogic.ireport.barcode.BcImage 類別我猜是這裡的問題,就先加上synchronized重新編譯在去執行,嘿嘿條碼就對了,做了一下壓測也正常,程式碼如下,不過這樣事不是對了可能還要仔細查查看。 public class BcImage { private static net.sourceforge.barbecue.Barcode bc = null; public synchronized static net.sourceforge.barbecue.Barcode getBarcode() { return bc; } public synchronized static BufferedImage getBarcodeImage(int type, Object aText, boolean showText, boolean checkSum) { return getBarcodeImage(type, aText, showText, checkSum,"",0,0); } public synchronized static BufferedImage getBarcodeImage(int type, Object aText, boolean showText, boolean checkSum, String applicationIdentifier, int width, int height) { // 2of7, 3of9, Bookland, Codabar, Code128,...

IBM MQ 5.3 如何匯出Qmgr

使用IBM MQ探險家也沒有匯出的功能,這樣其實在一些備份或是Cluster時,滿困擾的,不過你也知道IBM就是喜歡用SupportPacs等等的方式,ms03這個SupportPacs就是可以匯出Qmgr中所有的資訊也可以選擇想要的,以下是他的連結 http://www-1.ibm.com/support/docview.wss?rs=171&q1=mA1J&uid=swg24000673&loc=en_US&cs=utf-8&lang=en 若是Window的版本可以直接使用,若是unix或是linux系列的就請重新編譯了﹝makeFile﹞我有試過在RHEL編譯使用是可以的。 ※請注意一定要在有安裝MQ的Server方可執行喔 使用方式如下: saveqmgr -m xxx -v 53 -o xxx.cfg -m 指定需要匯出的Qmgr名稱 -v 版本 -o 匯出後檔案名稱 以下是相關參數的列表 Usage is: ./saveqmgr. [options], where [options] are one or more of the following optional switches -h | -? : gives help (this) -v version : determines which version of MQSC to generate and can be '2','5','51','52','53' or '6' The default is to generate mqsc at the version of the connected queue manager -m lqmgr : is the name of the local qmgr to connect (MQCONN) -r rqmgr : is the name of the remote qmgr (XMITQ name) -f [file] : allows the output file to be named, if -f is not specified, the outpu...

Ext-Js Grid + DWR

Ext-Js中有Grid的sample,想說試試看加上DWR的效果如何?感覺上還不錯,以下是我參考Ext-Js附的grid array sample,加上DWR調整一下的code,我想可能還要加上資料在Loading的效果會比較好。 array-grid.js Ext.onReady(function(){ Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); // example of custom renderer function function change(val){ if(val > 0){ return ' ' + val + ' '; }else if(val ' + val + ' '; } return val; } // example of custom renderer function function pctChange(val){ if(val > 0){ return ' ' + val + '% '; }else if(val ' + val + '% '; } return val; } //要設定Dwr傳回的Map的對應格式 var recordType = Ext.data.Record.create( [ {name:"reportid",mapping:"reportid",type:"string"}, {name:"reportName",mapping:"reportName",type:"string"} ] ); var myReader = new Ext.data.JsonReader( { totalProperty:"totalSize", root:"data" },recordType ); // create the data store //這裡是很重要的,這裡還可以加上listener等等的屬性喔 var store = new Ext.da...