星期五, 1月 29, 2016

20160129-VMware-VSOS-Day 5

20160129-VMware-VSOS-Day 5

Module 11 Virtual Machine and Cluster Optimization

Lesson 1: Virtual Machine Optimization

Storage Considerations
Notes:
  • VM開機時, 顯示被 Lock 無法開機, 刪除 *.LCK 可以解決

Lesson 2: vSphere Cluster Optimization

-- Class break --

Notes:

Lab 12: Diagnosing vSphere HA Cluster Resource Issue
  • 參考 Lab 文件
  • Task 1: Shutdown all running virtual machine
  • Task 2: (Student B) Disconnect the ESXi Host from the vCenter Server Instance
  • Task 3: (Student A) Connect a Second ESXi Host to the vCenter Server Instance
  • Task 4: Review Change in the vSphere Web Client
  • Task 5: Move your ESXi Host to the First Problem Cluster
  • Task 6: Investigate the First Cluster Issue
  • Task 7: Move Your ESXi Host to the Second Problem Cluster
  • Task 8: Investigate the Second Cluster Issue and Start your first Virtual Machine
  • Task 9: (Student A) Start a second virtual machine in the second cluster
  • Task 10: (Student B) STart a second virtual machine in the second cluster
  • Task 11: Determine the cause of the second cluster issue
  • Task 12: Move Your ESXi Host Back to the training data center
  • Task 13: (Student B) Clean up for next lab

-- 中午休息 --

Module 12 Host and Management Scalability


Lesson 1: Host Profiles

備份 Host Profile
  • 透過 vCLI 執行 vicfg-cfgbackup --server IP或FQDN -s  檔案名稱 來備份
    • 還原使用 vicfg-cfgbackup --server IP或FQDN -l  檔案名稱

Host Profile用途
  • 備份 / 還原主機設定
  • 套用到多台主機
  • 用 Host profile 檢查主機現有的設定

Lab 13: Host Profiles
  • 參考 Lab 文件
  • Task 1: Create and Export a Host Profile
    • 沒有加入主機的 Host Profile 就是包含網路,storage與驗證來源的設定
  • Task 2: Import a Host Profile
  • Task 3: Attach an ESXi Host to the Imported Host Profile
  • Task 4: Run an initial compliance check
  • Task 5: Introduce a configuration drift
  • Task 6: Run a compliance check and remediate the configuration drift
  • Task 7: Introduce a second configuration drift
  • Task 8: Run a compatibility check and try to remediate the host
  • Task 9: Detach the host profile and exit maintenance mode

Lesson 3: vSphere PowerCLI


Lab 14: Using vSphere PowerCLI
  • 參考 Lab 文件
  • Task 1: Start vSphere PowerCLI
  • Task 2: Define Variables
  • Task 3: Connect to and Disconnect from an ESXi Host
  • Task 4: Connect to the vCenter Server System and View ESXi Host-Related Information
  • Task 5: List Virtual Networking Properties
  • Task 6: Retrieve Virtual Machine Properties
  • Task 7: Retrieve Virtual Machine Performance Statics

-- Class break --


Lesson 4: vCenter Converter and vSphere ESXi Image Builder

ESXi Images
  • An ESXi image is a software bundle that consists 4 main components
    • Core Hypervisor
    • CIM Providers
    • Plug-In Components
    • Drivers

Lesson 5: vSphere Auto Deploy



-- Class End --

星期四, 1月 28, 2016

20160128-VMware-VSOS-Day 4

20160128-VMware-VSOS-Day 4

Lab 10: Monitoring CPU Performance
  • 參考 Lab 文件,  做 Task 7 ~ Task 12
  • Task 7: Run a Single-Threaded Program on a Virtual Machine with Two vCPUs
  • Task 8: Record Statistics for Case 2: ONe Thread and Two vCPUs
  • Task 9: Run a Dual-Threaded Program in a Dual-vCPU Virtual Machine
  • Task 10: Record Statistics for Case 3: Two Threads and Two vCPUs
  • Task 11: Analyze the Test Results
  • Task 12: Clean Up for the Next Lab

Lesson 3: Troubleshooting CPU Performance Problems

Host CPU Saturation
  • Ready Time
    • Web client 測量 > 2000 ms 代表 CPU 不夠
    • resxtop 測量 > 10% 代表 CPU 不夠

判斷 CPU 方式
  • 是否大於 2000ms 或是 10%, 超過列出清單
  • USE time 如果與 Ready Time 差不多則視為正常

Kernel 是單CPU
  • 有可能自行更換 kernel
  • msconfig 限制

-- Class break --

Module 8 Storage Optimization

Lesson 1: Storage Virtualization Concepts

Storage Protocol Performance
Fibre Channel
  • 16 Gbps
  • 8 Gpbs
  • 4 Gpbs

FCoE
  • 10 Gbps

Software and hardware iSCSI and NFS support for jumbo frames
  • Using Gigabit, 10 Gb, and 40 Gb Ethernet NICs
  • Using 10 Gb iSCSI hardware initiators

Storage Queues

Lesson 2: Monitoring Storage Activity

About Disk Capacity Metrics
  • 觀察 Latency 與 aborted disk command

Disk Throughput Example
IOPS = READs / s + WRITEs / s

GAVG = DAVG + KAVG
  • GAVG
    • VM的 Disk latency
  • DAVG
    • Device 的 latency
  • KAVG
    • VMKernel 的 latency

Disk Latency
  • resxtop 上面的 QUED 為 queue 數量

Lab 9 Monitoring Storage Performance
  • 參考 Lab 文件
  • Task 1: Prepare the Test Virtual Machine
  • Task 2: Prepare the IP Storage Network for Testing
  • Task 3: Create a Real-Time Disk I/O Performance Chart
  • Task 4: Prepare to Run Tests
  • Task 5: Measure Continuous Sequential Write Activity to a Virtual Disk on a Remote Datastore
  • Task 6: Measure Continuous Random Write Activity to a Virtual Disk on a Remote Datastore
  • Task 7: Measure Continuous Random Read Activity to a Virtual Disk on a Remote Datastore
  • Task 8: Measure Continuous Random Read Activity to a Virtual Disk on a Local Datastore
  • Task 9: Analyze Test Results
  • Task 10: Clean Up for the Next Lab


-- 中午休息 --

Lesson 3: Troubleshooting Storage Performance Problems

Overloaded Storage and Command Aborts
  • If commands aborted (ABRTs/s) > 0  for any LUN, then storage is overloaded on that LUN

Slow Storage
You can also monitor device latency (DAVG) in resxtop
  • If value >10, a problem might exit.
  • If value > 20, a problem exists. ( Maybe due to disable Cache )

Module 10 Memory Optimization

Lesson 1: Memory Virtualization Concepts

Virtual Machine Memory-Reclamation Techniques
  • Transparent page sharing
    • Disabled by default with ESXi 6.0, ESXi 5.5 update 2 and later set disable
    • VM 共享記憶體
      • Guest OS 版本相同


如果記憶體不充足
  • TPS
  • Ballooning
  • Memory Compression
  • Host Swap

Memory Overhead
  • 根據記憶體大小以及 vCPU 數量決定 VMM 大小

Lesson 2: Monitoring Memory Activity

Monitoring Virtual Machine Memory Usage
Notes:
  • Memory 相關名詞
    • vSphere Client
      • Consumed 消耗記憶體
      • Active 正在使用記憶體
      • Consumed - Active = 閒置記憶體
    • vSphere Web Client
      • VM overhead consumed - VMM
      • Utilization / Active - 配置/正在使用中記憶體

Using resxtop to Monitor Memory Usage ( 好用資訊 )
  • 透過 resxtop 的 state 來觀察記憶體狀況以及會啟用哪些機制
    • 按 m 觀察記憶體
    • High / Soft / Hard / Low state 會採取不同機制
    • PMEM - 實體記憶體
    • VMKMEM - VMkernel 記憶體
    • PSHARE - TPS 記憶體
    • SWAP - Host Swap 記憶體
    • ZIP - Memory Compression 記憶體壓縮
    • MEMCTL - Ballooning 記憶體

-- Class break --

Lab 11: Monitoring Memory Performance
  • 參考 Lab 文件
  • Task 1: Generate Database Activity in the Test Virtual Machine
  • Task 2: Check for Overcommittment of Virtual Machine Memory
  • Task 3: Configure an Advanced Performance Chart
  • Task 4: Configure resxtop to Report Virtual Machine Memory Statistics
  • Task 5: Observe Baseline Memory Statistics
  • Task 6: Import the RAM-HOG vApp
  • Task 7: Start a Memory Test on Each RAM-HOG Workload
  • Task 8: Record Memory Statistics

Lesson 3: Troubleshooting Memory Performance Problems

VMware 啟用 TPS 參考  



-- Class End --