Skip to content

bjin01/packer-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packer-images

I have been using kiwi from opensuse for a while now. Since I started to work with packer I found packer is quite handy as well and it has some advantages.

packer.io allows me to:

  • use my existing autoyast xml file and reuse it in packer template JSON files.
  • add files and run shell scripts at the end of the autoyast installation but prior the entire system get imaged.
  • "pause_before_connecting": "2m" - allow me to make changes after autoyast installation in the system e.g. change some file contents before packer shuts it down and make image of it. Of course I could do the same using provisioner shell or file.

The only disadvantage I found is:

  • it is slower than kiwi in terms of building images. But packer supports way more different formats and platforms.
  • for the boot_command I have to write the Keystroke sequences to use each OS boot loader menue and add boot commands. This is a bit tricky but worked out for me.

For the SLES images packer template JSON files I created for each version a JSON file for BIOS boot and one separate JSON file for UEFI Boot as the boot_commands differs from each other.

The shell scripts in the scripts folder will be executed after complete system installation. Packer connects using ssh into the installed system and runs the scripts.

The output folder will be output_directory": "output_{{user `image_name`}}and generated by packer once the system is off.

One thing I have to workaround is converting from raw format to qcow2 by myself as I needed to create the qcow2 with -o preallocation=off" and this option is not yet configurable in the packer template JSON file as qemu-img-args.

About

SLES images to be created using packer.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published