packer version 1.1.3, Debian 9.0 (64 bit) virtualbox OVA generation, getting VM shutdown issues

60 views
Skip to first unread message

ravi...@gmail.com

unread,
Jan 26, 2018, 8:41:36 AM1/26/18
to Packer
Hi,

I'm using packer 1.1.3 on Debian 9.0 (64 bit), i'm installing my product ISO into guest VM and trying to export it as an OVA, but i'm getting the following error :

==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for SSH to become available...
==> virtualbox-iso: Connected to SSH!
==> virtualbox-iso: Uploading VirtualBox version info (5.1.18)
==> virtualbox-iso: Gracefully halting virtual machine...
    virtualbox-iso:
    virtualbox-iso: We trust you have received the usual lecture from the local System
    virtualbox-iso: Administrator. It usually boils down to these three things:
    virtualbox-iso:
    virtualbox-iso:     #1) Respect the privacy of others.
    virtualbox-iso:     #2) Think before you type.
    virtualbox-iso:     #3) With great power comes great responsibility.
    virtualbox-iso:
    virtualbox-iso: [sudo] password for myuser:
==> virtualbox-iso: Timeout while waiting for machine to shut down.
==> virtualbox-iso: Error shutting down VM: VBoxManage error: VBoxManage: error: The virtual machine is being powered down
==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component ConsoleWrap, interface IConsole, callee nsISupports
==> virtualbox-iso: VBoxManage: error: Context: "PowerDown(progress.asOutParam())" at line 231 of file VBoxManageControlVM.cpp
==> virtualbox-iso: Deregistering and deleting VM...
==> virtualbox-iso: Error deleting VM: VBoxManage error: VBoxManage: error: Cannot unregister the machine 'cmsvm_64 ' 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 155 of file VBoxManageMisc.cpp
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Timeout while waiting for machine to shut down.

I tried to google this issue but not getting a definitive answer, can somebody help in this case as to what is wrong here? I've attached the JSON script.

Thank you

Regards
Ravi
myproduct _1.json

Alvaro Miranda Aguilera

unread,
Jan 27, 2018, 3:48:36 AM1/27/18
to packe...@googlegroups.com
hello

try giving the full path to the command shutdown on the guest os

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/6faca056-1233-4319-9c26-d1401dfc29bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

ravi...@gmail.com

unread,
Jan 27, 2018, 5:11:03 AM1/27/18
to Packer
Thank you, I tried to give full path of the shutdown command i.e.' /sbin/shutdown -P now' but it does not help. Error and behaviour still the same.

ravi...@gmail.com

unread,
Jan 28, 2018, 1:39:49 AM1/28/18
to Packer
Hi

out of 5 tries to build OVA with this JSON two times it is successful and other times it is giving the same error as shown in the initial post. Curious as to why this intermittent behavior. Have somebody noticed this kind of behavior earlier?

 thank you
Ravi.

Matthew Hooker

unread,
Jan 28, 2018, 3:56:31 PM1/28/18
to packe...@googlegroups.com
You may need to increase the shutdown timeout.

shutdown_timeout (string) - The amount of time to wait after executing the shutdown_command for the virtual machine to actually shut down. If it doesn't shut down in this time, it is an error. By default, the timeout is "5m", or five minutes.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/e7392aa1-d823-47c3-8e49-1e8bdd7cb26c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages