`vagrant up` fails on Cloning VM step if machine with registered UUID cannot be found
Using DrupalVM version 2.3.0 and higher, I'm getting the error below when running vagrant up; apparently related to the change made in PR #400.
The Vagrant docs for that option state that it "Linked clones are based on a master VM, which is generated by importing the base box only once the first time it is required." so apparently somewhere in my setup there's a pointer stored to the vm that it's trying to clone, but I have yet to be able to locate it.
$ vagrant up Bringing machine 'drupalvm' up with 'virtualbox' provider... ==> drupalvm: Preparing master VM for linked clones... drupalvm: This is a one time operation. Once the master VM is prepared, drupalvm: it will be used as a base for linked clones, making the creation drupalvm: of new VMs take milliseconds on a modern system. ==> drupalvm: Cloning VM... There was an error while executing
VBoxManage, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.Command: ["clonevm", "cc0ea946-b120-41bc-bd7e-ea6779a7be04", "--register", "--name", "temp_clone_1456752692208_35054"]
Stderr: VBoxManage: error: Could not find a registered machine with UUID {cc0ea946-b120-41bc-bd7e-ea6779a7be04} VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports VBoxManage: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 431 of file VBoxManageMisc.cpp
What do you get if you run vagrant global-status? Sometimes there's a rogue machine ID hanging out there.
Wow, I had like a half-dozen rogue machines lurking in that list. Killing them off and removing the ~/.vagrant.d/boxes/geerlingguy-VAGRANTSLASH-ubuntu1404 directory seems to have done the job.
Ha, it's one of those little pro tips I remember from the other 90 times I've had this same thing happen to me :)
I am getting the same exact error. I am new to vagrant and Virtual Box. Originally I created the drupal-vm folder (~/Sites/drupal-vm), then I created d8sandbox (~/Sites/d8sandbox/) and copied, edited and renamed the example.config.yml and drupal.make.yml (within the drupal-vm folder). d8sandbox.dev works great. Now I am trying to create a local site of an existing live site (we are updating the site). I've cloned the site and I am now trying to get it working using Vagrant and VM. I created to folders site.org and site.org-box (which contains the yaml files). Through terminal I've gone into site.org-box and ran vagrant up. This is when I am getting the error. When I run vagrant global-status I see that the machine drupalvm is running. I changed into that directory and ran vagrant halt, then ran vagrant global-status again and showed that the it was in a poweroff state. So I went back to the previous directory and ran vagrant up and still get the same error message. Any ideas. Do I need to destroy the original drupal-vm folder?
If you copied the configuration into site.org-box (from another place on your hard drive), Vagrant actually stores a hidden .vagrant.d folder inside that folder with virtual machine information that's used to identify the VM.
You may need to do a vagrant destroy to delete the machine entirely, then delete the box folder you have, then start over and do a new vagrant up.
So, basically:
Do I need to destroy the original drupal-vm folder?
Yes - it's a little funny the way all the VMs are managed, but that's basically where you need to go.
I just ran into this today, and it made me realize it's happened a few times before. Following this has always solved it for me http://stackoverflow.com/a/30910282/319855.
The path referenced is incorrect at least in my case though. It's located in your project directory .vagrant/machines/drupalvm/virtualbox/id
Second observation. I was cleaning up boxes today and managed to delete the master box that all my other boxes were using (linked clones feature in Vagrant and enabled in Drupal VM).
To fix it I followed https://github.com/mitchellh/vagrant/issues/6742#issuecomment-167373722, and deleted ~/.vagrant.d/boxes/geerlingguy-VAGRANTSLASH-ubuntu1404/1.0.8/virtualbox/master_id. After that I managed to rebuild the VM.
@oxyc - Thanks for posting that. I have a feeling this issue will show up in many a Google search result for years to come :)
So i followed oxyc's link and it appeared to be working until i got the following error message:
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
and this appears to be the failure message:
nppa: fatal: [localhost]: FAILED! => {"failed": true, "msg": "'ansible_ssh_user' is undefined"}
I am not sure what to make of this
Could your provide a few more lines of output before that failure? Wondering during which task it happens.
So I was eventually able to get the Virtualbox working. After letting it sit over the weekend I went back to access the site (which didn't load) so I ran a vagrant up and got this error message
nathans-MacBook-Pro:nppa.org-box natemelen$ vagrant up
Bringing machine 'nppa' up with 'virtualbox' provider...
==> nppa: Checking if box 'geerlingguy/ubuntu1404' is up to date...
==> nppa: Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "a729e17e-5e06-4ce9-97d1-e6f3e0d39f7c", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage: error: The machine 'nppa.vm' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 462 of file VBoxManageModifyVM.cpp
I also tried running a vagrant reload which spit out the same error message
any ideas
Seems you already have the VM running somewhere else.
ps aux | grep '[V]Box.* a729e17e'
so I ran that command and I am not sure what to do with it
nathans-MacBook-Pro:~ natemelen$ ps aux | grep '[V]Box.* a729e17e' natemelen 35668 0.8 6.0 3090800 499504 ?? U 9:32AM 1:40.47 /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless --comment nppa.vm --startvm a729e17e-5e06-4ce9-97d1-e6f3e0d39f7c --vrde config
You call also use sudo killall VBoxHeadless. ;)
Thankyou @opdavies that did the trick
Just ran into this same issue after upgrading a project to 3.0. Deleting the entire box from /.vagrant.d/boxes/geerlingguy-VAGRANTSLASH-ubuntu1404 got me going again.
I also ran into this.
Was getting:
Stderr: VBoxManage: error: Could not find a registered machine with UUID {a2412bea-e0f1-41ab-ad28-6677c6995fbf}
I had sorta played with drupalvm some time ago and now just coming back to it. I manually deleted all of the VirtualBox images that I didn't recognize (that were probably created by Drupal VM). Tried all the suggestions here, and nothing worked. Finally did the following and was able to get vagrant up to work successfully.
vagrant box remove geerlingguy/centos7 --all
I'm on Fedora 24 but was getting the Stderr: VBoxManage: error: Could not find a registered machine with UUID problem.
Upgrading from 18.1. to 18.5 resolved this issue for me.
I just increased my php memory and then ran vagrant reload --provision and now I am getting this error message TASK [geerlingguy.nodejs : Add Nodesource apt key.] **************************** fatal: [nppa]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to validate the SSL certificate for deb.nodesource.com:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine. You can use validate_certs=False if you do not need to confirm the server\\s identity but this is unsafe and not recommended Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible"}
Any ideas?
@natem - Are you using CentOS 6? If so, you will not be able to install Node.js via Nodesource anymore; see: https://github.com/geerlingguy/ansible-role-nodejs/issues/46