Opened 8 years ago
Last modified 8 years ago
#16879 new defect
Error sending boot command: VBoxManage error: VBoxManage: error: Could not send all scan codes to the virtual keyboard (VERR_PDM_NO_QUEUE_ITEMS)
Reported by: | pstrzelczak | Owned by: | |
---|---|---|---|
Component: | VM control | Version: | VirtualBox 5.1.22 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Linux |
Description (last modified by )
While using packer tool to automate creation of VM images I face the following errors:
==> virtualbox-iso: Typing the boot command... ==> virtualbox-iso: Error sending boot command: VBoxManage error: VBoxManage: error: Could not send all scan codes to the virtual keyboard (VERR_PDM_NO_QUEUE_ITEMS) ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component KeyboardWrap, interface IKeyboard, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "PutScancodes(ComSafeArrayAsInParam(saScancodes), &codesStored)" at line 345 of file VBoxManageControlVM.cpp ==> virtualbox-iso: Unregistering and deleting virtual machine... ==> virtualbox-iso: Error deleting virtual machine: VBoxManage error: VBoxManage: error: Cannot unregister the machine 'foo' while it is locked ==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports ==> virtualbox-iso: VBoxManage: error: Context: "Unregister(CleanupMode_DetachAllReturnHardDisksOnly, ComSafeArrayAsOutParam(aMedia))" at line 156 of file VBoxManageMisc.cpp ==> virtualbox-iso: Deleting output directory... Build 'virtualbox-iso' errored: Error sending boot command: VBoxManage error: VBoxManage: error: Could not send all scan codes to the virtual keyboard (VERR_PDM_NO_QUEUE_ITEMS) VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component KeyboardWrap, interface IKeyboard, callee nsISupports VBoxManage: error: Context: "PutScancodes(ComSafeArrayAsInParam(saScancodes), &codesStored)" at line 345 of file VBoxManageControlVM.cpp
After this happens VM enters "Guru Meditation" state.
I searched for more information about the error got and found https://github.com/hashicorp/packer/issues/4309 referring to https://www.virtualbox.org/changeset/64906/vbox that seems to be some attempt to fix this (?). Anyway, https://www.virtualbox.org/changeset/64906/vbox looks not to be included in VirtualBox-5.1-5.1.22_115126_el7-1.x86_64 RPM I am using in my Centos 7.3 (judging by the lack of VboxManage keyboardputstring/keyboardputfile API added in this changeset).
Steps to reproduce:
packer build -var vm_name=foo -var no_gui=true centos-vbox.json Packer version 1.0.0
Mapping from packer API to VBoxManage calls can be seen in attached packer debug log. ISO image used is just a minimal CentOs 7.3 image. kickstart file should not be relevant for this bug. The bug is not deterministic, it happens once per ~4 executions.
Attachments (3)
Change History (6)
by , 8 years ago
Attachment: | foo-2017-07-06-11-42-16.log added |
---|
comment:1 by , 8 years ago
A side problem is that I can't reliably remove the VM:
I tried the following:
[packer@localhost ~]$ VBoxManage controlvm foo poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% [packer@localhost ~]$ VBoxManage unregistervm foo --delete 0%...10%...20%...30%... Progress state: VBOX_E_FILE_ERROR VBoxManage: error: Machine delete failed VBoxManage: error: Could not delete the medium storage unit '/tmp/installer-virtualbox-iso/foo.vdi'. VBoxManage: error: VD: error VERR_FILE_NOT_FOUND opening image file '/tmp/installer-virtualbox-iso/foo.vdi' (VERR_FILE_NOT_FOUND) VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium VBoxManage: error: Context: "RTEXITCODE handleUnregisterVM(HandlerArg*)" at line 164 of file VBoxManageMisc.cpp [packer@localhost ~]$ echo $? 1 [packer@localhost ~]$ ll VirtualBox\ VMs/foo/ foo.vbox foo.vbox-prev Logs/
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
comment:3 by , 8 years ago
The Guru Meditation is related to running VirtualBox as guest inside another VMM. I doubt that the same problem would be reproducible on real hardware (bare metal).
VM log