Creating a virtual drive on an Apple silicon Mac
On this page (3)
VHD Tool++ runs only on Windows and cannot be used directly on Apple silicon Macs (M1, M2, M3, and so on). On these Macs, you create a compatible virtual drive file in the macOS Terminal.
What you need
- A Mac with the Terminal.
- An IODD connected to the Mac, with much more free space than the size of the file you want to create.
Creating the file with mkfile
You create an empty file of fixed size with the command mkfile. The file extension must be .DSK so that the IODD recognizes the file as a virtual drive.
- Open the Terminal.
- Enter the command in this form, with the size and the path of the file:
mkfile [Size] [Path/Filename.DSK]
Example for a virtual drive of 10 GB. The command creates a file of 10 GB named VirtualHDD.DSK:
mkfile 10G ~/VirtualHDD.DSK
Example for a virtual drive of 100 GB. The command creates a file of 100 GB named ST400VD.DSK:
mkfile 100G ~/ST400VD.DSK
How to tell it worked
The file has the extension .DSK, and the IODD recognizes it as a virtual drive without showing the message DEFRAG. How to select a file on the device and save the state is described under Creating a VHD file (VHD Tool++).
Preventing fragmentation
The IODD requires files for virtual drives (DSK, ISO, VHD) to be stored in physically contiguous space, that is, unfragmented. macOS has no built-in program for defragmenting. Use these two methods so that the file stays compatible.
Method 1: create the file directly on the IODD (recommended). To prevent fragmentation from the start, run mkfile directly on the path of the IODD drive:
# Example: creating the file directly on the IODD volume
mkfile 20G /Volumes/Your_IODD_Name/NewDisk.DSK
Method 2: make sure there is enough free space. Before you create a file, make sure that the IODD has much more free space than the size of the file. The file system can then allocate one contiguous block more easily.
Caution
Avoid sparse files: Do not create files with the command dd and the option seek. This produces sparse files, which are very likely to be fragmented and which the IODD cannot recognize. Always use mkfile.
Message DEFRAG on macOS
If the IODD shows the message DEFRAG (the manufacturer's text for the Mac writes “Defrag!”), macOS offers no program to repair the file in place. Proceed as follows:
- Copy the fragmented
.DSKfile to the desktop of your Mac. - Delete the file from the IODD and empty the Trash (“Empty the Trash”).
- Copy the file back to the IODD.
If the message remains, the most effective solution is to back up all data, format the IODD, and copy all files back in one go. The message is explained in Error messages A to Z.
Not solved? Tell us your model and the message on the display. Go to contact form
Translation of the official IODD guide, checked against the original on 23 November 2026.
If they differ, the original English page applies: Make Virtual Drive for Silicon Mac (new window)