在 Compute Engine 遷移期間,遷移程序卡住

在 Compute Engine 遷移至 Google Kubernetes Engine 的過程中,「遷移至容器」可能無法辨識來源 VM 磁碟的 UUID。您可以手動新增:

  1. 使用 kubectl 或 Stackdriver 載入 Pod 的記錄。

  2. 如果看到 [hcrunner] - Failed to find boot partition 訊息,請繼續執行下列步驟。

  3. 找出其中一個訊息中列印的引導磁碟 UUID,該 UUID 會以十六進位值字串表示。在下方範例中,UUID 為 e823158e-f290-4f91-9c3d-6f33367ae0da

    [util] - SHELL OUTPUT: {"name": "/dev/sdb1", "partflags": null, "parttype":
    "0x83", "uuid": "<strong>e823158e-f290-4f91-9c3d-6f33367ae0da</strong>",
    "fstype": "ext4"}
    
  4. 使用現有工作負載的 YAML 檔案刪除工作負載:

    kubectl delete -f
    
  5. 在文字編輯器中開啟 YAML 檔案,然後找出名為 env 的部分。

  6. 新增下列程式碼:

        - name: "HC_BOOTDEVICE_UUID"
          value: ""
    
  • 如果您看到 touch: cannot touch '/vlsdata/etc/fstab': No such file or directory 訊息,請檢查下列事項:

    • 控制台中的 CSI 驅動程式工作負載狀態為「正常」。
    • 工作負載與 Migrate to Containers 部署作業位於同一個叢集。
  • 如果您看到下列任一訊息,請刪除工作負載的失敗 PersistentVolumeClaim,然後重新建立。

    • hcutil.Error: Failed mount -o rw None /vlsdata (32) (Output:mount: /vlsdata: special device None does not exist.
    • [hcrunner] - [Errno 30] Read-only file system: '/vlsdata/rootdir/etc/dhcp/dhclient-up-hooks