How do I restore VM from backup? (qcow disk image)

This is for discussing general topics about how to use VirtualBox.
Post Reply
Nickolai
Posts: 4
Joined: 28. Apr 2016, 22:30

How do I restore VM from backup? (qcow disk image)

Post by Nickolai »

I have backed up the contents of the directory "VirtualBox VMs" and now I am trying to restore the states of my virtual machines by copying the backed up files, back.

Now when I select "Machine" -> "Add" and select the qcow file of my VM, I receive the following error:
Failed to load virtual machine located at /home/user/VirtualBox VMs/ubuntu32-alt-text/ubuntu32-alt-text.qcow

Details: Cannot register the hard disk '/home/user/VirtualBox VMs/ubuntu32-alt-text/ubuntu32-alt-text.qcow' {bl2b9c7d-ad2c-4e73-b9aa-f53011f200b1} because a hard disk '/home/user/VirtualBox VMs/ubuntu32-alt-text/ubuntu32-alt-text.qcow' with UUID {5c90212f-fe70-4ce3-a93f-783d1e41225a}

Result Code: NS_ERROR_INVALID_ARG (0x80070057)
I have tried running

Code: Select all

vboxmanage internalcommands sethduuid "home/user/VirtualBox VMs/ubuntu32-alt-text/ubuntu32-alt-text.qcow"
but I'm getting the following error:
`VBoxManage: error: Cannot set a new UUID: VERR_NOT_SUPPORTED`
How do I properly restore a VM ?

I'm runnung VirtualBox 5.0.18 on Ubuntu 16.04 (amd64).

P.S. I have created a question on AskUbuntu called 'How do I restore a Virtualbox VM from backup? (qcow)' (can't post the link), but it looks like there's noone there familiar with the problem.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How do I restore VM from backup? (qcow disk image)

Post by Perryg »

It looks like you are trying to restore and it sees a conflicting name already registered.

Start the main manager and go to preferences and remove what is already there ( but do not delete )

Then use the machine add again and see if it works.

PS1: you may need to close the main manager and wait 20 seconds to be sure the VBoxsvc is stopped before starting the manager again and using the add feature.

PS2: I believe you should be selecting the *.vbox file when asked using the add feature.
Post Reply