joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.63k stars 1.12k forks source link

Issue with Floppy Disk when finalizing Windows 2012 R2 core #176

Closed floradu88 closed 8 years ago

floradu88 commented 8 years ago

After trying to create a new machine using the latest on master with this command:

packer build .\windows_2012_r2_core.json

←[1;31m==> virtualbox-iso: Error removing floppy: VBoxManage error: VBoxManage.e xe: error: Failed to get a console object from the direct session (VBOX_E_INVALID_OBJECT_STATE) ==> virtualbox-iso: VBoxManage.exe: error: Details: code VBOX_E_VM_ERROR (0x80bb0003), component MachineWrap, interface IMachine, callee IUnknown ==> virtualbox-iso: VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at line 326 of file VBoxManageStorageController.cpp←[0m ←[1;32m==> virtualbox-iso: Unregistering and deleting virtual machine...←[0m ←[1;32m==> virtualbox-iso: Deleting output directory...←[0m ←[1;31mBuild 'virtualbox-iso' errored: Error removing floppy: VBoxManage error: VBoxManage.exe: error: Failed to get a console object from the direct session (VBOX_E_INVALID_OBJECT_STATE) VBoxManage.exe: error: Details: code VBOX_E_VM_ERROR (0x80bb0003), component MachineWrap, interface IMachine, callee IUnknown VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at line 326 of file VBoxManageStorageController.cpp←[0m

==> Some builds didn't complete successfully and had errors: --> virtualbox-iso: Error removing floppy: VBoxManage error: VBoxManage.exe: err or: Failed to get a console object from the direct session (VBOX_E_INVALID_OBJECT_STATE) VBoxManage.exe: error: Details: code VBOX_E_VM_ERROR (0x80bb0003), component MachineWrap, interface IMachine, callee IUnknown VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at line 326 of file VBoxManageStorageController.cpp --> vmware-iso: Failed creating VMware driver: Unable to initialize any driver for this platform. The errors from each driver are shown below. Please fix at least one driver to continue:

kensykora commented 8 years ago

What version of Virtualbox are you using? I ran a run last week with 5.0.4 and it worked fine.

For VMWare, make sure you have both VMWare Workstation installed, as it's suggested i t's not found. You may also need the vagrant license for VMWare Desktop, but I'm not 100% sure if it's required for Packer (I know it is if you want to use the vmware box on vagrant, but not sure if it's required to build)

If you only want to run the virtualbox build, pass the flag --only=virtualbox-iso

floradu88 commented 8 years ago

VirtualBox 5.0.4.102546

Fails intermittently with flag on.

kensykora commented 8 years ago

Can you give some context to when these errors happened in the run? Was it at the start? at the end? Did the box otherwise build successfully?

floradu88 commented 8 years ago

The errors happened after the machine hdd was defragmented and sdelete was run. The process did not complete successfully. Host System: Windows 7 x64

rahamathid commented 8 years ago

I am also facing same issue with latest virtualbox 5.0.8 and latest packer 0.8.6 version. Issue is intermittent. If I run 3 builds with separate packer window, 2 will get successful and 1 will fail. Any solution for this ?

sneal commented 8 years ago

This is an upstream issue, closing in favor of https://github.com/mitchellh/packer/issues/2889