📌 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.

Hyper-V VM Export Process

Figure 1: Exporting the source VHDX disk from Hyper-V Manager.


🔄 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
Disk conversion terminal output

Figure 2: Converting disk formats and verifying image structure.


☁️ 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
OCI Object Storage Bucket Upload

Figure 3: Staging the VMDK image inside OCI Object Storage.


🖥️ 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.

OCI Instance Running

Figure 4: Successfully deployed OCI compute instance running from custom VMDK.


💡 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.