-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error removing floppy controller #2401
Comments
I forgot to mention I was running version 0.8.0, i've heard that it may be fixed in later versions (perhaps because packer does more retries as you suggest?). |
This seems to be fixed in version 0.8.1. |
I just ran into this same error with 0.8.1. Its definitely intermittent. I've built successfully about 10 times and this is the first time I have hit this. |
I'm having this issue intermittently using version 0.8.2. I have created a Windows Server 2012 R2 image 5 or 6 times using this template https://github.com/joefitzgerald/packer-windows/blob/master/windows_2012_r2.json (only modification is I've set headless to false) and have got the error twice. I'm using Windows 7 Pro as a host with VirtualBox. Is there anything I can do to help diagnose the problem? |
BTW: it would be great if there was a way to tell packer not to delete the artifacts when an error occurs. When I see this error it is after hours of image building and then I have to start from the beginning again. If the image could be preserved I could at least do some manual salvaging. |
I'm running into timing issues that seems similar, except in my case the issue is with detaching the OS install iso. In case it helps future googlers, here's the error output I'm occasionally seeing:
I just upgraded Packer from 0.6.1 to 0.8.5 and Virtualbox from 4.3.28 to 5.0.2. This same build worked (at least once) immediately beforehand and worked again with the upgraded tooling on a subsequent attempt. The speed at which the operations are processed seems to be the variable. |
A me too on packer 0.8.6 and VirtualBox 5.0.4 on Windows 8.1 x64 as a host machine deploying Windows Server 2012 R2 as a guest. |
same error on Packer 0.8.6 |
One other data point to leave here. I only encounter this on Windows hosts. I have never seen it on my ubuntu 14 host. When I was working on this win7 template, I started to run into this 100% of the time and never reproduced on ubuntu. So if you are trying to reproduce its important to use a windows host unless someone can report experiencing this on non windows. |
I using mac os x 10.10.5 |
ah ok good to know. I have never used a mac. There might even be a headless vs. GUI element here since my ubuntu box runs as a server with no desktop. |
I also have the issue on packer 0.8.6, VirtualBox 5.0.8 on Windows 7 x64 as a host machine deploying Windows Server 2008 R2 as a guest. It happens systematically with |
The issue still happens with "headless" : true on 0.8.6 |
Same issue still happening with Packer 0.8.6 on Windows 10 x64 host deploying Windows Server 2008 R2 as a guest with "headless" : "false". |
Same issue happened to me, Windows 7 x64 host deploying Windows Server 2012 R2 a a guest. Packer 0.8.6., running make in Cygwin, Virtual Box 5.0.10. I'd second @mwrock 's suggestion to not delete the artifacts on error. |
Just an update, making the changes found here I was able to get it working. I set the timeout to something really high (like 1500m) and it eventually worked (no idea how long it actually took, I was AFK). |
I am having the same issue building Windows 7 while running Linux Mint 17.2 (aka Ubuntu 14.04LTS). FWIW, I am using templates from @mwrock Here is my error: ==> virtualbox-iso: Gracefully halting virtual machine...
virtualbox-iso: Removing floppy drive...
==> virtualbox-iso: Error removing floppy: VBoxManage error: VBoxManage: error: Failed to get a console object from the direct session (VBOX_E_INVALID_OBJECT_STATE)
==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_VM_ERROR (0x80bb0003), component MachineWrap, interface IMachine, callee nsISupports
==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Shared)" at line 326 of file VBoxManageStorageController.cpp
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error removing floppy: VBoxManage error: VBoxManage: error: Failed to get a console object from the direct session (VBOX_E_INVALID_OBJECT_STATE)
VBoxManage: error: Details: code VBOX_E_VM_ERROR (0x80bb0003), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Shared)" at line 326 of file VBoxManageStorageController.cpp
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error removing floppy: VBoxManage error: VBoxManage: error: Failed to get a console object from the direct session (VBOX_E_INVALID_OBJECT_STATE)
VBoxManage: error: Details: code VBOX_E_VM_ERROR (0x80bb0003), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Shared)" at line 326 of file VBoxManageStorageController.cpp |
I am having the exact same issue as OP trying to build a Win 7 VM from a Win 7 host. None of the workarounds suggested here or in linked answers are helping. Stumped here. |
Having this issue from time to time on Windows 10 building Windows boxes. Restarting a packer task helps.
|
Is there a fix coming for this? Packer is 100% unusable for me because of this. I've been trying to build the vbox-2012r2.json (or any Windows VM) off and on since I discovered Packer last Summer and tried for about 3 days the first time and then retried again a couple of months later and just now tried again and it fails 100% of the time. It did fail earlier in the process with another error but now it fails with this error after it gets through building and is cleaning up. If there is a workaround or someone else who has a patched build of Packer that fixes this, please let me know as I would really like to use Packer to build my VMs and I don't understand how others can use it as it is failing 100% of the time for me. |
I ended up building a template image and sysprepping it by hand. So much for automation... |
Not exactly sure why, but it seems setting |
@chocolatewheelchair That's a great hint. Speculating a bit but since this only happens with Windows guests it might be that Windows is really slow shutting down and don't finish within the default It would be awesome if someone who get this problem allot can verify that increasing |
I'd be very sceptical that a longer shutdown_timeout really impacts this unless @chocolatewheelchair could confirm that affects this consistently over several attempts. Also it should be noted, it is not limited to windows, both mac and linux users have reported this. The only thing that I have found to consisently resolve this is running headless (regardless of OS). |
I have a shutdown_timeout = 15m. And OS shutdowns in 20-30 sec, max 1m. And problem occurs anyway in about 10% of tries. The most frustrating thing is that this error fires on building end, so 3-4 hours of work are cancelled in a matter of seconds =) |
@rickard-von-essen @mwrock I've run it about half a dozen times and it seems to work. Admittedly a small sample set. |
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
Hitting this again, this time on Windows Server 2016 host and Win10 guest.
in the |
I am seeing this issue as well. This is with Packer 0.12.1 and VirtualBox 5.1.12 on Arch Linux.
|
I've opened a new issue to track these bugs. See #4432 |
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
Seeing exactly same error here, anyone have a fix yet? I am running on OSX 10.12.3 dude$ packer build -force -only virtualbox-iso eval-win7x64-enterprise-cygwin.json Oracle VM VirtualBox Manager 5.1.14 |
I ran across the same problem today and this issue is still a top result. It appears from my testing that the delay isn't the magic fix people had hoped it would be but using Below is the summary of my debugging steps while trying to debug the failing build of a windows/win10x86-enterprise & windows/win2012r2-standard boxes from boxcutter/windows
Decided to try one of each of the suggestions above related to Win2012: timeout test: Win 10: headless test: That blow up prompted more searching and I found an ubuntu user reporting issues exporting with rogue virtualbox processes laying about. Shutdown all my virtualbox stuff and checked to see if any processes were still lingering: Win2012: headless test: Having that work I decided to go back and try Win 10 without any special delay and in display mode, default setup I had originally tried but with a pre-verification step there were no rogue virtualbox processes running before starting the build off. Win 10: default test with clean environment: So I rolled back and did Win 10 again Win 10: headless and no delay: While debugging this I ran into a great blog post best practices with packer and windows by @MattHodge who nicely summed it like this: "When using the VirtualBox builder, using headless mode errors a lot less." Final follow up test after request from @mwhooker to extend from 30s to 2m for the delay in display mode.: Win 10: default mode with |
@dayne thanks for the info, that's interesting. I wonder, if you wanted to test one more time, if setting something like |
@mwhooker - I went back and tried the |
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
…e modifications: 1. Installs my favorite dev tools. 2. A workaround for “Error removing floppy controller”: virtualbox-iso: Removing floppy drive... ==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox- iso-1479795526' is already locked for a session (or being unlocked) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1038 of file VBoxManageStorageController.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... References: GoSecure/malboxes#10 hashicorp/packer#2401 hashicorp/packer#3952 (comment) https://www.virtualbox.org/ticket/16063
Just wanted to confirm that this issue still exists with I can be reproduced by turning off Using Build host is a 32GB, i7, nvme SSD host, so nothing 'too slow' in that regard. |
This is a pretty old issue; if you're facing something with similar symptoms, there's a good chance it is new. Can you please open a new issue with full steps to reproduce? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi all,
At the end of a packer build, just before the post-processor (vagrant) is started, packer fails to remove the floppy drive.
The exact error is:
My packer json is:
Any idea how to fix this?
Thanks
The text was updated successfully, but these errors were encountered: