Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use a blacklist instead of whitelist for disk devices, and refactor refresh_devices() method #24

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

oliverkurth
Copy link
Contributor

@oliverkurth oliverkurth commented Nov 22, 2023

Fix for #23 , and refactor refactor refresh_devices() method. This now uses a list of devices to be excluded, instead if a list to be included. This allows for example virtio devices (253), but disallows for example floppy disks.

Also refactor to remove code duplication.

Tested by creating a custom iso with no kickstart (to allow interactive install) and installing in virt-manager.

Additionally, this includes example config files to create an ISO image. Instructions:

Prerequisites: docker with buildx plugin, a few GB of space (for docker images, package repository and ISO).

Steps:

  • clone this project
  • checkout this branch (git checkout topic/okurth/virtio)
  • export POI_IMAGE=photon/installer
  • build container image: cd docker && docker buildx build --build-context poi-helper=$(realpath ..) -t $POI_IMAGE .
  • create a temporary repository in /root/repo (can be anywhere, but adjust paths in following commands):
cd examples/iso
docker run --rm --privileged -v/dev:/dev -v$(pwd):/workdir -v /root/repo/5.0:/repo $POI_IMAGE create-repo -c packages_installer_initrd.json
docker run --rm --privileged -v/dev:/dev -v$(pwd):/workdir -v /root/repo/5.0:/repo $POI_IMAGE create-repo -c minimal_ks.yaml
  • finally, build the ISO: docker run --rm --privileged -v/dev:/dev -v$(pwd):/workdir -v /root/repo/5.0:/repo $POI_IMAGE photon-iso-builder -y iso.yaml
  • you should now have a shiny ISO: photon-5.0.iso (or use -n <name> to set another name)

You need to be root for all of the above, or use sudo (I tested this in a throw-away VM).

…efresh_devices() method

Change-Id: I60c26050fb4587e369463d08389acc64ed86c0be
Change-Id: Ie0721c53360e5996b33b72263ea8985aaa37a52d
@oliverkurth oliverkurth changed the base branch from master to poi-container November 22, 2023 22:58
@oliverkurth oliverkurth merged commit 8b5257e into poi-container Nov 27, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants