Skip to content

Configurable disk bus and at-least-size resize - #18

Merged
prop4n merged 3 commits into
mainfrom
feat/disk-bus
Sep 2, 2026
Merged

prop4n merged 3 commits into
mainfrom
feat/disk-bus

Conversation

@prop4n

@prop4n prop4n commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Adds a configurable disk bus and makes the disk resize tolerant of an image
already at the requested size. Both surfaced while running Guix cloud images,
which expect virtio-blk (/dev/vda) rather than the default virtio-scsi (/dev/sda).

Disk bus

disks[].bus, values scsi (default) or virtio:

disks:
  - storage: local-lvm
    size: 20G
    bus: virtio        # guest sees /dev/vda; default scsi -> /dev/sda
  • Applies to VirtualMachine (blank and image) and Template.
  • A clone inherits the template's bus: the clone path detects the slot
    (virtio0 vs scsi0) from the cloned config instead of assuming scsi0.
  • Import, boot order and resize all target the resolved slot.

Resize is "at least this size"

An image already at (or above) the requested size made Proxmox reject the resize
as a shrink, failing creation. size now means "grow to at least this"; a shrink
error is treated as "already big enough" and ignored.

Tests

  • diskSlot mapping, bus validation (manifest), bus threaded to template/clone
    spec, shrink-error detection.
  • Verified end to end on a live cluster: a virtio template builds and boots a
    Guix image on /dev/vda; a 20G image no longer fails the resize step.

golangci-lint (v2), gofmt, Go + vitest suites green.

@prop4n
prop4n merged commit 7b239ca into main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant