Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
stylecircle

Bug Reference

CLOUDSTACK-

Branch

master, patches will be submitted through review board

Introduction

Purpose

...

Currently CloudStack supports VM snapshots for VmWare. This feature will add the support for VM Snapshots in Hyper-V.

References

...

Document History

...

Author
Description
Date
Anshul GangwarInitial revision. 

Glossary

...

VM - virtual machine running on hypervisor

VM Snapshot - A Hyper-V snapshot is an encapsulation of a running VM’s state, data, and hardware configuration

 

Feature Specifications


Use cases

  • Create snapshot for a specified VM
  • Revert VM to a specified snapshot
  • Delete a specified snapshot
  • List snapshots for a specified VM
  • Support creating of 'VM' snapshots (“preserve the state and data of a VM at a specific point in time.“) of both a powered on and powered off VM
    • Able to provide choices for  a) if memory state is needed b) if file system needs to be quiesced if the VM is powered on
  • Remove a snapshot and delete any associated storage
  • Remove all snapshots of a VM
  • Revert to a snapshot
  • Admin can place a limit on the number of stored snapshots per user
  • Users can create snapshots manually or by setting up automatic recurring snapshot policies Snapshots can be created on an hourly, daily, weekly, or monthly interval. One snapshot policy can be set up per VM
  • With each snapshot schedule, users can also specify the number of scheduled snapshots to be retained Older snapshots that exceed the retention limit are automatically deleted. 
    • This user-defined limit must be equal to or lower than the global limit set by the CloudStack administrator. 
    • The limit applies only to those snapshots that are taken as part of an automatic recurring snapshot policy. Additional manual snapshots can be created and retained

DB changes

will add as identified

Web Services APIs

Will use the following existing APIs

API

parameter

response

createVMSnapshot

  • vmId (required)

vmSnapshot

deleteVMSnapshot

  • vmSnapshotId (required)

jobid

listVMSnapshot

  • id (optional)
  • domainid (optional)
  • state (optional)
  • accountId (optional)
  • vmId (optional)

vmSnapshot[]

revertToVMSnapshot

  • vmSnapshotId (required)

VM


UI scenarios

Will use the existing UI for VM snapshots

  • Add snapshot action and [view snaptshots] in VM detail page

       Image Added

  • Snapshots List:

       Image Added

  • VM snapshot detail

       Image Added

Important

Do not delete .avhd files directly from the storage location.

...

  • The presence of a virtual machine snapshot reduces the disk performance of the virtual machine.
  • When you delete a snapshot, the .avhd files that store the snapshot data remain in the storage location until the virtual machine is shut down, turned off, or put into a saved state.
  • We do not recommend using snapshots on virtual machines that provide time-sensitive services, or when performance or the availability of storage space is critical.

 

see these type of considerations

// for KVM, only allow snapshot with memory when VM is in running state

...

  • .

...

            throw new InvalidParameterValueException("KVM VM does not allow to take a disk-only snapshot when VM is in running state");

        }

...

Important questions:


When we stop VM from cloudstack, on Hyper-V that VM is destroyed. When VM gets destroyed all the associated VM snapshots also get destroyed.

...