Created attachment 187356 [details] err message Andrew: "I just discovered a problem trying to attach a new HardDisk to an existing VM. The operation fails with the attached error messages and (this is the worst thing) the HardDisk is considered by VBoxSVC as attached to the VM even if the operation failed. This problem prevents to delete or reattach the HDD until the process VBoxSVC exits (stopping all VMs running on the host), thus this is quite a devastating issue in a production scenario! :S"
Created attachment 187357 [details] patch Works for me, more qa required.
Thank you very much, Ivan! I just tried your patch and it solves the problem for me without braking anything else, as far as I was able to test so far (working on VirtualBox 5.1.26 headless server). In the next days I'll roll it out in some production environments, and I'll quickly post any issue eventually. If you do not read anything from me within the end of the next week, I guess it will be OK to commit the patch. Best regards. Andrew
Only to confirm that the patch works even against the latest VirtualBox release (5.2.4), thus I guess this PR can be closed. It would be nice to have the patch committed to the Ports repository. Thanks!
Fixed in: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225714