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

Attach VM root volumes as disk devices #14532

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Commits on Dec 5, 2024

  1. api: Add instance_root_volume_attachment

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    314dfdf View commit details
    Browse the repository at this point in the history
  2. doc/explanation/storage: Fix wording

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    9b9c0b9 View commit details
    Browse the repository at this point in the history
  3. lxd/storage: Allow security.shared for virtual-machine volumes

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    8eb6b9a View commit details
    Browse the repository at this point in the history
  4. lxd/instance/instancetype: Update instance config key docs

    These keys can only be live-updated on containers
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    0000bce View commit details
    Browse the repository at this point in the history
  5. doc: make update-metadata

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    8dac338 View commit details
    Browse the repository at this point in the history
  6. lxd/storage: Allow parsing virtual-machine/* volumes as disk sources

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    4f727bf View commit details
    Browse the repository at this point in the history
  7. lxd/device/disk: Use correct storage volume name

    virtual-machine/container volumes in the default project do not include
    the project name.
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    7579051 View commit details
    Browse the repository at this point in the history
  8. lxc: Allow virtual-machine volumes in storage volume attach

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    ec45ec2 View commit details
    Browse the repository at this point in the history
  9. lxc/storage_volume: Parse source during detach

    The change to the source property makes `vol1` and `custom/vol1` semantically
    identical even though they are not syntactically identical. It's not
    correct to simply compare the strings anymore.
    
    This is the only instance of this in the lxc and client packages.
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    ef04e30 View commit details
    Browse the repository at this point in the history
  10. lxd/storage: Detect root disk devices when determining if a volume is…

    … used
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    66d4815 View commit details
    Browse the repository at this point in the history
  11. lxd/device/disk: Allow vm root attachments with security.protection.s…

    …tart
    
    This allows a VM root disk to be attached to another instance without
    setting `security.shared`.
    
    If we only allow vm roots to be attached when security.shared is set on
    the volume, it makes it possible to forget to unset security.shared when
    the volume is detached. Forgetting to unset security.protection.start is
    harder :)
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    d3a8c06 View commit details
    Browse the repository at this point in the history
  12. lxd: Correctly report vm volume used-by

    We can no longer short-circut here because a VM's root disk migt be
    attached to another instance.
    
    I fixed this proactively for containers as well, but it does incur
    a performance penalty.
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    953dd41 View commit details
    Browse the repository at this point in the history
  13. lxd/instance/drivers: Prevent removing security.protection.start...

    ...from a virtual machine when the VM's root disk device is attached to
    another instance.
    
    This works when the key is set on a profile or instance, since it checks
    the expanded config.
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    6cc64f8 View commit details
    Browse the repository at this point in the history
  14. lxd/storage: Refactor security.shared check

    Will allow us to check when updating `virtual-machine` volumes
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    6a73d78 View commit details
    Browse the repository at this point in the history
  15. lxd/storage: Check disabling security.shared on virtual-machine volumes

    If a virtual-machine volume is attached to more than one instance, don't
    allow removing security.shared.
    
    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    053d667 View commit details
    Browse the repository at this point in the history
  16. lxd: Prevent instance delete if root volume is in use

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    1bccb31 View commit details
    Browse the repository at this point in the history
  17. doc: make i18n

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    7614f18 View commit details
    Browse the repository at this point in the history
  18. doc: Add root volume attachment to storage volume how-to

    Signed-off-by: Wesley Hershberger <[email protected]>
    MggMuggins committed Dec 5, 2024
    Configuration menu
    Copy the full SHA
    9c9ac1f View commit details
    Browse the repository at this point in the history