======================================= Virtualbox Virtual Disks ======================================= General rules and why you may get errors when trying to perform simple disk tasks. 1. a virtual disks is instantly registered to the system whenever a disk command is used on it 2. if a disk is not already registered then it will be issued a UUID and added with its file location 3. if you move, rename, or delete a disk by hand you should update the registry by hand 4. never touch a virtual disk attached to a running virtual machine Here are some examples of how things might happen. 1. A new virtual disk is copied onto the virtualbox host and you want to simply check it root@expo:/tmp # vboxmanage showmediuminfo foo.vhd result: /tmp/foo.vhd has been issued a UUID and added to the registry with its file location 2. You want to convert the .vhd into a .vdi to use in a new vm root@expo:/tmp # vboxmanage clonehd foo.vhd foo.vdi --format VDI result: /tmp/foo.vdi has been created and issued a UUID and added to the registry with its file location 3. You move the new .vdi to the vm directory where you will use it root@expo:/tmp # mv foo.vdi /export/vm/alamo/alamo-disk.vdi result: the registry is now corrupted and should be fixed root@expo:/tmp # vboxmanage list hdds root@expo:/tmp # vboxmanage modifymedium disk /tmp/foo.vdi --setlocation /export/vm/alamo/alamo-disk.vdi 4. You delete the .vhd since you no longer need it root@expo:/tmp # rm foo.vhd result: the registry is now corrupted and should be fixed root@expo:/tmp # vboxmanage list hdds root@expo:/tmp # vboxmanage closemedium disk /tmp/foo.vhd ======================================= End =======================================