Workaround for clonevm adding disk to media manager

This is for discussing general topics about how to use VirtualBox.
Post Reply
juancarlos
Posts: 1
Joined: 11. Nov 2013, 21:13

Workaround for clonevm adding disk to media manager

Post by juancarlos »

Hello guys, I just wanted to share a problem I encountered while trying to make a bash script for regular backups of my existing vms.

Summary of script:
1. poweroff running vms.
2. clone vms (not on default folder) (delete previous clone folder if existing) NOTE: Not using --register option
3. start vms.

Problem:
After first backup, it works just fine. Second backup after deleting previous backups, i got next error:
VBoxManage: error: cannot register the hard disk '/location/file.vdi' {some_uuid} because a hard disk '/same/location' with {some_uuid} already exists.

After some research I found this: virtualbox/ticket/10096 <- This is the exact error I was having.

I'm not aware of this bug is fixed, but this is the workaroud I used to get rid off this error:

Code: Select all

vboxmanage closemedium disk /backup/location/file.vdi
Of course, if you are not trying to do a clone process with a script, you can always do it manually with virtual media manager gui. :)

I just wanted to share this in case some of you are having same problems.

Regards.
Post Reply