Enumerate x86 VMs on Apple Silicon
💽

Enumerate x86 VMs on Apple Silicon

This semester, I’m taking an ethical hacking course where we’re required to practice on vulnerable environments like Metasploitable2. While setting up a native ARM version of Kali Linux from an ISO is straightforward on Apple Silicon, the real challenge lies with pre-built VMware VM bundles. These legacy x86-based environments are incompatible with M-series chips and impossible to run natively without a strategic workaround.
Luckily we have emulation tool like UTM to somewhat make those VMs runnable, however it is not guaranteed that everything on the VM will work properly.

1. Locating the VM Bundle

On macOS, a .vmwarevm file is a bundle rather than a single file. To inspect it, right-click the .vmwarevm file in Finder and select "Show Package Contents". The .vmdk images file(s) are stored right inside.
notion image
Inside the bundle, check whether you see one large .vmdk file or many smaller ones such as s001, s002, and so on. This determines whether you can convert the disk directly or need to consolidate it first.

2. Consolidating Split Disks (If Necessary)

If your VM bundle contains multiple .vmdk files (like the screenshot below), we will need to combine them first.
notion image
In VMware Fusion, open Virtual Machine Settings > Hard Disk, open the “Advanced options” toggle then uncheck "Split into multiple files" and click Apply to consolidate the disk into a single monolithic .vmdk file.
notion image
Now you will see a single .vmdk image in the bundle.
notion image

3. Installing Conversion Tools & Migration (qemu-img)

To handle the transition from VMware to UTM, we need qemu-img, a powerful disk utility. If you have Homebrew installed, you can grab it with a single command:
brew install qemu
Once installed, locate your consolidated .vmdk file inside the VMware bundle and convert it to QCOW2, which UTM prefers for emulation:
qemu-img convert -f vmdk -O qcow2 your-disk.vmdk your-disk.qcow2 # For me it is qemu-img convert -f vmdk -O qcow2 "Virtual Disk-cl1.vmdk" a2-vm.qcow2
If successful you will see a .qcow2 image file. You move it out of the bundle
notion image

4: UTM Setup

First, download and install UTM from getutm.app. Since we are running x86 code on an ARM-based chip, we cannot use the "Virtualize" option.
  1. Click "Create a New VM" and select "Emulate".
    1. notion image
  1. Under Operating System, choose "Other".
    1. notion image
  1. In the Hardware tab, set the architecture to x86_64.
    1. notion image
  1. For Boot Device select “Drive Image”, set the disk image to the .qcow2 file you created in Step 3, and uncheck “UEFI Boot”.
    1. notion image
  1. Then click continue, setup a shared directory if you wish and save the VM.
  1. Now you can see this machine on the tab, go ahead and start the machine.
This setup tells UTM to translate the x86 instructions for your M-series chip on the fly. It will not be as fast as a native VM, but it is the only way to get these vulnerable environments up and running for your labs.

If you liked this post, you can support me by:

or
Enumerate x86 VMs on Apple Silicon | Chen Xiang