Index: /drbl-virt/sbin/drbl_virt.sh
===================================================================
--- /drbl-virt/sbin/drbl_virt.sh	(revision 156)
+++ /drbl-virt/sbin/drbl_virt.sh	(revision 156)
@@ -0,0 +1,25 @@
+#!/bin/bash
+# Program:
+#   DRBL virt module
+# Author: 
+#   Jazz, Rock {jazz, rock}@nchc.org.tw
+# Version:
+#    1.0
+# History:                                                                                          
+#   2010/07/20  Rock    First release (1.0) 
+
+# [Source]
+source env_check.sh
+
+# [Main]
+cpu_check
+check_systemInfo
+VMM_select
+
+# [Install VMM/Hypervisior]
+if [ $VMM_select == 1 ]; then
+    source xen_intall.sh
+else
+    source kvm_intall.sh
+fi
+
Index: /drbl-virt/sbin/env_check.sh
===================================================================
--- /drbl-virt/sbin/env_check.sh	(revision 156)
+++ /drbl-virt/sbin/env_check.sh	(revision 156)
@@ -0,0 +1,55 @@
+#!/bin/bash
+# Program:
+#   DRBL virt module
+# Author: 
+#   Jazz, Rock {jazz, rock}@nchc.org.tw
+# Version:
+#    1.0
+# History:
+#   2010/07/20  Rock    First release (1.0)
+
+# [Variable Declation]
+cpu_flag="no"
+Linux_bit=""
+Linux_Distribution=""
+Linux_Version=""
+VMM_select=""
+
+# [Check Root]
+function check_root(){      
+  if [ $USER != "root" ]; then
+    echo "Please change user to root !!!"
+    exit                   
+  fi
+} 
+
+# [Check CPU support]
+function cpu_check(){
+egrep '(vmx|svm)' --color=always /proc/cpuinfo > /dev/null
+if [ $? == 0 ]; then
+    cpu_flag="yes"
+fi
+}
+
+# [Check System Version]
+function check_systemInfo(){
+Linux_bit=$(uname -m)
+Linux_Distribution=$(lsb_release -i | awk '{print $3}')
+Linux_Version=$(lsb_release -r | awk '{print $2}')
+}
+
+
+function VMM_select(){
+if [ $cpu_flag == "yes" ]; then
+    while [ "$VMM_select" != "1" -a "$VMM_select" != "2"  ]
+    do
+       read -p "Which VMM/Hypervisior will use in DRBL (1)Xen (2)KVM: " VMM_select
+    done
+else
+    echo "Xen will be the only Hypervisior in your DRBL"
+    VMM_select=2
+fi  
+}   
+
+
+
Index: /drbl-virt/sbin/kvm_intall.sh
===================================================================
--- /drbl-virt/sbin/kvm_intall.sh	(revision 156)
+++ /drbl-virt/sbin/kvm_intall.sh	(revision 156)
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Program:
+#   DRBL virt module (kvm_install.sh)
+# Author: 
+#   Jazz, Rock {jazz, rock}@nchc.org.tw
+# Version:
+#    1.0
+# History:                                                                                          
+#   2010/07/20  Rock    First release (1.0) 
+
+# [ Intall ] 
+case $Linux_Distribution in
+    # for Ubuntu
+    "Ubuntu")
+        aptitude update ; aptitude install kvm
+    ;;
+    # for Debian
+    "Debian")
+        aptitude update ; aptitude install kvm
+    ;;
+    # for Fedora
+    "Fedora")        
+        echo "Only support Debain & Debian"
+    ;;
+    *)
+        echo "Only support Debain & Debian"
+    ;;
+esac
Index: /drbl-virt/sbin/xen_intall.sh
===================================================================
--- /drbl-virt/sbin/xen_intall.sh	(revision 156)
+++ /drbl-virt/sbin/xen_intall.sh	(revision 156)
@@ -0,0 +1,41 @@
+#!/bin/bash
+# Program:
+#   DRBL virt module
+# Author: 
+#   Jazz, Rock {jazz, rock}@nchc.org.tw
+# Version:
+#    1.0
+# History:                                                                                          
+#   2010/07/20  Rock    First release (1.0) 
+
+# [ Intall ] 
+case $Linux_Distribution in
+    # for Ubuntu
+    "Ubuntu")
+        echo "Only support Debain"
+    ;;
+    # for Debian
+    "Debian")
+        # check bit
+        echo $Linux_bit | grep 64                                                                                                                          
+        if [ $? == 0 ]; then
+            Linux_bit="amd64"
+        else
+            Linux_bit="686"
+        fi  
+        
+        # check version
+        echo $Linux_Version | grep "^5"
+        if [ $? == 0 ]; then
+            aptitude update
+            aptitude install xen-linux-system-2.6.26-2-xen-${Linux_bit} xen-tools
+        fi
+    ;;
+    # for Fedora
+    "Fedora")        
+        echo "Only support Debain"
+    ;;
+    *)
+        echo "Only support Debain"
+    ;;
+esac
