Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iagor1/packer_rhel9
packer using qemu provider to build golden images locally.
https://github.com/iagor1/packer_rhel9
golden-image packer qemu qemu-kvm redhat-enterprise-linux rhel rhel9
Last synced: 9 days ago
JSON representation
packer using qemu provider to build golden images locally.
- Host: GitHub
- URL: https://github.com/iagor1/packer_rhel9
- Owner: iagor1
- License: mit
- Created: 2024-06-11T02:49:30.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-12T20:42:36.000Z (5 months ago)
- Last Synced: 2024-06-13T03:34:33.187Z (5 months ago)
- Topics: golden-image, packer, qemu, qemu-kvm, redhat-enterprise-linux, rhel, rhel9
- Language: HCL
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# packer rhel9 qemu
packer using qemu builder to create golden images locally.## What is this repository?
This repository is for who may want or need create rhel9 golden images with qemu. And when i was searching for repos like this, there were just a few, and
some of them, the boot command dindt work very well causing kernel panic.## About the code
The code is very simple, the purpose of this repo is to warn about some mistakes you can get.
1 - You need qemu args to build the image, for some reason just the flag cpu is required.
2 - If boot command is wrong, probaly it will cause kernel panic.
3 - If your ssh_username and ssh_passwd are incorrect, packer will not create the output (image) so make sure they are corret in the kickstart file
## Required:
- Kvm
- virt-install
- rhel 9 iso and checksum
- packer## Setup
this is just if you need
`apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin bridge-utils`
`sudo lsmod | grep kvm`
`sudo kvm-ok`
## Run
`
packer validate .
``
PACKER_LOG=1 packer build rhel9.pkr.hcl
`
or`
packer build rhel9.pkr.hcl
`Run image with virt-install
`
virt-install --name rhel9custom --memory 2048 --vcpus 2 --disk rhel9-kvm.qcow2,bus=sata --import --os-variant rhl9 --network default
`convert img
`sudo qemu-img convert -f qcow2 rhel9-kvm.qcow2 rhel9custom.vdi`
*im not using variables in this project because its a local build*
## LINKSlinks helpfull
https://www.lisenet.com/2022/rocky-linux-9-kernel-panic-on-packer-launched-qemu-kvm/
https://discuss.hashicorp.com/t/packer-qemu-kvm-redhat-9-kernel-panic/39886/5
https://gist.github.com/bkmetzler/d17fc843d35e2b5881a1a482efd88ac9
https://access.redhat.com/labs/kickstartconfig/#basic-configuration
https://docs.openstack.org/image-guide/convert-images.html