vagrant up报错如下:
VirtualBox error:
VBoxManage.exe: error: Could not rename the directory 'D:\C\devsoft\VirtualBoxVMs\barge_docker_vm_1547606280951_49241' to 'D:\C\devsoft\VirtualBoxVMs\barge_docker_vm' to save the settings file (VERR_ALREADY_EXISTS)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "SaveSettings()" at line 3182 of file VBoxManageModifyVM.cpp
详细信息:
vagrant up docker
Bringing machine 'docker' up with 'virtualbox' provider...
==> docker: Importing base box 'barge_docker'...
==> docker: Matching MAC address for NAT networking...
==> docker: Setting the name of the VM: barge_docker_vm
The name of your virtual machine couldn't be set because VirtualBox
is reporting another VM with that name already exists. Most of the
time, this is because of an error with VirtualBox not cleaning up
properly. To fix this, verify that no VMs with that name do exist
(by opening the VirtualBox GUI). If they don't, then look at the
folder in the error message from VirtualBox below and remove it
if there isn't any information you need in there.
VirtualBox error:
VBoxManage.exe: error: Could not rename the directory 'D:\C\devsoft\VirtualBoxVMs\barge_docker_vm_1547606280951_49241' to 'D:\C\devsoft\VirtualBoxVMs\barge_docker_vm' to save the settings file (VERR_ALREADY_EXISTS)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "SaveSettings()" at line 3182 of file VBoxManageModifyVM.cpp
解决方案:
原来为:
docker.vm.provider "virtualbox" do |vb|
vb.name = "barge_docker_vm"
vb.gui = false
vb.memory = "1024"
end
修改vb.name,比如修改为 barge_docker_vm2,这样就OK了。