How to copy or reuse a .vdi virtual disk in VirtualBox (error: UUID already exists)
Problem:
You copy a .vdi
file (virtual disk) and you get an error when create a new Virtual Machine in Virtual Box using this .vdi
file.
Result Code:
NS_ERROR_INVALID_ARG (0x80070057)
Component:
VirtualBoxWrap
Solution:
To solve it, you can assign another UUID
or clone the file using the VBoxManage
tool.
Step by step:
Option 01
You have copied the vdi file.
- Open a Terminal.
- Type in the command as the following:
VBoxManage internalcommands sethduuid "/path/to/myDisk1.vdi"
Example:
VBoxManage internalcommands sethduuid "/home/rogelio/VirtualBox VMs/myDisk1.vdi"
Option 02
You want to re-use the .vdi file
. You should clone the file.
- Open a Terminal and type:
VBoxManage clonevdi myDisk1.vdi cloneDisk.vdi