Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloningVolumeSource doesn't set volume Capacity #66

Open
richt-volx opened this issue Aug 21, 2024 · 0 comments
Open

CloningVolumeSource doesn't set volume Capacity #66

richt-volx opened this issue Aug 21, 2024 · 0 comments

Comments

@richt-volx
Copy link

I tried creating an image by cloning an existing volume (a qcow2 cloud-image I'd downloaded), but I wanted to resize it, so I added a capacity = element to the volume definition:

volume {
    name  = "my-new-root-volume"
    bus   = "virtio"
    pool  = "default"
    alias = "artifact"
    source {
      type   = "cloning"
      pool   = "default"
      volume = "noble-server-cloudimg-amd64.img"
    }
    capacity = "20G"
  }

This doesn't resize the volume, so the image ends up whatever the size of the source volume is.

This looks to be the same issue as #52 , I patched in a call to Driver.StorageVolResize, following the same pattern as the fix for that (6c1e562) and it now works for me.

Let me know if it would be helpful to open a PR with my fix.

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

No branches or pull requests

1 participant