Skip to content

Instantly share code, notes, and snippets.

@mcxiaoke
Forked from sukesh-ak/README.md
Created December 8, 2022 09:55
Show Gist options
  • Save mcxiaoke/707e1ee87f9fb843f061dc6ef47842cf to your computer and use it in GitHub Desktop.
Save mcxiaoke/707e1ee87f9fb843f061dc6ef47842cf to your computer and use it in GitHub Desktop.
How to Convert OVA to VHDX

How to convert OVA to VHDX

  • Rename .OVA file to .7z
  • Use winrar to extract .vmdk out of it

Read here and install qemu (extract zip file)

https://cloudbase.it/qemu-img-windows/

qemu-img convert "D:\VirtualBox\Open-disk001.vmdk" -O vhdx -o subformat=dynamic "D:\VirtualBox\Open.vhdx"

Read about 1MB virtual alignment here - so use fixed for Linux vm

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic

qemu-img convert "D:\VirtualBox\Open-disk001.vmdk" -O vhdx -o subformat=fixed "D:\VirtualBox\Open.vhdx"

With VirtualBox commandline

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd --format vhd "disk001.vmdk" disk001.vhd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment