VirtualBox

Opened 7 years ago

Last modified 7 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 Frank Mehnert)

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)

foo-2017-07-06-11-42-16.log (159.9 KB ) - added by pstrzelczak 7 years ago.
VM log
packer.log (46.9 KB ) - added by pstrzelczak 7 years ago.
packer log
centos-vbox.json (1.3 KB ) - added by pstrzelczak 7 years ago.
packer template

Download all attachments as: .zip

Change History (6)

by pstrzelczak, 7 years ago

Attachment: foo-2017-07-06-11-42-16.log added

VM log

by pstrzelczak, 7 years ago

Attachment: packer.log added

packer log

comment:1 by pstrzelczak, 7 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/ 

by pstrzelczak, 7 years ago

Attachment: centos-vbox.json added

packer template

comment:2 by Frank Mehnert, 7 years ago

Description: modified (diff)

comment:3 by Frank Mehnert, 7 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).

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use