WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / ESXi / Converting VirtualBox VDI (Virtual Disk Image) to VMDK for use with ESXi 8.x

Converting VirtualBox VDI (Virtual Disk Image) to VMDK for use with ESXi 8.x

05.31.2023 by William Lam // Leave a Comment

If you are converting an Oracle VirtualBox VDI (Virtual Disk Image) to a VMDK for use with VMware ESXi, you might come across the following error:

Unsupported or invalid disk type 2 for 'scsi0:0'. Ensure that the disk has been imported


The invalid disk type 2 is typically a giveaway that the VMDK was mostly likely converted to a format that is only understood by a VMware Type 2 Hypervisor (Fusion/Workstation/Player) rather than ESXi which is a VMware Type 1 bare-metal Hypervisor.

Luckily, there is a straight forward way to convert the existing VMDK into the format that ESXi understands!

Note: While VirtualBox does offer an export appliance option which produces an OVA (Open Virtualization Archive), it fails to properly import into a VMware environment 🙁 and hence the need to work directly with the VDI images.

Step 1 - Shutdown the VirtualBox VM and open a terminal as we will need to use the vboxmanage CLI

Step 2 - We need to clone each existing VDI image to the initial VMDK format by running the following command:

vboxmanage clonemedium rocky-linux-from-virtualbox.vdi --format=VMDK --variant=ESX rocky-linux-from-virtualbox-original.vmdk

Step 3 - Use either the vSphere Datastore browser or SCP the VMDK(s) to the desintation ESXi host

Step 4 - SSH to the ESXi host and we will use the vmkfstools to convert from the original VMDK format to one that ESXi understands by using the following command:

vmkfstools -i rocky-linux-from-virtualbox-original.vmdk -d thin rocky-linux-from-virtualbox.vmdk

Once the conversion has completed, you should confirm that VM can successfully boot in the next step before deleting the original VMDK(s) as they are no longer needed.

Step 5 - Finally, create the new destination VM in ESXi and attach the newly converted VMDK(s). It is also important before you complete the VM wizard, that you confirm the firmware type that was used whether it is BIOS or EFI and properly configure that under VM Options->Boot Options before creating the VM or it will not boot properly.


Note: You may also need to modify the default storage adapter based on the OS you have installed.

In using the latest VirtualBox 7.0 release to install the latest Rocky Linux distribution, I found that BIOS firmware was default and I simply mirrored that in ESXi VM and successfully allowed me to power on. If you went with the default ESXi VM for Rocky Linux, which is EFI firmware, then you will need to re-create the VM (especially important when using ESXi 8.x due to this VM firmware behavior change) and make sure you detach the VMDK before deleting the VM or you will need to go through the clone and conversion process again.

More from my site

  • ESXi on Protectli Vault Pro 6650/6670
  • Support for read-only VMDK in vSphere 8.0 Update 2
  • Creating a custom VIB for ESXi 8.x
  • Google Coral USB Edge TPU Accelerator on ESXi
  • USB Network Native Driver Fling for ESXi 8.0 Update 1

Categories // ESXi Tags // ESXi 8.0, VirtualBox, vmdk

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...