📌 Overview

Migrating on-premises workloads to the cloud requires an efficient, repeatable strategy. In this hands-on project, we took an existing Hyper-V Virtual Machine, exported/backed up its virtual disks, converted the storage format into VMDK, uploaded it to OCI Object Storage, and provisioned a running cloud instance from it.


🚀 Phase 1: Hyper-V Backup & Disk Export

Before modifying or converting disk images, the first rule of infrastructure engineering is securing a clean restore point.


🔄 Phase 2: Converting VHDX to VMDK Format

Oracle Cloud Infrastructure supports importing custom disk images in VMDK or QCOW2 formats. We converted the .vhdx file using qemu-img (or V2V Converter).

Terminal / Shell Command
# Converting VHDX image to VMDK format using qemu-img
qemu-img convert -f vhdx -O vmdk source_disk.vhdx converted_disk.vmdk -p

☁️ Phase 3: Uploading to OCI Object Storage

With the VMDK prepared, the image is staged inside an OCI Object Storage Bucket using the OCI CLI or OCI Console.

OCI CLI Upload Command
# Uploading VMDK to OCI Object Storage Bucket
oci os object put -bn migration-bucket --name converted_disk.vmdk --file converted_disk.vmdk --progress

🖥️ Phase 4: Import Custom Image & Provision VM

The final step is registering the uploaded object as an OCI Custom Image and launching a live compute instance.


💡 Key Takeaways & Lessons Learned

  • ✔ Paravirtualized Drivers: Ensure network and storage drivers are compatible before importing to avoid boot loops.
  • ✔ Network Configuration: Remember to update static IP settings from the source network to DHCP or OCI VCN IP ranges.
  • ✔ Cleanup: Delete temporary VMDK files from local staging and OCI buckets after successful deployment to avoid extra storage costs.