Search code examples
virtualbox

How to create a differencing (multi-attach) disk in VirtualBox


I have a disk image (Ubuntu Server from osboxes.org) that I would like to use as a base image to create a number of VMs with differencing disks.

When I add the disk image to the Virtual Media Manager and try to set the Type to Multi-attach, I get an error message:

Cannot change type for medium 'D:\VMs\Ubuntu Server 18.04.2 (64bit).vdi': the media type 'MultiAttach' can only be used on media registered with a machine that was created with VirtualBox 4.0 or later.

I tried converting the disk image with VBoxManage clonhd --format VDI Ubuntu Server 18.04.2 (64bit).vdi converted.vdi because I thought the error message was referring to the version of the actual image, but that didn't help.

I'm using VirtualBox 6.0.


Solution

  • After adding the image to the Virtual Media Manager you first have to create a throwaway VM that uses the image as its disk. Only then you can change the Type to Multi-attach in the Virtual Media Manager. This will un-attach the image from the VM, the VM can then be deleted (choose Delete all files).

    From that point on the image is registered as a Multi-attach image and will create a differencing disk whenever it is attached to any VM.