How to Convert a VM from Hyperion to VMware ESXi

Written By Christian Castagna (Administrator)

Updated at October 28th, 2025

→ Applies to: Hyperion 9.x and above

 

Step 1. Shutdown the VM on Hyperion you want to convert

Step 2. Edit /tmp/export_vmdk_esxi.sh file

vi /tmp/export_vmdk_esxi.sh

IMPORTANT
Make sure to copy and paste the lines below (replace <pool_name> with the pool name)

#!/bin/bash
# ======================================================
# Export VMDK disks from KVM virtual machines (ESXi compatible - monolithicFlat)
# Date: 2025-10-10
# ======================================================

set -euo pipefail

echo "======================================================"
echo " 🧩  KVM → VMDK Export Script (ESXi compatible)"
echo "======================================================"
echo

for cmd in virsh qemu-img; do
  if ! command -v $cmd &>/dev/null; then
    echo "❌ Command '$cmd' not found. Please install it first."
    exit 1
  fi
done
echo "✅ Requirements OK."
echo

echo "🖥️  Available VMs:"
virsh list --all --name | nl -w2 -s') '
read -rp "👉 Select VM number to export: " vm_choice
VM_NAME=$(virsh list --all --name | sed -n "${vm_choice}p")

if [ -z "$VM_NAME" ]; then
  echo "❌ Invalid VM selection."
  exit 1
fi
echo "✅ Selected VM: $VM_NAME"
echo

echo "🔍 Detecting disks for VM '$VM_NAME'..."
DISKS=($(virsh domblklist "$VM_NAME" --details | awk '/disk/ {print $4}' | grep -v '^-' || true))

if [ ${#DISKS[@]} -eq 0 ]; then
  echo "❌ No disks found for VM '$VM_NAME'."
  exit 1
fi

echo
i=1
for d in "${DISKS[@]}"; do
  echo "  $i) $d"
  ((i++))
done
echo

read -rp "👉 Enter disk numbers to export (e.g. 1 2) or 'all': " disk_selection
if [ "$disk_selection" == "all" ]; then
  SELECTED_DISKS=("${DISKS[@]}")
else
  SELECTED_DISKS=()
  for num in $disk_selection; do
    SELECTED_DISKS+=("${DISKS[$((num-1))]}")
  done
fi

BASE_PATH="/<pool_name>/syn-volumes"
ISO_DIR=$(find "$BASE_PATH" -type d -name "iso" | head -n 1)
if [ -z "$ISO_DIR" ]; then
  echo "❌ Nessuna cartella 'iso' trovata sotto $BASE_PATH."
  exit 1
fi
PARENT_DIR=$(dirname "$ISO_DIR")
EXPORT_DIR="$PARENT_DIR/vmdk_to_exp/$VM_NAME"
mkdir -p "$EXPORT_DIR"
echo "✅ Export path: $EXPORT_DIR"
echo

timestamp() { date +"%Y-%m-%d %H:%M:%S"; }

for disk in "${SELECTED_DISKS[@]}"; do
  disk_name=$(basename "$disk" .img)
  vmdk_file="$EXPORT_DIR/${disk_name}.vmdk"
  echo "$(timestamp) | ⚙️ Converting: $disk → $vmdk_file (monolithicFlat)..."
  qemu-img convert -p -O vmdk -o subformat=monolithicFlat,adapter_type=lsilogic "$disk" "$vmdk_file"
  echo "$(timestamp) | ✅ Exported (ESXi compatible): $vmdk_file"
  echo
done

echo "======================================================"
echo "🎉 Export completed successfully!"
echo "📂 Files saved under: $EXPORT_DIR"
echo "======================================================"

Save and EXIT

:wq

 

Step 3. Give permissions to /tmp/export_vmdk_esxi.sh file

chmod +x /tmp/export_vmdk_esxi.sh

 

Step 4. Run the "/tmp/export_vmdk_esxi.sh" script

./tmp/export_vmdk_esxi.sh

 

Step 5. Select the VM number to export

EXAMPLE OUTPUT

In this case, the number 1 is entered, which corresponds to the VM named Server.
If there were multiple VMs, each one would be assigned its own unique number.
It is necessary to enter the number corresponding to the VM you want to export.

 

Step 6. Choose the disk you want to export

EXAMPLE OUTPUT



In this case, type all to export all the disks of this VM.
The number 1 corresponds to the winsrvr_1.img disk.
If there were multiple disks, each one would be assigned its own unique number.

 

Step 7. Check the exported disks

EXAMPLE OUTPUT

The disks will be exported to the datastore where the VM resides

 

Step 8. Download VMDK from SynetoOS

To download the VMDK file from SynetoOS, a third-party tool (e.g., WinSCP) must be used.
The datastore specified in Step 7 must be accessed using a third-party tool (e.g., WinSCP) to perform the download.

 

Step 9. Create a new Virtual Machine in VMware ESXI

The VM must be created without any disks.

 

Step 10. Upload VMDK in VMware ESXI

The VMDK files must be uploaded to the same folder as the VM created in Step 9.

 

Step 11. Connect VMDK exported to the new VM in VMware ESXI

Step 12. Start VM in VMware ESXI