use a blacklist instead of whitelist for disk devices, and refactor refresh_devices() method #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
git checkout topic/okurth/virtio
)export POI_IMAGE=photon/installer
cd docker && docker buildx build --build-context poi-helper=$(realpath ..) -t $POI_IMAGE .
/root/repo
(can be anywhere, but adjust paths in following commands):docker run --rm --privileged -v/dev:/dev -v$(pwd):/workdir -v /root/repo/5.0:/repo $POI_IMAGE photon-iso-builder -y iso.yaml
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).