メインコンテンツにスキップ
バージョン: 3.0

イメージの移行 (VMware/Hyper-V)

VMwareまたはHyper-VからCubeCOSにイメージを移行するには、仮想マシンイメージをCubeCOSと互換性のある形式に変換する必要があります。 それをGlanceの画像サービスにアップロードしました

情報

USBストレージデバイスは、デフォルトでブロックされています。 USBデバイスへのアクセスが必要な場合は、管理者としてログインした後、CLI > tuning > configure を使用して、チューニングオプション cubesys.probeusbtrue に設定してください。

Windows 仮想マシンのエクスポート

Windows 仮想マシンを VHD イメージとしてエクスポートするには、Microsoft Disk2vhd ユーティリティをダウンロードしてください。

Linux仮想マシンのエクスポート

ベアメタルマシンの次のコマンドを使用して、ディスクを生画像形式にエクスポートします。

root@ubuntu:/home/ubuntu# dd if=/dev/sda bs=1024k | ssh [email protected] "cat > /var/support/p2v-ubuntu.raw"

VMware仮想マシンのエクスポート

VMware 仮想マシンを OVA または VMDK 形式でエクスポートします。

仮想マシンをCubeCOSにインポートする

CubeCOSでサポートされている画像形式:

  • qcow2
  • raw
  • vmdk
  • vhd
  • vdi
  • ova
  • ami
  • img
  • カーネル

VMware/Hyper-V イメージの最適化には import_efi を使用してください

VMwareからGlanceイメージへWindows Server 2022をインポートする

  1. 管理者 CLI にログイン
  2. image import_efiでイメージのインポートを開始します
cc1> image import_efi
1: usb
2: local
Enter index: 2
1: amphora-x64-haproxy_yoga.qcow2
2: manila-service-image-yoga.qcow2
3: rancher-cluster-image.vmdk
4: rhel9.5.qcow2
5: rocky8-1-exsi-build.vmdk
6: rocky8.qcow2
7: ubuntu2404.qcow2
8: Win11zh-22631.4168.vmdk
9: win2022zh-20348.2849.vmdk
10: win2025zh-26100.3194.vmdk
11: windows2022-esxi70u2-legacy.vmdk
Enter index: 11
Specify image name: windows2022_esxi
Select domain:
1: default
Enter index: 1
Select tenant:
1: demo
2: app-framework
3: bigstack
4: feature_test
5: admin
6: CMP-demo
Enter index: 5
Bootable image or volume:
1: glance-images
2: cinder-volumes
Enter index: 1
Visibility:
1: public
2: private
Enter index: 1
Importing...
[15:19:16] Converting image to RAW format ...
(100.00/100%)
[15:20:22] Creating image windows2022_esxi ...
[=============================>] 100%
1b9d9f7f-8193-4371-a65a-b93583164f1a
[15:26:23] Finished creating image windows2022_esxi
Importing windows2022_esxi complete. It is safe to remove the local image
file.

Rocky Linux 8.1 を Glance イメージにインポートする

  1. 管理者 CLI にログイン
  2. image import_efiでイメージのインポートを開始します
cc1> image import_efi
1: usb
2: local
Enter index: 2
1: amphora-x64-haproxy_yoga.qcow2
2: manila-service-image-yoga.qcow2
3: rancher-cluster-image.vmdk
4: rhel9.5.qcow2
5: rocky8-1-exsi-build.vmdk
6: rocky8.qcow2
7: ubuntu2404.qcow2
8: Win11zh-22631.4168.vmdk
9: win2022zh-20348.2849.vmdk
10: win2025zh-26100.3194.vmdk
11: windows2022-esxi70u2-legacy.vmdk
Enter index: 5
Specify image name: rocky8-1_esxi_glance
Select domain:
1: default
Enter index: 1
Select tenant:
1: demo
2: app-framework
3: bigstack
4: feature_test
5: admin
6: CMP-demo
Enter index: 5
Bootable image or volume:
1: glance-images
2: cinder-volumes
Enter index: 1
Visibility:
1: public
2: private
Enter index: 1
Importing...
[15:28:59] Converting image to RAW format ...
(100.00/100%)
[15:29:20] Creating image rocky8-1_esxi_glance ...
[=============================>] 100%
27a36989-3c97-45b6-a83e-f35ad58188c1
[15:32:46] Finished creating image rocky8-1_esxi_glance
Importing rocky8-1_esxi_glance complete. It is safe to remove the local image
file.

VMwareからCinderボリュームへRocky Linux 8.1をインポートする

  1. 管理者 CLI にログイン
  2. image import_efiでイメージのインポートを開始します
cc1> image import_efi
1: usb
2: local
Enter index: 2
1: amphora-x64-haproxy_yoga.qcow2
2: manila-service-image-yoga.qcow2
3: rancher-cluster-image.vmdk
4: rhel9.5.qcow2
5: rocky8-1-exsi-build.vmdk
6: rocky8.qcow2
7: ubuntu2404.qcow2
8: Win11zh-22631.4168.vmdk
9: win2022zh-20348.2849.vmdk
10: win2025zh-26100.3194.vmdk
11: windows2022-esxi70u2-legacy.vmdk
Enter index: 5
Specify image name: rocky8-1_cinder
Select domain:
1: default
Enter index: 1
Select tenant:
1: demo
2: app-framework
3: bigstack
4: feature_test
5: admin
6: CMP-demo
Enter index: 5
Bootable image or volume:
1: glance-images
2: cinder-volumes
Enter index: 2
Importing...
[15:35:15] Converting image to RAW format ...
(100.00/100%)
[15:35:36] Creating image rocky8-1_cinder ...
Importing image: 100% complete...done.
[15:36:04] Finished creating image rocky8-1_cinder
Importing rocky8-1_cinder complete. It is safe to remove the local image file.

トラブルシューティング

GUIからアップロードされた画像に追加のメタデータを追加します。 この手順は、VMware 環境または Hyper-V 環境との適切な互換性を確保することをお勧めします。

- hw_vif_model="e1000"
- hw_disk_bus="sata"

画像のメタデータを更新中

  1. 管理者 > 計算 > イメージに移動します。

    /assets/compute/images/img_migrate_1.png

  2. Moreにカーソルを合わせるのではなく、Manage Metadataをクリックして先に進みます。

    /assets/compute/images/img_migrate_2.png

ネットワークドライバの設定

  • hw_vif_model = e1000 /assets/compute/images/img_migrate_3.png

ディスクバスの設定

  • hw_disk_bus="sata" /assets/compute/images/img_migrate_4.png

UEFIイメージのGlanceメタデータ

- hw_disk_bus='sata'
- hw_firmware_type='uefi'
- hw_machine_type='q35'
- hw_qemu_guest_agent='True'
- os_secure_boot='optional'
- hw_vif_model='e1000'
- hw_video_model='vga'