VMs built with Packer

Revamping my home lab VM build process using Packer, and I ran into an error where my VMs were being killed off soon after they booted from the ISO. Sadly, the error messages went by so quickly I could only see this:

reboot: System halted

Not helpful at all. 🙁

I installed OBS to record the screen so I could rewind the output. That helped, and I could finally find earlier error messages with this:

dracut-cmdline[324]: //lib/dracut/hooks/cmdline/25-parse-anaconda-options.sh: line 21: echo: write error: No space left on device

Not a lot more helpful – basically that was the only error message I could get out of the failed system.

A quick bit of Googling showed that the ‘dracut-cmdline’ tool expands the boot RAM disk into RAM, and the 1GB of RAM that the VM was using was insufficient.

I increased the RAM setting in the packer JSON file to 8GB, and the system booted just fine. I’m sure 4GB or even 2GB might be sufficient, but I’ll play with this option at a later date.

JSON file entry:

"memory": "8192",

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.