add nicModel option to customizeImage and generalize
Allows overriding the QEMU NIC model during builds (e.g. e1000 for images without VirtIO drivers). Enables MAS activation on upstream images that lack VirtIO network drivers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f83cf24ef
commit
4c1b710308
2 changed files with 5 additions and 1 deletions
|
|
@ -24,6 +24,7 @@
|
|||
vncDisplay ? null,
|
||||
smp ? 4,
|
||||
memSize ? 4096,
|
||||
nicModel ? null,
|
||||
}:
|
||||
let
|
||||
originalImageName = lib.strings.removeSuffix "-vmix" (lib.strings.removeSuffix ".qcow2" originalImage.name);
|
||||
|
|
@ -104,7 +105,7 @@
|
|||
then "-drive file=${resultImg},format=qcow2,if=none,id=disk0 -device ide-hd,drive=disk0"
|
||||
else "-drive file=${resultImg},format=qcow2,if=virtio"} \
|
||||
${cdromArgs} \
|
||||
-nic user,model=${if isAHCI then "e1000" else "virtio-net-pci"}"
|
||||
-nic user,model=${if nicModel != null then nicModel else if isAHCI then "e1000" else "virtio-net-pci"}"
|
||||
|
||||
timeout 1800 qemu-system-x86_64 $VMIX_DISPLAY $QEMU_ARGS || \
|
||||
if [[ "$VMIX_DISPLAY" == "-display sdl" ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue