wiki:GTD_Cloud_One_Schedule_Test

Version 5 (modified by rock, 16 years ago) (diff)

--

【ONE Schedule 測試】

1.機器資訊

  • 硬體
    • one -> Ram 4G,sda6(mdt),sda7(ost1)
    • one01 -> Ram 2G,sdb1(ost2),sdb2(ost3)
  • 軟體 -> Lenny(5.0),Xen(3.3.1),Lustre(1.6.6),OpenNEbula(1.2)

2.正常 Case

  • 2.1 CPU Case:
    1. VM 需要 Free CPU,讓 one01 跑 make kernel (one 則不執行動作),測試是否會 deploy 在 one 上
      ### 再 one01上執行 ###
      $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.tar.bz2
      $ tar jxvf linux-2.6.29.tar.bz2
      $ cd linux-2.6.29 || make 
      
      ### 再 one (ONE Server) 上執行 ###
      $ vim vm01.one 
      NAME   = vm01                                                                                           
      CPU    = 1                                                                                              
      MEMORY = 156                                                                                            
      OS = [ kernel     = /boot/vmlinuz-2.6.22.9,                                                             
             initrd     = /boot/initrd.img-2.6.22.9,                                                          
             root       = sda2,                                                                               
            kernel_cmd = "ro xencons=tty console=tty1" ]                                                      
      DISK = [ source   = /home/domains/vm01/disk.img,                                                        
               clone    = no,                                                                                 
               target   = sda2,                                                                               
               readonly = no]                                                                                 
      DISK = [  type     = swap,                                                                              
                size     = 512,                                                                               
                target   = "sda1",                                                                            
                readonly = "no" ]                                                                             
      NIC = [NETWORK="Public",IP="X.X.X.X",MAC="00:03:8c:6e:8a:a0"]                                   
      REQUIREMENTS= "FREECPU > 200"                                                                           
      RANK = FREECPU
      
      $ onevm -v create vm01.one
      ID: 25
      
      ### 前面 PIR 是優先權,HID 則是 Host 的 ID (這邊的 HID 0 是指 one) ###
      $ tail /home/one/var/sched.log 
      Fri May  1 12:03:09 2009 [SCHED][I]: Dispatching virtual machine 24 to HID: 0                           
      Fri May  1 12:03:39 2009 [HOST][D]: Discovered Hosts (enabled): 0 1                                     
      Fri May  1 12:03:39 2009 [VM][D]: Pending virtual machines : 25                                         
      Fri May  1 12:03:39 2009 [SCHED][I]: Select hosts                                                       
              PRI     HID     HSID                                                                            
              -------------------                                                                             
      Virtual Machine: 25                                                                                     
              1       0    
      
  • 2.2 Memory Case:
    1. VM 需要 1G Memory,讓 one 的記憶體只剩 512M (one01 則有2G),測試是否 deploy one01
  • 2.3 CPU 和 Memory Case:
    1. VM 需要 CPU 使用率 < 200 和 記憶體需大於 512MB 的 Host
      $ vim vm03.one
      略                                                          
      REQUIREMENTS= "USEDCPU < 200 & FREEMEMORY > 512"                                                        
      RANK= FREECPU         
      
      $ onevm create -v vm03.one
      ID: 20 
      
      $ watch onevm list
        ID     NAME STAT CPU     MEM        HOSTNAME        TIME
        20     vm03 runn   0  159744           one01 00 00:05:10
      
      ### HID 1 的分數為 1 而 HID 0 分數為 0.982456,所以 deploy vm03 到 HID 1 (one01) ###
      $ tail /home/one/vat/sched.log
      Fri May  1 11:37:09 2009 [HOST][D]: Discovered Hosts (enabled): 0 1                               
      Fri May  1 11:37:09 2009 [VM][D]: Pending virtual machines : 20                                   
      Fri May  1 11:37:09 2009 [SCHED][I]: Select hosts                                                 
               PRI     HID     HSID                                                                      
               -------------------                                                                       
       Virtual Machine: 20                                                                               
               1       1                                                                                 
               0.982456        0 
      
      

3.錯誤 Case

  • Case 1 -> 測試 Xen 本身對於超過需求的 VM (Xen 本身的錯誤檢查機制),會如何顯示 Create VM 的錯誤訊息
    • VM 要 8G 的 ram (one 只有4G)
      ### 若有設定 dom0_min_mem ,當 VM 要求超過 dom0 的記憶體最小值時會出現以下提示訊息,無法開啟 VM ###
      $ sudo xm create -c vm02.cfg 
      Using config file "./vm02.cfg".
      Error: I need 8487936 KiB, but dom0_min_mem is 524288 and shrinking to 524288 KiB would leave only 5586844 KiB free.
      
    • VM 要 6 CPU (one01 只有4 CPU)
  • Case 2 -> VM 需要 Free CPU,但 one 和 one01 都執行 makec kernel,會如何 deploy
  • Case 3 -> VM 需要 1G Memory, 但 one 和 one01 都只剩 512M,會如何 deploy

4.紀錄

  • 若 Requirement 都不符合時,或一直處於 pend 狀態,直到符合的 Host 出現