After cloning, the new VM is nowhere

Discussions related to using VirtualBox on Linux hosts.
Post Reply
RazvanM
Posts: 23
Joined: 22. Apr 2015, 14:33
Primary OS: openSUSE
VBox Version: OSE Debian
Guest OSses: I only need & use Linux.
Location: Romania
Contact:

After cloning, the new VM is nowhere

Post by RazvanM »

Hi,



I cloned a VM with this command:

VBoxManage clonevm Ubuntu3 --name Ubuntu4

and everything seemed to work just ok. The problem is, after the cloning operation I expected to see the new VM in the list of VMs:

VBoxManage list vms

but the cloned VM does not appear in the list.

Am I doing something wrong?


Thank you!
RazvanM
Posts: 23
Joined: 22. Apr 2015, 14:33
Primary OS: openSUSE
VBox Version: OSE Debian
Guest OSses: I only need & use Linux.
Location: Romania
Contact:

Re: After cloning, the new VM is nowhere

Post by RazvanM »

Later update:

I should have used this command:

VBoxManage clonevm Ubuntu3 --name Ubuntu4 --register

to perform the registration too. But I did not. Reading the manual for register doesn't help:

http://www.virtualbox.org/manual/ch08.h ... registervm

I expected to see a cmd that needs to be run in this case.

I tried to "register" the folder of the VM, the *.vbox file etc, but nothing works.

What is the proper way to register a VM after cloning?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: After cloning, the new VM is nowhere

Post by noteirak »

If you could give the exact error message when trying to register, we could help further.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
RazvanM
Posts: 23
Joined: 22. Apr 2015, 14:33
Primary OS: openSUSE
VBox Version: OSE Debian
Guest OSses: I only need & use Linux.
Location: Romania
Contact:

Re: After cloning, the new VM is nowhere

Post by RazvanM »

I think I just dig my hole deeper.

I thought that removing the folder manually from this location:

/var/www/VirtualBox VMs

that is the folder "Ubuntu4" would fix my problem. My idea was to run clone again now with the correct parameter. The problem is that clone fails now with this error message:

Code: Select all

www-data@bioelite:~/VirtualBox VMs$ VBoxManage clonevm Ubuntu3 --name Ubuntu4 --register
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
Progress state: NS_ERROR_INVALID_ARG
VBoxManage: error: Clone VM failed
VBoxManage: error: Cannot register the hard disk '/var/www/VirtualBox VMs/Ubuntu4/Ubuntu4.vdi' {01546151-262e-402e-bf54-49490046898d} because a hard disk '/var/www/VirtualBox VMs/Ubuntu4/Ubuntu4.vdi' with UUID {d71db213-4c4b-4d87-bf38-d2646bec933c} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox
VBoxManage: error: Context: "int handleCloneVM(HandlerArg*)" at line 484 of file VBoxManageMisc.cpp
What can I do now?

I get that error message despite the fact that the folder "Ubuntu4" is 100% removed before running the clone command.

From what I see, the clone command recreates the Ubuntu4 folder then it complains that a file Ubuntu4/Ubuntu4.vdi is already in there, when clearly it was created by the clone command itself.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: After cloning, the new VM is nowhere

Post by noteirak »

Run this first before trying clone:

Code: Select all

vboxmanage closemedium disk {d71db213-4c4b-4d87-bf38-d2646bec933c}
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
RazvanM
Posts: 23
Joined: 22. Apr 2015, 14:33
Primary OS: openSUSE
VBox Version: OSE Debian
Guest OSses: I only need & use Linux.
Location: Romania
Contact:

Re: After cloning, the new VM is nowhere

Post by RazvanM »

Thank you! It is working:

Code: Select all

www-data@bioelite:~/VirtualBox VMs$ VBoxManage clonevm Ubuntu3 --name Ubuntu4 --register
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Machine has been successfully cloned as "Ubuntu4"
Amazing support guys. Each time I came to this forum I was helped literally as fast as I could type.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: After cloning, the new VM is nowhere

Post by noteirak »

Thank you for the kind words, we try our best :)
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
hannah
Posts: 2
Joined: 20. Aug 2015, 08:17

Re: After cloning, the new VM is nowhere

Post by hannah »

My problem too got solved I am glad to see such supportive guys here.It literally saved my recent clients website project which was about to slip.
Last edited by noteirak on 26. Aug 2015, 11:16, edited 1 time in total.
Reason: Mod edit: Removed commercial website link, it doesn't add anything to the conversation.
Post Reply