fix(create-proxmox-resource): case-insensitive importdisk parse + warn on --disk-size for VMs #64

Merged
beatzaplenty merged 1 commits from worktree-gentle-cuddling-hippo into main 2026-07-25 21:37:15 +00:00
Owner

qm importdisk in QEMU 11.x outputs lowercase "successfully imported disk
as '...'" rather than the capitalised form the original grep expected.
The case mismatch made disk_id always empty, which caused the script to
exit 1 after qm create had already run -- leaving the VM with only an
EFI disk, no scsi0, and boot order still set to net0.

Fix by adding -i (case-insensitive) to the grep. Both the old capitalised
format (where the disk id had an "unused0:" prefix inside the quotes) and
the new lowercase format are handled correctly: the sed strip of unused0:
is preserved for backward compatibility, and the regex result is identical
either way.

Also add an early warning when --disk-size is passed for --type vm: the
flag is LXC-only for create mode and was silently ignored, leaving users
expecting a different size than the proxmoxImageSize in variables.nix.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

qm importdisk in QEMU 11.x outputs lowercase "successfully imported disk as '...'" rather than the capitalised form the original grep expected. The case mismatch made disk_id always empty, which caused the script to exit 1 after qm create had already run -- leaving the VM with only an EFI disk, no scsi0, and boot order still set to net0. Fix by adding -i (case-insensitive) to the grep. Both the old capitalised format (where the disk id had an "unused0:" prefix inside the quotes) and the new lowercase format are handled correctly: the sed strip of unused0: is preserved for backward compatibility, and the regex result is identical either way. Also add an early warning when --disk-size is passed for --type vm: the flag is LXC-only for create mode and was silently ignored, leaving users expecting a different size than the proxmoxImageSize in variables.nix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
beatzaplenty added 1 commit 2026-07-25 21:36:47 +00:00
fix(create-proxmox-resource): case-insensitive importdisk parse + warn on --disk-size for VMs
Check NixOS configurations / eval-hosts (pull_request) Successful in 10m22s
852ba2240f
qm importdisk in QEMU 11.x outputs lowercase "successfully imported disk
as '...'" rather than the capitalised form the original grep expected.
The case mismatch made disk_id always empty, which caused the script to
exit 1 after qm create had already run -- leaving the VM with only an
EFI disk, no scsi0, and boot order still set to net0.

Fix by adding -i (case-insensitive) to the grep. Both the old capitalised
format (where the disk id had an "unused0:" prefix inside the quotes) and
the new lowercase format are handled correctly: the sed strip of unused0:
is preserved for backward compatibility, and the regex result is identical
either way.

Also add an early warning when --disk-size is passed for --type vm: the
flag is LXC-only for create mode and was silently ignored, leaving users
expecting a different size than the proxmoxImageSize in variables.nix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
beatzaplenty merged commit 3102d66337 into main 2026-07-25 21:37:15 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No labels
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: beatzaplenty/nixos#64