Skip to content

KVM: growing a ROOT volume through a new disk offering is refused while the VM is running, though a size-only resize of the same volume works #14601

Open

Description

@bhouse-nexthop
ISSUE TYPE
  • Bug Report
COMPONENT NAME
Volumes / resizeVolume / changeOfferingForVolume
CLOUDSTACK VERSION
4.22 (also main)
CONFIGURATION

KVM, any primary storage; seen on Ceph RBD.

SUMMARY

On KVM, a ROOT volume of a running VM can be grown in place: resizeVolume id=<root> size=<larger> goes through orchestrateResizeVolume, which explicitly handles a running KVM VM (it checks the host is Up and Enabled), and the agent grows the disk with virsh blockresize.

Growing the same volume by giving it a larger disk offering is refused, whether through resizeVolume id=<root> diskofferingid=<larger offering> or changeOfferingForVolume:

Cannot resize ROOT volume [ROOT-123] when VM is not on Stopped State. VM i-2-123-VM is in state Running

The refusal comes from VolumeApiServiceImpl.checkIfVolumeIsRootAndVmIsRunning, which runs only on the two disk-offering paths and refuses any size change of a ROOT volume unless the VM is Stopped, on every hypervisor. It dates from #4341, when ROOT volumes were first allowed to change disk offering at all; the size-only path never had this restriction on KVM.

So on KVM the same grow is accepted or refused depending on which API is used to request it. Where the ROOT volume's offering fixes its size, the size-only path is refused too (the volume "can only be resized when changing to another Service Offering"), which leaves stopping the VM as the only way to grow its root disk.

STEPS TO REPRODUCE
1. On KVM, deploy a VM; leave it Running.
2. resizeVolume id=<its ROOT volume> size=<current GiB + 10>
   -> succeeds; the guest sees the larger disk.
3. Create a disk offering larger than the volume, then:
   resizeVolume id=<its ROOT volume> diskofferingid=<that offering>
   (or changeOfferingForVolume id=<ROOT volume> diskofferingid=<that offering>)
   -> "Cannot resize ROOT volume [...] when VM is not on Stopped State"
EXPECTED RESULTS
On KVM, growing a running VM's ROOT volume through a new disk offering succeeds, as the size-only resize already does.
Shrinking a ROOT volume, and any ROOT resize on other hypervisors, still needs the VM to be stopped.
ACTUAL RESULTS
InvalidParameterValueException: Cannot resize ROOT volume [...] when VM is not on Stopped State.

Activity

  1. github-actions commented on Nov 9, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    On KVM, a running VM's ROOT volume can be grown with a size-only resizeVolume, but growing it through a larger disk offering (resizeVolume diskofferingid or changeOfferingForVolume) is refused. The refusal comes from checkIfVolumeIsRootAndVmIsRunning, which applies to every hypervisor and to any size change on the offering paths. The reporter asks that growing (not shrinking) on KVM be allowed through the offering path too.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug Same operation is accepted or refused depending on which API is used
    Component component:kvm Report is specific to KVM; the check is in VolumeApiServiceImpl
    Severity Severity:Minor A size-only resize or stopping the VM works as a workaround
    Labels type:bug, component:kvm, Severity:Minor
    Coding agent Needs more info Scope needs a decision: whether the check should be hypervisor-specific, and whether shrinking stays blocked

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction is in the report: deploy a KVM VM, grow its ROOT volume by size, then try the same grow through a larger disk offering.
    • Confirm the expected behaviour for other hypervisors stays unchanged.

    Generated by Daily Issue Triage · copilot · haiku55 · ~4 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
  2. added this to the 4.22.3 milestone on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions