Skip to content
Part 3: Advanced Configurations in vCenter Server 6.7

Part 3: Advanced Configurations in vCenter Server 6.7

Phần 3: Cấu hình Nâng cao vCenter Server 6.7

Updated: 15/12/2025 • Version 5.1

I. Enhanced vMotion Compatibility (EVC) Mode

I. Chế độ Tương thích vMotion Nâng cao (EVC)

1. What is EVC Mode?

1. EVC Mode là gì?

Enhanced vMotion Compatibility (EVC) is a feature in VMware vSphere Cluster that ensures vMotion compatibility between ESXi hosts with different CPU generations.

Enhanced vMotion Compatibility (EVC) là một tính năng trong VMware vSphere Cluster giúp đảm bảo khả năng tương thích vMotion giữa các máy chủ ESXi có các thế hệ CPU khác nhau.

In a virtualized environment, performing Live Migration (vMotion) of a virtual machine from Host A to Host B requires the CPU Instruction Set of both hosts to be identical. If Host A uses a newer generation CPU than Host B, Host A will have instruction sets that Host B does not understand. In this case, vMotion will fail to prevent the guest operating system from crashing.

Trong môi trường ảo hóa, việc thực hiện Live Migration (vMotion) máy ảo từ Host A sang Host B yêu cầu Tập lệnh CPU của cả hai host phải giống nhau. Nếu Host A sử dụng CPU thế hệ mới hơn Host B, Host A sẽ có các tập lệnh mà Host B không hiểu. Trong trường hợp này, vMotion sẽ thất bại để ngăn hệ điều hành máy khách (guest OS) bị crash.

EVC works by “masking” the advanced CPU features of newer chip generations, forcing them to operate at the feature level of the oldest chip family in the Cluster. As a result, all hosts in the Cluster will share a common baseline instruction set, allowing vMotion to proceed smoothly.

EVC hoạt động bằng cách “che giấu” (masking) các tính năng CPU nâng cao của các thế hệ chip mới hơn, buộc chúng hoạt động ở mức tính năng của dòng chip cũ nhất trong Cluster. Kết quả là tất cả các host trong Cluster sẽ chia sẻ một tập lệnh cơ sở chung, cho phép vMotion diễn ra suôn sẻ.

Current Lab CPU Configuration Table:

Bảng Cấu hình CPU Lab Hiện tại:

Host Server Model CPU Model Architecture CPU Count
ESXi-01 Dell PowerEdge R630 Xeon E5-2680 v3 @ 2.50GHz Haswell (Newer) 24 CPUs
ESXi-02 IBM System x3650 M4 Xeon E5-2690 v2 @ 3.00GHz Ivy Bridge (Older) 10 CPUs

2. Features and Use Cases

2. Tính năng và Trường hợp sử dụng

Enabling EVC provides the following essential benefits for virtual infrastructure:

Việc bật EVC mang lại những lợi ích thiết yếu sau cho hạ tầng ảo hóa:

  • Multi-generation CPU Compatibility: Allows combining multiple generations of physical servers (e.g., servers purchased in 2013 and 2015) in the same Cluster.
  • Flexible vMotion: Ensures VMs can migrate freely between any hosts in the Cluster without CPU compatibility errors.
  • Gradual Upgrades: Allows replacing old servers with new ones gradually without system-wide downtime.
  • High Availability (HA): Ensures that if one host fails, VMs can restart on any other surviving host.
  • Tương thích đa thế hệ CPU: Cho phép kết hợp nhiều thế hệ máy chủ vật lý (ví dụ: server mua năm 2013 và 2015) trong cùng một Cluster.
  • vMotion linh hoạt: Đảm bảo VM có thể di chuyển tự do giữa bất kỳ host nào trong Cluster mà không gặp lỗi tương thích CPU.
  • Nâng cấp dần dần: Cho phép thay thế server cũ bằng server mới một cách từ từ mà không gây downtime toàn hệ thống.
  • Cân bằng tải: Là điều kiện tiên quyết để DRS hoạt động hiệu quả.
  • High Availability (HA): Đảm bảo nếu một host bị lỗi, các VM có thể khởi động lại trên bất kỳ host nào còn sống.
⚠️ IMPORTANT NOTES ABOUT EVC:
  • EVC must be enabled BEFORE any virtual machines are running in the Cluster.
  • All hosts in the Cluster must be from the same CPU vendor (Intel or AMD).
  • The EVC Baseline must be set to the lowest (oldest) CPU generation present in the Cluster.
  • Virtualization features (VT-x/AMD-V) and Execute Disable Bit (XD/NX) must be enabled in the physical server BIOS.
⚠️ LƯU Ý QUAN TRỌNG VỀ EVC:
  • EVC phải được bật TRƯỚC KHI có bất kỳ máy ảo nào đang chạy trong Cluster.
  • Tất cả các host trong Cluster phải cùng nhà sản xuất CPU (Intel hoặc AMD).
  • EVC Baseline phải được thiết lập ở mức thế hệ CPU thấp nhất (cũ nhất) có trong Cluster.
  • Các tính năng ảo hóa (VT-x/AMD-V) và Execute Disable Bit (XD/NX) phải được bật trong BIOS của máy chủ vật lý.

3. EVC Mode Configuration Process

3. Quy trình Cấu hình EVC Mode

Prerequisites: vCenter Server installed and ESXi Hosts added to Inventory but not yet in a Cluster.
Điều kiện tiên quyết: vCenter Server đã được cài đặt và các ESXi Host đã được thêm vào Inventory nhưng chưa vào Cluster.

3.1. Migrate all VMs from the low CPU Host to the high CPU Host

3.1. Di chuyển tất cả VM từ Host CPU thấp sang Host CPU cao

Before configuring, we need to empty the host with the lower CPU generation (ESXi-02 – Ivy Bridge) to put it into Maintenance Mode. vMotion all running VMs from ESXi-02 to ESXi-01.

Trước khi cấu hình, chúng ta cần làm trống host có thế hệ CPU thấp hơn (ESXi-02 – Ivy Bridge) để đưa nó vào chế độ bảo trì (Maintenance Mode). Thực hiện vMotion tất cả VM đang chạy từ ESXi-02 sang ESXi-01.

Moving VMs
Figure 1: Moving VMs to ESXi-01
Hình 1: Di chuyển VM sang ESXi-01

3.2. Switch ESXi-02 to “Maintenance Mode”

3.2. Chuyển ESXi-02 sang “Maintenance Mode”

Right-click Host ESXi-02 > Maintenance Mode > Enter Maintenance Mode.

Chuột phải vào Host ESXi-02 > Maintenance Mode > Enter Maintenance Mode.

Maintenance Mode Menu
Confirm Maintenance
Maintenance Status

3.3. Create New Cluster

3.3. Tạo Cluster mới

Right-click Datacenter > New Cluster. Name the Cluster (e.g., EVC-Cluster). Do not enable DRS and HA yet.

Chuột phải vào Datacenter > New Cluster. Đặt tên Cluster (ví dụ: EVC-Cluster). Chưa bật DRS và HA vội.

Create New Cluster
Name the Cluster

3.4. Enable EVC mode matching the lower CPU

3.4. Bật chế độ EVC tương ứng với CPU thấp hơn

Select the created Cluster > Configure Tab > VMware EVC > Edit. Select Intel “Ivy Bridge” Generation.

Chọn Cluster vừa tạo > Tab Configure > VMware EVC > Edit. Chọn Intel “Ivy Bridge” Generation.

Why choose Ivy Bridge?
Because the Lab has 2 CPU types: Haswell (New) and Ivy Bridge (Old). Following the “Lowest Common Denominator” principle, we must select the lowest level, Ivy Bridge, so both hosts are compatible.
Tại sao chọn Ivy Bridge?
Vì Lab có 2 loại CPU: Haswell (Mới) và Ivy Bridge (Cũ). Theo nguyên tắc “Mẫu số chung thấp nhất”, ta phải chọn mức thấp nhất là Ivy Bridge để cả hai host đều tương thích.
EVC Configuration
Select Ivy Bridge Mode

3.5. Exit “Maintenance Mode” for ESXi-02

3.5. Thoát “Maintenance Mode” cho ESXi-02

Exit Maintenance Mode

3.6. Add ESXi-01 to Cluster

3.6. Thêm ESXi-01 vào Cluster

Drag and drop (Move) Host ESXi-01 (containing VMs) into the Cluster. Since this Host has a Haswell CPU (higher than Ivy Bridge), EVC will automatically “mask” the advanced features for compatibility.

Kéo và thả (Move) Host ESXi-01 (đang chứa các VM) vào trong Cluster. Vì host này có CPU Haswell (cao hơn Ivy Bridge), EVC sẽ tự động “mask” các tính năng cao cấp để tương thích.

Move ESXi-01 into Cluster

3.7. Add ESXi-02 to Cluster

3.7. Thêm ESXi-02 vào Cluster

Move ESXi-02
Join Cluster Complete
Cluster Result

3.8. Verification

3.8. Kiểm tra lại (Verification)

  • Go to Cluster > Monitor > vMotion. Ensure both hosts show compatible status.
  • Try a live vMotion (Live Migration) of a VM from ESXi-01 to ESXi-02 to confirm no CPU errors.
  • Vào Cluster > Monitor > vMotion. Đảm bảo cả hai host đều hiển thị trạng thái tương thích (compatible).
  • Thử vMotion (Live Migration) một VM từ ESXi-01 sang ESXi-02 để xác nhận không có lỗi CPU.

4. EVC Modes Reference Table for Intel CPUs

4. Bảng Tham khảo các Chế độ EVC cho Intel CPU

EVC Mode Microarchitecture CPU Series Example Year Released
MeromCoreXeon 5100/5300/30002006
PenrynCore (45nm)Xeon 5400/33002007
NehalemNehalemXeon 5500/3500 (Core i7 1st Gen)2008
WestmereWestmereXeon 5600/36002010
Sandy BridgeSandy BridgeXeon E5-2600 (Core i 2nd Gen)2011
Ivy Bridge Ivy Bridge Xeon E5-2600 v2 (Core i 3rd Gen) 2013
Haswell Haswell Xeon E5-2600 v3 (Core i 4th Gen) 2014
BroadwellBroadwellXeon E5-2600 v4 (Core i 5th Gen)2016
SkylakeSkylakeXeon Scalable (Gold/Platinum)2017
Cascade LakeCascade LakeXeon Scalable Gen 22019
Chế độ EVC Vi kiến trúc Dòng CPU Ví dụ Năm Phát hành
MeromCoreXeon 5100/5300/30002006
PenrynCore (45nm)Xeon 5400/33002007
NehalemNehalemXeon 5500/3500 (Core i7 1st Gen)2008
WestmereWestmereXeon 5600/36002010
Sandy BridgeSandy BridgeXeon E5-2600 (Core i 2nd Gen)2011
Ivy Bridge Ivy Bridge Xeon E5-2600 v2 (Core i 3rd Gen) 2013
Haswell Haswell Xeon E5-2600 v3 (Core i 4th Gen) 2014
BroadwellBroadwellXeon E5-2600 v4 (Core i 5th Gen)2016
SkylakeSkylakeXeon Scalable (Gold/Platinum)2017
Cascade LakeCascade LakeXeon Scalable Gen 22019

II. vSphere High Availability (HA) Configuration

II. Cấu hình vSphere High Availability (HA)

System Status Check
Figure I: Checking System Status

1. Enabling vSphere HA

1. Bật tính năng vSphere HA

To begin configuration, click Edit to access the “Edit Cluster Setting” interface and Enable vSphere HA.

Để bắt đầu cấu hình, nhấp vào Edit để truy cập giao diện “Edit Cluster Setting” và chọn Enable vSphere HA.

2. Failures and Responses

2. Các lỗi và Phản hồi (Failures and Responses)

Failures and Responses Settings
Figure 2: Failures and Responses Settings

2.1. Host Failure Response

2.1. Phản hồi khi Host gặp lỗi

Host Failure Response determines what HA will do when an ESXi host FAILS completely (e.g., power loss, kernel crash, motherboard failure, or unresponsive heartbeats).

Host Failure Response xác định HA sẽ làm gì khi một máy chủ ESXi gặp lỗi hoàn toàn (ví dụ: mất điện, lỗi kernel, lỗi mainboard, hoặc không phản hồi heartbeat).

Host failure is detected via 2 mechanisms:

Lỗi host được phát hiện qua 2 cơ chế:

  • Network heartbeat (sent via management network every 1s).
  • Datastore heartbeat (written to shared datastore if network heartbeat is lost).
  • Heartbeat mạng (gửi qua mạng quản lý mỗi 1 giây).
  • Heartbeat Datastore (ghi vào shared datastore nếu mất heartbeat mạng).
2.1.1. Failure Response Options
2.1.1. Các tùy chọn phản hồi lỗi
Failure Response Options
Figure 2.1.a: Failure Response Options
OptionMeaningNote
DisabledDo nothing – DO NOT restart VMs⚠️ Use only when you want to disable HA completely.
Restart VMs (recommended)Power on VMs on another host✅ Default, Recommended.
Restart VMs – ConservativeOnly restart if resources are guaranteedUse when Cluster resources are limited to avoid overcommitment.
Tùy chọnÝ nghĩaGhi chú
DisabledKhông làm gì – KHÔNG restart VM⚠️ Chỉ dùng khi muốn tắt hoàn toàn HA.
Restart VMs (khuyên dùng)Bật VM trên host khác✅ Mặc định, Khuyên dùng.
Restart VMs – ConservativeChỉ restart nếu đảm bảo tài nguyênDùng khi tài nguyên Cluster hạn chế để tránh quá tải (overcommitment).
2.1.2. Default VM Restart Priority
2.1.2. Độ ưu tiên khởi động lại VM mặc định

VMware HA decides the order in which to start VMs based on priority.

VMware HA quyết định thứ tự khởi động các VM dựa trên độ ưu tiên.

VM Restart Priority
Figure 2.1.b: VM Restart Priority
PriorityMeaningExample
HighestRestart firstAD/DNS, Database, Storage VM
HighRestart immediately after HighestvCenter, API backend
MediumDefault (Most VMs)Application servers
LowLower priorityMonitoring, non-critical
LowestRestart lastTest VMs, backups, templates
Độ ưu tiênÝ nghĩaVí dụ
HighestRestart đầu tiênAD/DNS, Database, Storage VM
HighRestart ngay sau HighestvCenter, API backend
MediumMặc định (Đa số VM)Application servers
LowƯu tiên thấp hơnGiám sát (Monitoring), không quan trọng
LowestRestart cuối cùngTest VMs, backups, templates

When a host fails → VMware reboots in order: Highest → High → Medium → Low → Lowest.

Khi một host bị lỗi → VMware sẽ khởi động lại theo thứ tự: Highest → High → Medium → Low → Lowest.

2.1.3. VM Dependency Restart Condition
2.1.3. Điều kiện ràng buộc khởi động lại VM

This condition determines when VMware HA is allowed to proceed to restart VMs of the next priority level.

Điều kiện này xác định khi nào VMware HA được phép chuyển sang khởi động lại các VM ở mức ưu tiên tiếp theo.

VM Dependency
Figure 2.1.c: VM Dependency Restart Condition
OptionCheck for what?Wait LevelSpeedUse Case
Resources allocatedOnly resources assignedLowestFastestLab, test, non-dependent workloads
Powered onVM is Powered OnLowFastSmall production, no complex DB-App relationships
Guest HeartbeatsOS booted, Tools OKMediumMediumStandard Production
App HeartbeatsApp reports OKHighSlowMission-critical apps
Tùy chọnKiểm tra gì?Mức chờTốc độKhi dùng
Resources allocatedChỉ cấp phát tài nguyênThấp nhấtNhanh nhấtLab, test, workload không phụ thuộc
Powered onVM đã bật nguồnThấpNhanhProduction nhỏ, không có quan hệ DB-App phức tạp
Guest HeartbeatsOS đã boot, Tools OKTrung bìnhTrung bìnhProduction tiêu chuẩn
App HeartbeatsApp báo cáo OKCaoChậmỨng dụng cực kỳ quan trọng (Mission-critical)
Use Case 1: Resources Allocated

HA only needs to complete “RESOURCE ALLOCATION” for high priority VMs (CPU reserved, RAM allocated, VM assigned to host).

Use Case: Lab test with 50 VMs needing restart after host failure. Requirement to restart all as fast as possible.

Config: Priority = Medium, Condition = Resources Allocated, Timeout = 60s.

Result: HA allocates resources almost simultaneously, total time ~2-3 minutes.

Use Case 2: Powered On

HA waits for VM to reach “Powered On” state, indifferent to OS boot completion.

Use Case: Enterprise with 20 remote user VMs (Windows, Linux), no dependencies.

Config: Condition = Powered On. Priority: DC (High), App (Medium), Web (Low). Timeout = 120s.

Result: Restart by priority: High → Medium → Low.

Use Case 3: Guest Heartbeats Detected (Best Practice)

HA waits for VMware Tools to send heartbeats (OS booted, drivers OK, network stable).

Use Case: Multi-tier Production (Database → App → Web). DB must be ready before App starts.

Config: Condition = Guest Heartbeats detected. Priority: DB (Highest), App (High), Web (Low). Timeout = 300s.

Result: 1. Restart DB (Highest) → 2. Restart App (High) → 3. Restart Web (Low).

Use Case 4: App Heartbeats (Application Monitoring SDK)

HA only restarts the next group when the application reports OK (requires app agent).

Use Case: Mission-critical systems (Core Banking, Telco) requiring fully ready apps (Redis, Oracle, API engine…).

Config: Condition = App Heartbeats detected. Priority: DB (Highest), Middleware (High), Web (Low). Timeout = 600s.

Trường hợp 1: Resources Allocated (Đã phân bổ tài nguyên)

HA chỉ cần hoàn thành việc “PHÂN BỔ TÀI NGUYÊN” cho các VM ưu tiên cao (CPU reserved, RAM allocated, VM đã gán cho host).

Sử dụng: Môi trường Lab với 50 VM cần khởi động lại sau khi host lỗi. Yêu cầu khởi động tất cả nhanh nhất có thể.

Cấu hình: Priority = Medium, Condition = Resources Allocated, Timeout = 60s.

Kết quả: HA phân bổ tài nguyên gần như đồng thời, tổng thời gian ~2-3 phút.

Trường hợp 2: Powered On (Đã bật nguồn)

HA chờ VM đạt trạng thái “Powered On”, không quan tâm OS đã boot xong chưa.

Sử dụng: Doanh nghiệp có 20 VM cho user từ xa (Windows, Linux), không phụ thuộc lẫn nhau.

Cấu hình: Condition = Powered On. Priority: DC (High), App (Medium), Web (Low). Timeout = 120s.

Kết quả: Khởi động theo thứ tự ưu tiên: High → Medium → Low.

Trường hợp 3: Guest Heartbeats Detected (Khuyên dùng cho Production)

HA chờ VMware Tools gửi heartbeat (OS đã boot, driver OK, mạng ổn định).

Sử dụng: Hệ thống Production nhiều tầng (Database → App → Web). DB phải sẵn sàng trước khi App chạy.

Cấu hình: Condition = Guest Heartbeats detected. Priority: DB (Highest), App (High), Web (Low). Timeout = 300s.

Kết quả: 1. Restart DB (Highest) → 2. Restart App (High) → 3. Restart Web (Low).

Trường hợp 4: App Heartbeats (Application Monitoring SDK)

HA chỉ restart nhóm tiếp theo khi ứng dụng báo cáo OK (cần cài đặt app agent).

Sử dụng: Hệ thống quan trọng (Core Banking, Telco) yêu cầu ứng dụng phải sẵn sàng hoàn toàn (Redis, Oracle, API engine…).

Cấu hình: Condition = App Heartbeats detected. Priority: DB (Highest), Middleware (High), Web (Low). Timeout = 600s.

Version Note:
  • vSphere 6.7: Supports all features above.
  • vSphere 7.0: App Heartbeats is ⚠️ Deprecated. Option “None” added.
  • vSphere 8.0: App Heartbeats is ❌ Removed.
Ghi chú Phiên bản:
  • vSphere 6.7: Hỗ trợ tất cả các tính năng trên.
  • vSphere 7.0: App Heartbeats bị ⚠️ Deprecated (lỗi thời). Thêm tùy chọn “None”.
  • vSphere 8.0: App Heartbeats bị ❌ Removed (loại bỏ hoàn toàn).

3. Response for Host Isolation

3. Phản hồi khi Host bị cô lập

Host Isolation occurs when an ESXi host loses network connectivity to the cluster but the VMs are still running, hardware is OK, and power is ON.

Host Isolation xảy ra khi ESXi host mất kết nối mạng với cluster nhưng các VM vẫn đang chạy, phần cứng vẫn ổn, và nguồn vẫn bật.

Host Isolation
Figure 3: Response for Host Isolation
OptionBehaviorData IntegrityUse Case
DisabledVMs continue running on isolated host, HA does not restart.⚠️ High Risk (split-brain if shared storage)LAB/Test only, no shared storage.
Shut down and restart VMsHost sends guest shutdown command (graceful) → HA restarts on another host.✅ Safest (graceful)Production running DB, Critical Apps.
Power off and restart VMsHost hard power-offs VMs → HA powers them on another host.⚠️ Medium Risk (crash-consistent)Stateless apps, Web servers, priority on fast RTO.
Tùy chọnHành viAn toàn dữ liệuSử dụng
DisabledVM tiếp tục chạy trên host bị cô lập, HA KHÔNG restart.⚠️ Rủi ro cao (split-brain nếu có shared storage)Chỉ dùng cho LAB/Test, không có shared storage.
Shut down and restart VMsHost gửi lệnh shutdown máy khách (mềm) → HA restart trên host khác.✅ An toàn nhất (graceful)Production chạy DB, Ứng dụng quan trọng.
Power off and restart VMsHost tắt nguồn cứng VM → HA bật lại trên host khác.⚠️ Rủi ro trung bình (crash-consistent)Ứng dụng stateless, Web server, ưu tiên RTO nhanh.

4. Datastore with PDL (Permanent Device Loss)

4. Datastore gặp lỗi PDL (Mất thiết bị vĩnh viễn)

PDL is a condition where the ESXi host PERMANENTLY LOSES CONNECTION to the datastore (storage hardware failure, LUN unmapped…). HA is responsible for restarting VMs on another host that still has access to the datastore.

PDL là tình trạng ESXi host MẤT KẾT NỐI VĨNH VIỄN tới datastore (lỗi phần cứng storage, LUN bị unmap…). HA chịu trách nhiệm restart VM trên host khác vẫn còn kết nối tới datastore.

PDL
Figure 4: Datastore with PDL
OptionBehaviorUse Case
DisabledDo nothing. VM will crash when I/O fails.Never use in production.
Issue eventsSend warning, DO NOT auto-restart VM.Monitoring-only environments.
Power off and restart VMsPower-off VM → Restart on another host.Recommended. Production requiring fast RTO.
Shutdown and restart VMsGraceful shutdown → Restart on another host.DB requiring high data safety.
Tùy chọnHành viSử dụng
DisabledKhông làm gì. VM sẽ crash khi I/O lỗi.Không bao giờ dùng cho production.
Issue eventsGửi cảnh báo, KHÔNG tự động restart VM.Môi trường chỉ giám sát (Monitoring).
Power off and restart VMsTắt nguồn VM → Restart trên host khác.Khuyên dùng. Production cần RTO nhanh.
Shutdown and restart VMsShutdown mềm → Restart trên host khác.DB cần an toàn dữ liệu cao.

5. Datastore with APD (All Paths Down)

5. Datastore gặp lỗi APD (Mất tất cả đường dẫn)

ESXi host loses connection to datastore but DOES NOT know if it is temporary or permanent (unlike PDL which confirms permanent failure).

ESXi host mất kết nối tới datastore nhưng KHÔNG biết là tạm thời hay vĩnh viễn (khác với PDL là đã xác nhận lỗi vĩnh viễn).

APD
Figure 5: Datastore with APD

APD Operation Mechanism:

  1. APD Detected (0-140s): ESXi loses connection, VM hangs (I/O freeze).
  2. APD Timeout (140s): Determines datastore is not recovering. HA prepares to act.
  3. APD Recovery Window (180s after Timeout): Waits further to see if storage recovers.
  4. APD Declared Permanent (>180s): Marked as completely lost. HA proceeds to restart according to policy.

Cơ chế hoạt động của APD:

  1. APD Detected (0-140s): ESXi mất kết nối, VM bị treo (I/O freeze).
  2. APD Timeout (140s): Xác định datastore không hồi phục. HA chuẩn bị hành động.
  3. APD Recovery Window (180s sau Timeout): Chờ thêm xem storage có hồi phục không.
  4. APD Declared Permanent (>180s): Đánh dấu là mất hoàn toàn. HA tiến hành restart theo chính sách.

6. VM Monitoring

6. Giám sát VM (VM Monitoring)

VM Monitoring is a vSphere HA mechanism designed to detect and resolve issues such as:

  • VM OS hangs/freezes.
  • Unresponsive OS.
  • VMware Tools failing to send heartbeats.
  • Application freezes within the VM.

Action: HA automatically restarts the VMs.

How it works: HA monitors heartbeats from VMware Tools, basic Guest I/O activity, and Guest OS responsiveness status.

VM Monitoring là cơ chế của vSphere HA dùng để phát hiện và xử lý các trường hợp:

  • VM bị treo OS.
  • OS không phản hồi.
  • VMware Tools không gửi heartbeat.
  • Ứng dụng trong VM bị treo.

Hành động: HA sẽ tự động restart VMs.

Cơ chế hoạt động: HA theo dõi Heartbeat từ VMware Tools, hoạt động I/O cơ bản của guest, và trạng thái guest OS responsiveness.

6.1. Enable Heartbeat Monitoring

6.1. Bật giám sát Heartbeat

Enable Heartbeat Monitoring
Figure 6.1: Enable VM Monitoring
OptionMeaningUse Case
DisabledDisables VM MonitoringLab, test environments
VM Monitoring OnlyRestarts VM when OS hangsProduction (Recommended)
VM and Application MonitoringRestarts VM when App hangsvSphere 6.7 (Deprecated in 7.0, Removed in 8.0)
Tùy chọnÝ nghĩaKhi dùng
DisabledTắt VM MonitoringLab, test
VM Monitoring OnlyRestart VM khi OS treoProduction (Khuyên dùng)
VM and Application MonitoringRestart VM khi app treovSphere 6.7 (deprecated từ 7.0, removed v8)

6.2. VM Monitoring Sensitivity

6.2. Độ nhạy của VM Monitoring

VM Monitoring Sensitivity
Figure 6.2: VM Monitoring Sensitivity Settings

VM Monitoring Sensitivity determines how “sensitive” HA is when it detects missing Guest Heartbeats (via VMware Tools).

VM Monitoring Sensitivity quyết định HA sẽ “nhạy” tới mức nào khi phát hiện VM không gửi Guest Heartbeat (VMware Tools).

SensitivityHA ReactionWait TimeFalse Restart RiskUse Case
LowWaits longer before restartingLongestLowestHeavy VMs, Large DBs, High Load
Medium (Default)Balanced wait & restartMediumLowProduction (Recommended)
HighRestarts very quickly upon lost heartbeatShortestHighVDI, Stateless Web Servers
Độ nhạyHA phản ứng thế nào?Thời gian chờNguy cơ restart nhầmKhi dùng
LowChờ rất lâu trước khi restartDài nhấtThấp nhấtVM nặng, DB lớn, dễ bị load cao
Medium (Default)Cân bằng giữa chờ & restartTrung bìnhThấpProduction – khuyên dùng
HighRestart rất nhanh khi mất heartbeatNgắn nhấtCaoVDI, web stateless

6.3. Pros and Cons of Sensitivity Modes

6.3. Ưu nhược điểm của các chế độ

SensitivityProsConsBest Fit
Low• Avoids false restarts under high load
• Data safety for DBs
• Fewest false positives
• Slow detection of OS hangs
• Extended downtime if VM is actually down
Databases, ERP, File Servers, Backup/AV VMs
Medium (Default)• Balance between stability & speed
• Few false positives
• Fits most workloads
• Not as fast as High for VDI/Stateless workloadsStandard Production, App Servers, DC, vCenter
High• Very fast detection & restart
• Lowest RTO
• Quick user reconnect
• High risk of false restart during CPU/RAM spikes
• Not suitable for DBs
VDI, Stateless Web, Session-based services
Độ nhạyƯu điểmNhược điểmPhù hợp nhất
Low• Tránh restart nhầm khi VM load cao
• An toàn dữ liệu cho DB, VM nặng
• Ít false positive nhất
• Thời gian phát hiện OS treo lâu
• Downtime kéo dài nếu VM thật sự chết
Database, ERP, File Server, VM chạy backup/AV
Medium (Default)• Cân bằng giữa ổn định & tốc độ
• Ít false positive
• Phù hợp đa số workload production
• Không nhanh bằng High trong VDI/web statelessProduction thông thường, App server, DC, vCenter
High• Phát hiện & restart rất nhanh
• RTO thấp nhất
• User reconnect nhanh
• Dễ restart nhầm khi CPU/RAM spike
• Không phù hợp DB hoặc VM nặng
VDI, Web stateless, session-based services

7. Admission Control

7. Admission Control (Kiểm soát Nhập môn)

Admission Control is a vSphere HA mechanism used to:

  • Reserve resources (CPU/RAM) in the cluster.
  • Ensure that when a host fails, HA always has enough resources to restart VMs.

Admission Control là cơ chế của vSphere HA dùng để:

  • Giữ trước tài nguyên (CPU/RAM) trong cluster.
  • Đảm bảo rằng khi host bị fail, HA luôn có đủ tài nguyên để restart VM.

7.1. Operation Mechanism

7.1. Cơ chế hoạt động

Admission Control DOES NOT restart VMs, it only:

  • Decides whether to allow powering on a VM.
  • Checks if the cluster has enough resources to tolerate host failures.

Admission Control KHÔNG restart VM, nó chỉ:

  • Quyết định có cho power on VM hay không.
  • Kiểm tra cluster có đủ resource để chịu được host failure hay không.
Admission Control Configuration
Figure 7.1: Admission Control Configuration
Hình 7.1: Cấu hình Admission Control
OptionMechanismHA GuaranteeResource UsageUse CaseProsCons
DisabledNo reservation, allows overcommit❌ No⭐⭐⭐⭐⭐ (Highest)Lab, Test, DemoFlexible, max utilizationHA might fail to restart VMs
Host failures cluster toleratesReserves for N host failures⭐⭐⭐⭐⭐⭐Small, uniform clustersSimpleInaccurate if hosts differ
Percentage of cluster resources reservedReserves % CPU & RAM⭐⭐⭐⭐⭐⭐Production (Recommended)Accurate, FlexibleReduces usable capacity
Dedicated failover hostsSpecific standby hosts⭐⭐⭐⭐⭐Mission-criticalGuaranteed failoverWasted resources
Tùy chọnCơ chế hoạt độngĐảm bảo HASử dụng tài nguyênKhi nên dùngƯu điểmNhược điểm
DisabledKhông giữ trước, cho phép overcommit❌ Không⭐⭐⭐⭐⭐ (Cao nhất)Lab, Test, DemoLinh hoạt, tận dụng tối đaHA có thể thiếu tài nguyên
Host failures cluster toleratesGiữ tài nguyên chịu được N host lỗi⭐⭐⭐⭐⭐⭐Cluster nhỏ, host giống nhauDễ hiểu, nhanhKhông chính xác nếu host khác nhau
Percentage of cluster resources reservedGiữ trước % CPU & RAM⭐⭐⭐⭐⭐⭐Production (Khuyên dùng)Chính xác, linh hoạtGiảm dung lượng khả dụng
Dedicated failover hostsChỉ định host riêng cho HA⭐⭐⭐⭐⭐Mission-criticalFailover chắc chắnLãng phí tài nguyên

7.2. Calculating Admission Control %

7.2. Cách tính % Admission Control

Admission Control is calculated on the total cluster resources. CPU and RAM are calculated independently.

Example:

Admission Control tính trên tổng resource của cluster. CPU và RAM được tính độc lập.

Ví dụ:

Percentage Calculation
Figure 7.2: Cluster Resource Percentage Calculation
Hình 7.2: Tính toán phần trăm tài nguyên Cluster
HostRAM
ESXi-01256 GB
ESXi-02128 GB
ESXi-03128 GB
HostRAM
ESXi-01256 GB
ESXi-02128 GB
ESXi-03128 GB

Total RAM = 512 GB. Largest Host = 256 GB.

To tolerate the failure of the largest host, configure: 256 / 512 = 50%.

Tổng RAM = 512 GB. Host lớn nhất = 256 GB.

Để chịu được host lớn nhất fail thì cần cấu hình: 256 / 512 = 50% (RAM & CPU).

Performance Degradation
Figure 7.3: Performance Degradation Toleration
Hình 7.3: Chấp nhận suy giảm hiệu năng
Percentage Recommendations

1 host fail: 25–33%

2 hosts fail: 50–66%

Uneven Cluster: Based on largest host

Production: Always >= 25%

Khuyến nghị cấu hình %

1 host fail: 25–33%

2 host fail: 50–66%

Cluster không đồng đều: Theo host lớn nhất

Production: Luôn >= 25%

7.3. Admission Control vs. DRS

7.3. So sánh Admission Control & DRS

Monitoring Status
Figure 7.4: Monitoring Admission Control Status
Hình 7.4: Giám sát trạng thái Admission Control
CriteriaAdmission ControlDRS
PurposeEnsure HA restart capacityLoad balancing
Active TimeBefore failureWhile VMs running
HA Relation✅ Yes❌ Indirect
Performance Relation
Tiêu chíAdmission ControlDRS
Mục đíchĐảm bảo HA restart được VMCân bằng tải (Load balancing)
Thời điểm hoạt độngTrước sự cốKhi VM đang chạy
Liên quan HA✅ Có❌ Không trực tiếp
Liên quan performance

8. Heartbeat Datastores

8. Heartbeat Datastores

Heartbeat Datastores is a secondary mechanism of vSphere HA used to:

  • Determine the true state of an ESXi host.
  • Distinguish between a dead host and a network isolated host.

Heartbeat Datastores là cơ chế phụ của vSphere HA dùng để:

  • Xác định trạng thái thật của host ESXi.
  • Phân biệt host chết thật hay chỉ mất network (host isolation).

8.1. Operation Mechanism

8.1. Cơ chế hoạt động

HA uses 2 mechanisms to determine host state:

HA dùng 2 cơ chế để xác định host state:

Heartbeat Datastore Selection
Figure 8.1: Heartbeat Datastore Selection
Hình 8.1: Chọn Datastore làm Heartbeat
PolicyBehaviorSafetyRiskUse CaseRecommendation
Automatically selectvCenter selects datastores⭐⭐⭐⭐LowStandard Prod✅ Best practice
Use specific listOnly admin selected⭐⭐HighSpecific storage⚠️ Use with caution
Use specific list & complementPrioritize list, auto add⭐⭐⭐⭐Low-MedComplex Prod✅ Good control
PolicyHành viAn toànRủi roKhi dùngKhuyến nghị
Automatically selectvCenter tự chọn datastore⭐⭐⭐⭐ThấpProd thông thường✅ Best practice
Use specific listChỉ dùng list chỉ định⭐⭐CaoStorage đặc thù⚠️ Cần hiểu rõ
Use specific list & complementƯu tiên list, tự bổ sung⭐⭐⭐⭐Thấp-TBProd lớn, phức tạp✅ Khuyên dùng

8.2. Requirements

8.2. Yêu cầu bắt buộc

ConditionRequiredNote
Shared datastoreMust be mounted on ≥2 hosts
Local datastoreNot used for HA
Minimum count≥2For redundancy
Stable accessAvoid APD/PDL
Điều kiệnBắt buộcGhi chú
Shared datastorePhải có ≥2 host mount
Datastore localKhông dùng cho HA
Số lượng tối thiểu≥2HA dùng song song
Truy cập ổn địnhTránh APD/PDL

8.3. Role in HA

8.3. Vai trò trong HA

ScenarioWith Heartbeat DSWithout Heartbeat DS
Lost network heartbeatDistinguishes isolationMistaken for host failure
Host isolationCorrect handlingSplit-brain risk
APDAccurate detectionFalse restart
PDLTriggers HAUndefined
Tình huốngCó Datastore HBKhông có Datastore HB
Mất network heartbeatPhân biệt isolationDễ nhầm host failure
Host isolationXử lý đúngNguy cơ split-brain
APDPhát hiện chính xácFalse restart
PDLTrigger HAKhông xác định rõ

9. Advanced Options

9. Tùy chọn Nâng cao (Advanced Options)

Advanced Options allow overriding default HA behavior using key-value pairs.

If nothing is added → HA runs by default (VMware best practice).

Advanced Options cho phép override hành vi mặc định của HA bằng key–value.

Nếu không thêm gì → HA chạy theo default (best practice của VMware).

Advanced Options Configuration
Figure 9.1: HA Advanced Options
Hình 9.1: Cấu hình HA Advanced Options

9.1. VM Restart & Retry Control

9.1. Điều khiển VM Restart & Retry

KeyMeaningExampleUse Case
das.maxResetsMax restart attempts per VM3Avoid restart loops
das.maxResetsWindowReset counter window (sec)3600Combined with maxResets
das.vmFailoverDelayDelay before restart (sec)60Wait for stable storage/network
KeyÝ nghĩaVí dụKhi dùng
das.maxResetsSố lần tối đa restart 1 VM3Tránh restart loop
das.maxResetsWindowReset counter sau X giây3600Kết hợp maxResets
das.vmFailoverDelayDelay trước khi restart (giây)60Đợi storage/network ổn định

9.2. Host Isolation Control

9.2. Điều khiển Host Isolation

KeyMeaningExample
das.isolationShutdownTimeoutGraceful shutdown wait time300
das.useDefaultIsolationAddressUse default gateway as isolation addresstrue
das.isolationaddressXCustom IP for isolation check10.10.93.1
KeyÝ nghĩaVí dụ
das.isolationShutdownTimeoutThời gian chờ shutdown graceful300
das.useDefaultIsolationAddressDùng gateway mặc định làm isolation addrtrue
das.isolationaddressXIP custom để ping isolation10.10.93.1

9.3. APD / Storage Handling

9.3. Xử lý APD / Storage

KeyMeaningValue
das.maskCleanShutdownEnabledPrevent restart of clean shutdown VMstrue
das.vmComponentProtectingVM Component Protectiontrue
das.ignoreInsufficientHbDatastoreIgnore insufficient HB datastores warningtrue
KeyÝ nghĩaGiá trị
das.maskCleanShutdownEnabledTránh restart VM đã shutdown sạchtrue
das.vmComponentProtectingVM Component Protectiontrue
das.ignoreInsufficientHbDatastoreBỏ qua cảnh báo thiếu HB datastoretrue

9.4. Heartbeat / HA Timing

9.4. Thời gian Heartbeat / HA

KeyMeaningValue
das.heartbeatDsPerHostHeartbeat datastores per host2
das.failuredetectiontimeHost failure detection time (ms)15000
KeyÝ nghĩaGiá trị
das.heartbeatDsPerHostSố datastore heartbeat mỗi host2
das.failuredetectiontimeThời gian phát hiện host fail (ms)15000

Leave a Reply

Your email address will not be published. Required fields are marked *

QR Code

Chủ web
xin được nuôi 🍜

Support Me Touch here ^_^
Contact