In virtualbox, if you have made a new hard disk by
$virtualbox clonehd [sourcehd.vdi] [destinationhd.vdi]
and try to build a new virtual machine by selecting the destination.vdi, then you may come across the error below:
Error: failed to open the harddisk !@#$%
The solution is that you have to change the permission of the directory , say
$sudo chown -R [abc]:[abc] ~/VirtualBox VMs