Skip to content

Instantly share code, notes, and snippets.

@davejlong
Forked from sukesh-ak/README.md
Created November 4, 2022 15:56
Show Gist options
  • Save davejlong/f2ef70224100ef52141a5842bc55e8da to your computer and use it in GitHub Desktop.
Save davejlong/f2ef70224100ef52141a5842bc55e8da 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