VirtualBox could not open the medium: you’re not the old you

I recently had reason to restart an old virtual machine on VirtualBox running on my Ubuntu machine, and was presented with the error:

Failed to start the virtual machine XP Install 2.

Medium ‘/home/net2/.VirtualBox/Machines/XP Install 2/Snapshots/{70eab271-a63d-4bff-aa7b-8ac8b713e3b6}.vdi’ is not accessible. Could not open the medium ‘/home/net2/.VirtualBox/Machines/XP Install 2/Snapshots/{70eab271-a63d-4bff-aa7b-8ac8b713e3b6}.vdi’.
VD: error VERR_FILE_NOT_FOUND opening image file ‘/home/net2/.VirtualBox/Machines/XP Install 2/Snapshots/{70eab271-a63d-4bff-aa7b-8ac8b713e3b6}.vdi’ (VERR_FILE_NOT_FOUND).

I figured that somehow the backup had been hosed, as it had been through a couple of restores and system migrations. A ls of the above failed with

ls: cannot access /home/net2/.VirtualBox/Machines/XP: No such file or directory
ls: cannot access Install: No such file or directory
ls: cannot access 2/Snapshots/{70eab271-a63d-4bff-aa7b-8ac8b713e3b6}.vdi: No such file or directory

And then it occured to me that I was running under a different username now. As such:

cd /home
sudo ln -s josh net2

solved the problem with the computer is completely fooled into believing that net2 is still a user on this machine. Well, for the purposes of VirtualBox anyway.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.