へっぽこびんぼう野郎のnewbie日記

けろけーろ(´・ω・`)! #vZkt8fc6J

【Vagrant】Fixed the error, VBoxManage: error: Context: "SaveSettings()" at line 3016 of file VBoxManageModifyVM.cpp

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: ansible_default_1448594826410_37386
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2200 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
A customization command failed:

["modifyvm", :id, "--memory", "2048", "--cpus", "2", "--name", "Hoge", "--natdnshostresolver1", "on", "--natdnsproxy1", "on", "--vram", "16"]

The following error was experienced:

#<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "c8f608dd-194f-448e-b8fc-da5473a9a99d", "--memory", "2048", "--cpus", "2", "--name", "Hoge", "--natdnshostresolver1", "on", "--natdnsproxy1", "on", "--vram", "16"]

Stderr: VBoxManage: error: Could not rename the directory '/Users/kaeru/VirtualBox VMs/ansible_default_1448594826410_37386' to '/Users/kaeru/VirtualBox VMs/Hoge' to save the settings file (VERR_ALREADY_EXISTS)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "SaveSettings()" at line 3016 of file VBoxManageModifyVM.cpp
>

Please fix this customization and try again.
$ cd ~/VirtualBox\ VMs
$ mv  Hoge ~/  # for fake delete. You can run "rm -rf Hoge"
$ cd $before_directory
$ vagrant up