Kitchen Create giving error


#1

Hi Team,

I am using Windows 7 64 bit O.S.


Chef SDK version :- 3.0.36
Chef-Client Version :- 14.1.12

While executing command I am getting attached error.
Please see the JPG attached.
Also pasting the error below :-


C:\learn-chef\cookbooks\learn_chef_iis>kitchen create
-----> Starting Kitchen (v1.21.2)
-----> Creating …
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Clearing any previously set forwarded ports…
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running ‘pre-boot’ VM customizations…
==> default: Booting VM…
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

   Command: ["startvm", "eb188ecf-ccb6-4a8b-98d8-0072d0e054fb", "--type", "headless"]

   Stderr: VBoxManage.exe: error: Locking of attached media failed. A possible reason is that one of the media is attached to a running VM
   VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component SessionMachine, interface IMachine

------Exception-------
Class: Kitchen::ActionFailed
Message: 1 actions failed.
Failed to complete #create action: [Expected process to exit with [0], but received ‘1’
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT: Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Clearing any previously set forwarded ports…
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running ‘pre-boot’ VM customizations…
==> default: Booting VM…
STDERR: There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“startvm”, “eb188ecf-ccb6-4a8b-98d8-0072d0e054fb”, “–type”, “headless”]

Stderr: VBoxManage.exe: error: Locking of attached media failed. A possible reason is that one of the media is attached to a running VM
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component SessionMachine, interface IMachine
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1] on default-windows-2012R2


Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration


Thanks in advance.

Kind Regards,
Ajay K.


#2

You’re running this on a Windows Box. Windows can be… unhappy if any component of your setup is opened by another VM, including CD or DVD boot images or attached disk storage. Perhaps your intallation or boot media is being used by another VM, or has not been released by a failed Vagrant command that is also still running?