Index: drbl-virt/sbin/check_drbl_client.sh
===================================================================
--- drbl-virt/sbin/check_drbl_client.sh	(revision 199)
+++ drbl-virt/sbin/check_drbl_client.sh	(revision 200)
@@ -40,4 +40,5 @@
         client_Ram=$(cat $drbl_client_top_file | grep ^Mem | sed 's/total.*$//' | sed 's/^Mem://' | awk '{print $1}')
         client_unused_Ram=$(cat $drbl_client_top_file | grep ^Mem | sed 's/^.*used,//' | sed 's/free.*$//' | awk '{print $1}')
+    
     fi
 
Index: drbl-virt/sbin/check_drbl_vm.sh
===================================================================
--- drbl-virt/sbin/check_drbl_vm.sh	(revision 199)
+++ drbl-virt/sbin/check_drbl_vm.sh	(revision 200)
@@ -19,4 +19,5 @@
 
 # [Main] 
+check_root
 for client_IP in $client_IPs
 do
@@ -42,6 +43,6 @@
         declare -i i=1
 
-        vm_numbers=$(echo vm_hostnames | wc -w)
-        
+        vm_numbers=$(echo $vm_hostnames | wc -w)
+
         printf "[Running VM: $vm_numbers]\n" >> $drbl_vm_file
         printf "[Running VM: $vm_numbers]\n"
@@ -53,10 +54,14 @@
             vm_CPU_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $4}')"
             vm_Ram_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $6}')"
-            printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}M $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file
-            printf "VM$i: $vm_hostname VCPU=$vm_CPU_core Mem=${vm_Ram}M VCPU_loading=$vm_CPU_loading%% Mem_usage=$vm_Ram_loading%%\n"
+            printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}K $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file
+            printf "VM$i: $vm_hostname VCPU=$vm_CPU_core Mem=${vm_Ram}K VCPU_loading=$vm_CPU_loading%% Mem_usage=$vm_Ram_loading%%\n"
             i=i+1
         done
     
+    else
+        echo "[Error] $client_hostname $client_IP is offline !" && exit 2
+
     fi
+
 done
 
Index: drbl-virt/sbin/drbl_PXE_PV-VM_create.sh
===================================================================
--- drbl-virt/sbin/drbl_PXE_PV-VM_create.sh	(revision 199)
+++ drbl-virt/sbin/drbl_PXE_PV-VM_create.sh	(revision 200)
@@ -107,4 +107,20 @@
 # check null value
 [ -z $vm_name ] && echo "[Error] no VM name" && Usage && exit 2
+# check vm_name exist
+vm_IP_files=$(ls $Work_Home/etc/IP_VM_eth*)
+vm_exist_jude="no"
+for vm_IP_file in $vm_IP_files
+do
+    if [ -n "$(grep "$vm_name" $vm_IP_file)" ]; then
+        vm_exist_jude="yes"
+    fi
+    
+done
+
+if [ $vm_exist_jude == "no" ]; then
+    echo "[Error] This VM name isn't DRBL PXE VM"
+    exit 2
+fi
+
 
 # = 2. Get VM MAC address =
@@ -149,5 +165,5 @@
 echo "kernel      = '/home/domains/vmlinuz-pxe'" > $vm_cfg
 echo "ramdisk     = '/home/domains/initrd-pxe.img'" >> $vm_cfg
-echo "memory      = '512'" >> $vm_cfg
+echo "memory      = '$vm_ram'" >> $vm_cfg
 echo "name        = '$vm_name'" >> $vm_cfg
 echo "vcpus        = '$vm_cpu'" >> $vm_cfg
Index: drbl-virt/sbin/drbl_xen_repush.sh
===================================================================
--- drbl-virt/sbin/drbl_xen_repush.sh	(revision 199)
+++ drbl-virt/sbin/drbl_xen_repush.sh	(revision 200)
@@ -35,4 +35,7 @@
     cp /etc/drbl/IP_HOST_TABLE /opt/drbl-virt/etc/IP_HOST_TABLE
 fi  
+
+# back mac address file
+cp /etc/drbl/macadr*eth*[0-9].txt /opt/drbl-virt/etc/
 
 for eth in $eths
