Skip to content

Volume Snapshots of an Instance in a Powered Off State #9496

Description

@scottsignal
ISSUE TYPE
  • Enhancement Request
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.19.1.0
CONFIGURATION

N/A

OS / ENVIRONMENT

Ubuntu 22.04
KVM

SUMMARY

Ability to create Volume Snapshots of all attached volumes to an instance from the Powered off Instance.

STEPS TO REPRODUCE
1.) Go to Compute --> Instances 
2.) Click on a Powered off Instance. 
3.) Click on a button to create a Volume Snapshot 
EXPECTED RESULTS
Being able to create a Volume Snapshot of all attached Volumes to an instance from the Instance screen while the instance is in a powered off state.
ACTUAL RESULTS
Today you have to navigate to Storage --> Volumes and take a Volume Snapshot each individual volume when the instance is in a powered off state.

Activity

  1. rajujith commented on Aug 7, 2024

    @rajujith
    Contributor

    @scottsignal Make sure you enable the global configuration 'kvm.snapshot.enabled' then navigate to the volume of the instance and you should be able to create a volume snapshot of the instance irrespective of the Power status of the instance.

  2. scottsignal commented on Aug 12, 2024

    @scottsignal
    Author

    @scottsignal Make sure you enable the global configuration 'kvm.snapshot.enabled' then navigate to the volume of the instance and you should be able to create a volume snapshot of the instance irrespective of the Power status of the instance.

    We have kvm.snapshot.enabled set to True. This was generated from feedback we received that its inconvenient to have to navigate to volumes. They felt that it should be reasonable to do this from the instances tab and do a volume snapshot on all volumes attached to that instance in a powered off state.

  3. JoaoJandre commented on Aug 13, 2024

    @JoaoJandre
    Contributor

    @scottsignal Make sure you enable the global configuration 'kvm.snapshot.enabled' then navigate to the volume of the instance and you should be able to create a volume snapshot of the instance irrespective of the Power status of the instance.

    We have kvm.snapshot.enabled set to True. This was generated from feedback we received that its inconvenient to have to navigate to volumes. They felt that it should be reasonable to do this from the instances tab and do a volume snapshot on all volumes attached to that instance in a powered off state.

    Do you intend to restore all the volumes simultaneously? If so, what you want is a VM snapshot (without memory).

  4. added this to the 4.21.0.0 milestone on Aug 13, 2024
  5. scottsignal commented on Aug 13, 2024

    @scottsignal
    Author

    @scottsignal Make sure you enable the global configuration 'kvm.snapshot.enabled' then navigate to the volume of the instance and you should be able to create a volume snapshot of the instance irrespective of the Power status of the instance.

    We have kvm.snapshot.enabled set to True. This was generated from feedback we received that its inconvenient to have to navigate to volumes. They felt that it should be reasonable to do this from the instances tab and do a volume snapshot on all volumes attached to that instance in a powered off state.

    Do you intend to restore all the volumes simultaneously? If so, what you want is a VM snapshot (without memory).

    I had not thought about the restore side, but it would make sense to be able to do the initial creation and restore all volumes attached to an instance simultaneously. And yes, I was assuming that it would be a VM snapshot (without memory). The Instance would be powered off, so it would be clean and no need for a memory snapshot.

  6. JoaoJandre commented on Aug 13, 2024

    @JoaoJandre
    Contributor

    @scottsignal Make sure you enable the global configuration 'kvm.snapshot.enabled' then navigate to the volume of the instance and you should be able to create a volume snapshot of the instance irrespective of the Power status of the instance.

    We have kvm.snapshot.enabled set to True. This was generated from feedback we received that its inconvenient to have to navigate to volumes. They felt that it should be reasonable to do this from the instances tab and do a volume snapshot on all volumes attached to that instance in a powered off state.

    Do you intend to restore all the volumes simultaneously? If so, what you want is a VM snapshot (without memory).

    I had not thought about the restore side, but it would make sense to be able to do the initial creation and restore all volumes attached to an instance simultaneously. And yes, I was assuming that it would be a VM snapshot (without memory). The Instance would be powered off, so it would be clean and no need for a memory snapshot.

    @scottsignal Currently, using KVM as the hypervisor, ACS does not support taking disk-only VM snapshots of stopped VMs. I am already working on a feature that will enable this behavior (You can take a look at #9524 if you want). However, I first need to merge #9270 before I can put more energy on this feature. So I expect it will only be available in 4.21.0.0

  7. scottsignal commented on Aug 13, 2024

    @scottsignal
    Author

    @scottsignal Make sure you enable the global configuration 'kvm.snapshot.enabled' then navigate to the volume of the instance and you should be able to create a volume snapshot of the instance irrespective of the Power status of the instance.

    We have kvm.snapshot.enabled set to True. This was generated from feedback we received that its inconvenient to have to navigate to volumes. They felt that it should be reasonable to do this from the instances tab and do a volume snapshot on all volumes attached to that instance in a powered off state.

    Do you intend to restore all the volumes simultaneously? If so, what you want is a VM snapshot (without memory).

    I had not thought about the restore side, but it would make sense to be able to do the initial creation and restore all volumes attached to an instance simultaneously. And yes, I was assuming that it would be a VM snapshot (without memory). The Instance would be powered off, so it would be clean and no need for a memory snapshot.

    @scottsignal Currently, using KVM as the hypervisor, ACS does not support taking disk-only VM snapshots of stopped VMs. I am already working on a feature that will enable this behavior (You can take a look at #9524 if you want). However, I first need to merge #9270 before I can put more energy on this feature. So I expect it will only be available in 4.21.0.0

    This sounds good to me. Thanks!

  8. moved this from Dev In Progress to In Testing in Apache CloudStack BugFest - Issueson Jul 11, 2025
  9. slavkap commented on Jul 11, 2025

    @slavkap
    Contributor

    @scottsignal, I don't know what primary storage you are using, but for most of the storage types, this option kvm.vmstoragesnapshot.enabled, if enabled, works on running VMs as well (without the memory)
    But the qemu-guest-agent should be installed on the guest VM, and when taking a VM snapshot, the VM will be frozen

  10. scottsignal commented on Jul 11, 2025

    @scottsignal
    Author

    @scottsignal, I don't know what primary storage you are using, but for most of the storage types, this option kvm.vmstoragesnapshot.enabled, if enabled, works on running VMs as well (without the memory) But the qemu-guest-agent should be installed on the guest VM, and when taking a VM snapshot, the VM will be frozen

    We are using NFS and already have kvm.vmstoragesnapshot.enabled enabled. It's more about the ability to volume snapshot the entire powered off instance. For example, if you have an instance with 10 disks attached, you have to do this 10 times from for each volume from the volume screen in the UI.

  11. slavkap commented on Jul 11, 2025

    @slavkap
    Contributor

    @scottsignal, kvm.vmstoragesnapshot.enabled is for VM snapshots without memory. Ultimately, it will create disk snapshots of all 10 volumes (which are not visible to the user), but they will be under one VM snapshot.

  12. scottsignal commented on Jul 11, 2025

    @scottsignal
    Author

    @scottsignal, kvm.vmstoragesnapshot.enabled is for VM snapshots without memory. Ultimately, it will create disk snapshots of all 10 volumes (which are not visible to the user), but they will be under one VM snapshot.

    The problem is that in order to use Instance Snapshots the instance must be powered on, correct?

  13. slavkap commented on Jul 14, 2025

    @slavkap
    Contributor

    @scottsignal, yes, this works on running virtual machines (with volumes on pools like Ceph and NFS).

  14. scottsignal commented on Jul 14, 2025

    @scottsignal
    Author

    @scottsignal, yes, this works on running virtual machines (with volumes on pools like Ceph and NFS).

    The enhancement Request is for Powered off. I realize you can do it powered on, but that isn't an option in some cases.

    Ability to create Volume Snapshots of all attached volumes to an instance from the Powered off Instance.

    EDIT: I realized that my EXPECTED RESULTS didn't include Powered Off. So, I apologize if this was the confusion.

  15. slavkap commented on Jul 14, 2025

    @slavkap
    Contributor

    @scottsignal, thank you for the explanation. I'm sorry that I probably missed a few things.
    Some of the storage plug-ins support VM snapshots on both running/stopped VMs. After you mentioned that you're using NFS, @JoaoJandre's PR will solve your issue, but it won't fix it in general for the rest of the storage plug-ins that are using kvm.vmstoragesnapshot.enabled option (e.g. Ceph).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions