New OS boots after provisioned - Packer never finishes?

23 views
Skip to first unread message

Mike

unread,
May 29, 2019, 5:09:31 PM5/29/19
to Packer
I have a basic kickstart file (using the "qemu" builder) that installs a minimal Centos6 installation. Once the installation is complete, QEmu restarts the VM and the new OS boots. This doesn't seem right, as Packer never actually finishes. The provisioned OS boots and I'm left at the login prompt.

Did I miss something obvious to finish the process?

Thanks

Mike

unread,
May 29, 2019, 7:00:10 PM5/29/19
to Packer
I changed reboot to shutdown. Now qemu exits but Packer continues, constantly logging about SSH.

Rickard von Essen

unread,
May 30, 2019, 7:27:58 AM5/30/19
to packe...@googlegroups.com
You should use reboot in your kickstart file.

The general way packer is supposed to work is:
1) boot strap installation with kickstart/preseed
2) Reboot with sshd enabled and the user used by packer to connect setup.
3) After the reboot packer connects over ssh and run every provisioner
4) Packer runs the shutdown_command and after that packages the VM into an image.

For some high quality reference templates see [1]. Generally it's recommended to start with a known working packer template and then evolve it to what you need.


On Thu, May 30, 2019 at 1:00 AM Mike <sto...@gmail.com> wrote:
I changed reboot to shutdown. Now qemu exits but Packer continues, constantly logging about SSH.

--
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/d0973d72-9057-44a1-957a-a6b94eab8aa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike

unread,
May 30, 2019, 10:53:37 AM5/30/19
to Packer
Ah of course, thank you. That's so obvious now that you wrote it out. Thanks!


On Thursday, 30 May 2019 07:27:58 UTC-4, Rickard von Essen wrote:
You should use reboot in your kickstart file.

The general way packer is supposed to work is:
1) boot strap installation with kickstart/preseed
2) Reboot with sshd enabled and the user used by packer to connect setup.
3) After the reboot packer connects over ssh and run every provisioner
4) Packer runs the shutdown_command and after that packages the VM into an image.

For some high quality reference templates see [1]. Generally it's recommended to start with a known working packer template and then evolve it to what you need.


On Thu, May 30, 2019 at 1:00 AM Mike <sto...@gmail.com> wrote:
I changed reboot to shutdown. Now qemu exits but Packer continues, constantly logging about SSH.

--
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 packe...@googlegroups.com.

Mike

unread,
May 30, 2019, 11:48:28 AM5/30/19
to Packer
It works now - the image is built although it won't boot with qemu due to:

"Boot failed: not a bootable disk"

But it's definitely a step further.

Thanks


On Thursday, 30 May 2019 07:27:58 UTC-4, Rickard von Essen wrote:
You should use reboot in your kickstart file.

The general way packer is supposed to work is:
1) boot strap installation with kickstart/preseed
2) Reboot with sshd enabled and the user used by packer to connect setup.
3) After the reboot packer connects over ssh and run every provisioner
4) Packer runs the shutdown_command and after that packages the VM into an image.

For some high quality reference templates see [1]. Generally it's recommended to start with a known working packer template and then evolve it to what you need.


On Thu, May 30, 2019 at 1:00 AM Mike <sto...@gmail.com> wrote:
I changed reboot to shutdown. Now qemu exits but Packer continues, constantly logging about SSH.

--
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 packe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages