Page 1 of 1

VBoxManage as well as GUI fails to attach a disk as multi-attach

Posted: 11. Dec 2018, 08:16
by GKDemo
Host OS: Apple macOS High Sierra 10.13.6
VirtualBox version: 6.0.0 RC1
VirtualBox Extension Pack: 6.0.0 RC1
Guest additions not installed inside the VM (that is done after the VM powers on)

Note: this problem does not exist in VirtualBox 5.2.22 or 5.2.23 Build 127298

Issue:
I have a shell script which creates the VM as specified in the successful UUID being assigned.

The script then assigns a previously created virtual disk as a multi-attach disk to the newly created VM. This is when the error is generated below.

Virtual machine 'w10a' is created and registered.
UUID: 77cda27e-f910-47de-b8d9-b3233aa49238
Settings file: '/Users/demo/VirtualBox VMs/w10a/w10a.vbox'
VBoxManage: error: Cannot change type for medium '/BaseDisks/w10e64eval.vdi': the media type 'MultiAttach' can only be used on media registered with a machine that was created with VirtualBox 4.0 or later
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "COMSETTER(Type)(enmMediumType)" at line 708 of file VBoxManageStorageController.cpp
VBoxManage: error: Failed to set the medium type

Re: VBoxManage as well as GUI fails to attach a disk as multi-attach

Posted: 11. Dec 2018, 09:24
by GKDemo
Hello VirtualBox team,

I did some further investigation into this by uninstalling VirtualBox 6.0.0 RC1, rebooting, installing the most recent 5.2.3 test build 127309. Findings:

Scenario 1. In 5.2.3, when the virtual disk file is flagged as read-only AND "locked" flag is checked, the same errors appear as 6.0.0 RC1
Scenario 2. In 5.2.3, when the virtual disk file is flagged as read-only AND the "locked" flag is cleared, the disk is added to the vbox configuration.

This lead to performing the upgrade to 6.0.0 RC1 and tested with Scenario 2: Result: same as scenario 1: Fail to multi-attach.

GK.