Avoid possibly unsafe character conversion 'tolower'.
Instead, rely on the output of vboxmanage.
Should be fine as long as the virtualbox developers keep their outputs stable.
If not, all tests against their messages would need a revision.
Setting a new disk UUID is a temporary workaround to avoid a task getting cancelled.
Since it modifies the vdi file BOINC client will sooner or later download a fresh vdi copy from the server.
For a permanent solution the project admin has to ensure each vdi file has a unique UUID before it is used for an app_version.
Workaround for errors like this:
VBoxManage.exe: error: Cannot attach medium 'D:\Boinc1\projects\lhcathomedev.cern.ch_lhcathome-dev\ATLAS_vbox_1.14_image.vdi': the media type 'MultiAttach' can only be attached to machines that were created with VirtualBox 4.0 or later
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "AttachDevice(Bstr(pszCtl).raw(), port, device, DeviceType_HardDisk, pMedium2Mount)" at line 776 of file VBoxManageStorageController.cpp
Workaround for errors like this:
VBoxManage.exe: error: Cannot attach medium 'D:\Boinc1\projects\lhcathomedev.cern.ch_lhcathome-dev\ATLAS_vbox_1.14_image.vdi': the media type 'MultiAttach' can only be attached to machines that were created with VirtualBox 4.0 or later
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "AttachDevice(Bstr(pszCtl).raw(), port, device, DeviceType_HardDisk, pMedium2Mount)" at line 776 of file VBoxManageStorageController.cpp
VirtualBox occasionally moves the disk registration entry to the global media store in VirtualBox.xml.
In this case the disk entry must completely be removed and reattached.
Otherwise the disk can't be attached as multiattach parent.
Output from "vboxmanage -q list hdds" contains paths that are compared with the path of a file.
Linux uses "/" as preferred directory separator while Windows uses "\".
This patch ensures the compare delivers the same result on both platforms.