PowerStore:無法複製 vVol 型 VM 的靜止讀寫快照 (可由使用者更正)

Summary: PowerStore 不支援複製 Read-Write vVol 快照。這會導致 vVol 型 VM 的靜止快照複製發生各種問題。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

image.png
 
  • 如果 VM 已新增至 SRM 保護群組,其狀態交換器會顯示「not configured」,並出現錯誤「virtual machine '」檔案「」,「diskDescriptor」類型未複寫」:
image.png

image.png

 
  • SRM 中規劃的遷移失敗,並顯示錯誤「Cannot prepare protection group for failover.它包含無法復原的虛擬機器。此操作可能會導致資料遺失。「diskDescriptor」類型的虛擬機器「」檔案「」未複寫」
image.png
 
  • 災難復原部分完成,並在步驟「準備受保護的月臺 VM 以進行遷移」時發生錯誤:「Cannot prepare protection group for failover.它包含無法復原的虛擬機器。此操作可能會導致資料遺失。「diskDescriptor」類型的虛擬機器「」檔案「」未複寫」
image.png
 
  • 虛擬機器的快照清單在容錯移轉後為空白,VM 在容錯移轉前有快照
    • 容錯移轉前的 VM 快照清單:
image.png
  • 容錯移轉後的 VM 快照清單: 
image.png

Cause

以上所有徵兆可能是由於 VM 磁片存在讀寫快照所致。PowerStore 不支援複製讀寫快照。這會導致複寫的目標月臺上的 VM 快照樹狀結構不完整。因此,無法在容錯移轉作業後還原快照樹狀結構,在使用 RW 快照為 VM 執行容錯移轉時,會導致所有快照遺失。SRM 中顯示的錯誤會警告在發生容錯移轉時,快照將會遺失。

注意:此問題是由 SRM 所造成。如果使用其他類型的 vVol 複寫協調程式,快照將會遺失。這表示,如果透過另一個工具執行 vVol 型 VM 的容錯移轉,快照仍會遺失。

以上錯誤並不一定代表問題是由於 RW 快照存在。如果某些虛擬機器磁片未新增至複寫群組,或是新增但尚未複製到目的地一側,也會顯示類似的錯誤。



若要檢查錯誤是否是因為複寫 vVol 的 RW 快照所導致,您可以利用 PowerStore REST。

您可以使用下列 URL 執行 GET 要求來列出 RW 快照:HTTPs:///virtual_volume?select=id、name、parent_id&type=eq。快照&creator_type=eq。User&is_readonly=eq.false,其中 為 PowerStore 叢集 IP 範例輸出:
[
  {
    "id": "13ecfcef-8676-4605-ac83-478703346824",
    "name": "vss_demo_vm.vmdk",
    "parent_id": "8f9d26b9-007e-4d51-8255-3dad7fc243d1"
  }
]

取得 RW 快照清單後,您可以查看其上層 vVols 的replication_group_id屬性,以確認這些快照是否為複寫 vVol 的孩童。如果replication_group_id不是 null,則會複製 vVol。您可以使用下列 REST 要求:HTTPs:///virtual_volume?select=id、name、replication_group_id&id=eq.其中應從上一個結果更換為parent_id。

以下為 bash 腳本的範例,可列印所有已複製的 vVol 的名稱,這些 vVol 都有 RW 快照。
#!/bin/bash
powerstore_rest_ip=10.249.51.38 # define IP of the PowerStore
credentials=admin:Password123! # define powerstore credentials
set -e
## helper function to execute a REST request
function rest_request() {
    url=$1
    if [[ -z $url ]]; then
      echo No url provided >&2
      exit 1
    fi
    curl -f -s --insecure -u $credentials -H 'Content-Type: application/json' "https://$powerstore_rest_ip/api/rest/$url"
}
 
# Step 1: collect all the RW snapshots
snap_list='[]'
offset=0
# loop is used here because PowerStore REST has a limit on number of entities returned in a single response
# if the number of snapshots is more than a limit then not all the snapshots are returned and we need to request others by using offset parameter
while : ; do
    tmp=$(rest_request "virtual_volume?select=id,name,parent_id,creation_timestamp,naa_name&type=eq.Snapshot&creator_type=eq.User&is_readonly=eq.falseℴ=creation_timestamp&offset=$offset")
    len=$(jq length <<< "$tmp")
    if [[ "$len" -eq "0" ]]; then break; fi
    offset=$((offset+len))
    snap_list=$(echo -e "$snap_list\n$tmp" | jq -s 'add')
done
# Step 2: Filter out vVols which are not replicated
for i in $(jq -r '.[].parent_id' <<< "$snap_list" | sort | uniq); do
  replicated_parent=$(rest_request "virtual_volume?select=id,name,replication_group_id,virtual_machine_uuid&id=eq.$i&replication_group_id=not.is.null")
  if [[ $(jq length <<< "$replicated_parent") != 0 ]]; then
    vvol_name=$(jq '.[0].name' <<< "$replicated_parent")
    vvol_id=$(jq -r '.[0].id' <<< "$replicated_parent")
    vm_uuid=$(jq -r '.[0].virtual_machine_uuid' <<< "$replicated_parent")
    vvol_rw_snap_count=$(jq "[ .[] | select(.parent_id==\"$i\") ] | length" <<< "$snap_list")
    echo "Replicated vVol $vvol_name has $vvol_rw_snap_count RW snapshots. vVol id: $vvol_id, VM uuid: $vm_uuid"
    echo "RW Snapshots:"
    echo "name,naa_name,creation_timestamp"
    jq -r '.[] | select(.parent_id=="'$i'") | [.name, .naa_name, .creation_timestamp] | @csv' <<< "$snap_list" | tr -d '"'
  fi
done  

範例輸出:
Replicated vVol "vss_demo_vm.vmdk" has 2 RW snapshots. vVol id: e0173e85-8dc2-4104-a11d-d670ac419f88, VM uuid: 50379fa2-dda5-6a20-3156-c31bcbe30fb4
RW Snapshots:
name,naa_name,creation_timestamp
vss_demo_vm.vmdk,naa.68ccf09800f030ce0bc208d40cfbacb3,2023-09-21T15:05:59.242+00:00
vss_demo_vm.vmdk,naa.68ccf098004b0ad8048b1c326ab341a8,2023-09-21T15:39:16.518+00:00

此資料可用來識別 vVol 所屬的 VM。下列兩個選項均可使用。
  1. 依名稱尋找虛擬機器

在大多數情況下,vVol 的名稱包含 VM 的名稱。在以下範例中,vVol 會向 VM 進行「vss_demo_vm」
  1. 在 PowerStore GUI 或 REST 中透過 uuid 尋找虛擬機器。如果 vCenter 伺服器已在 PowerStore 上註冊,則可使用此選項。如果是這種情況,您可以如下所示找到虛擬機器:

PowerStore GUI:流覽至運算→虛擬機器,讓欄的「UUID」可見,並在清單中找到 VM:
image.png

PowerStore REST:使用篩選器 instance_uuid=eq.執行 virtual_machine GET 要求,即可找到 VM。例如:
curl -u $credentials 'https://$powerstore_rest_ip/api/rest/virtual_machine?instance_uuid=eq.5037dc23-56fc-29d2-d567-05ef17ffa81a&select=id,name'
[{"id":"550d0148-d123-4303-9bcc-85ef26377851","name":"vss_demo_vm"}]

Resolution

為了能夠復原複寫目標月臺上的快照,我們建議您永遠不要建立已複寫 vVol 型 VM 的靜止快照。靜止 VM 快照建立會導致 vVols 的 RW 快照建立,進而造成上述問題。

問題解決方案包含 2 個部分:
  1. 移除現有的 RW 快照或將 RW vVol 快照轉換為 ReadOnly vVol 快照
  2. 避免日後建立 RW 快照


將 RW 快照轉換為 RO 快照

您可以將虛擬機器遷移到暫時的資料存放區,然後再回到原始資料存放區來完成。

步驟:
  1. 在 PowerStore 上建立暫時的儲存容器
  2. 將暫存儲存容器掛載至 ESXi 主機
  3. 在時間資料存放區執行儲存 vMotion 作業。VMware 說明文件中的詳細資料 HTTPs://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vcenterhost.doc/GUID-A15EE2F6-AAF5-40DC-98B7-0DF72E166888.html
  4. 將 VM 遷移回原始資料存放區


移除現有的 RW 快照

  1. 識別具有 RW 快照的複寫虛擬機器。如何執行此操作的指示會在「原因」區段中提供
  2. 在 vSphere GUI 中:按一下虛擬機器並開啟其「快照」清單
  3. 刪除在「靜止客體檔案系統」欄位中具有「是」的快照
image.png
 


避免日後建立 RW 快照

在建立靜止的 VM 快照時,vSphere 會建立 vVol 的 RW 快照,因此為了避免建立 RW 快照,您可以在建立 VM 快照時將靜止旗標設為 false。

以下螢幕截圖示范 vSphere GUI 中的「取得快照」視窗。如果未勾選核取方塊,則不會靜止快照。
image.png

在 vSphere createSnapshot API以及PowerCLI 的 New-Snapshot Cmdlet 中提供靜止旗標

Affected Products

PowerStore
Article Properties
Article Number: 000218057
Article Type: Solution
Last Modified: 14 Jun 2025
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.