您需確認匯入的映像和磁碟快照是否符合格式,請見以下官方文檔。
[+] Importing a VM as an image using VM Import/Export - Export your VM from its virtualization environment - https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#export-vm-image
[+] Importing a disk as a snapshot using VM Import/Export - Prerequisites - https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html#import-snapshot-prerequisites
您可以透過 VM Import/Export 來匯入您地端的 VM 映像或磁碟快照,並以此建立 EC2 實例。
[+] What is VM Import/Export? - https://docs.aws.amazon.com/vm-import/latest/userguide/what-is-vmimport.html
整體流程為以下:
上傳 VM 映像 或 磁碟快照至 S3。
[+] Importing a VM as an image using VM Import/Export - Prerequisites - https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#import-image-prereqs
[+] Importing a disk as a snapshot using VM Import/Export - Prerequisites - https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html#import-snapshot-prerequisites
指定此 S3 檔案並匯入 AWS。
以 VM 映像建立 EC2 實例 或 映像快照建立 EBS 卷。
[+] Importing a VM as an image using VM Import/Export - Import the VM - https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#import-vm
[+] Importing a disk as a snapshot using VM Import/Export - Start an import snapshot task - https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html#start-import-task
然而,較為建議使用 MGN 來進行搬遷。MGN 是一種高度自動化的搬遷解決方案,可簡化、加快將應用程序遷移到 AWS 的成本並提供較多的功能性,且並沒有 VM Import/Export 因其“匯入”性質所導致的格式限制。
[+] What Is AWS Application Migration Service? - https://docs.aws.amazon.com/mgn/latest/ug/what-is-application-migration-service.html
整體流程如以下:
建立 Replication Servers 來進行搬遷工作。
[+] Replication Settings - https://docs.aws.amazon.com/mgn/latest/ug/replication-settings-template.html
添加來源伺服器,即安裝 Replication agent 至您的地端伺服器。
[+] Source Servers - https://docs.aws.amazon.com/mgn/latest/ug/source-servers.html
啟動設置,包含 Test 與 Cutover。
[+] Launching Test and Cutover instances - https://docs.aws.amazon.com/mgn/latest/ug/launching-target-servers.html