My script did this roughly :
Code: Select all
//Unmount the newly-created vdi
/usr/bin/vboxmanage storageattach "+vm+" --storagectl sata1 --port 1 --device 0 --type hdd --medium none
//Move the file to the Snapshots folder
/usr/bin/vboxmanage modifymedium disk "+matches_new_disk[2]+" --move "+enclose(dir_matches[1]+'/Snapshots/')
//Mount the image again
/usr/bin/vboxmanage storageattach "+vm+" --storagectl sata1 --port 0 --device 0 --type hdd --medium "+enclose(matches_new_disk[2])
VBoxManage: error: Failed to lock media '/ssd/{0ba31cc1-5563-4f09-9713-65baebb9d8c2}.vdi'
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "SetLocation(Bstr(strLocation).raw(), pProgress.asOutParam())" at line 763 of file VBoxManageDisk.cpp
And yet stdout was having:
Move medium with UUID 0ba31cc1-5563-4f09-9713-65baebb9d8c2 finished
Is this a desired behaviour or an upstream bug with the new releases.
I'm running on Ubuntu with vboxmanage --version
5.2.22r126460