You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Important

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

 

considerations, when using snapshots

  • 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

        if (userVmVo.getHypervisorType() == HypervisorType.KVM && userVmVo.getState() == State.Running && !snapshotMemory) {

            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.

To Overcome this we can export the VM which also contains the snapshots information.

 

When to export the VM

Exporting VM is a costly operation, we can have following set of options

  1. Export VM when we are stopping the VM.

    Pros
    1.  In this case we  have to perform the costly export operation only when it is needed(when we cannot avoid).
    2. VM snapshots will be fast as then it needs to keep only differential data.

    Cons
    1. stop will get affected, which we can make asynchronous and export VM only when the VM snapshots has been taken on that VM.
    2. What will be done if VM is started before the export operation has been completed?
    3. What will happen if primary goes down in middle of export operation or export operation has not yet started?
      1. whenever host or primary comes up first export the VM then delete it, if it has snapshots
      2. What state of that VM will be returned in hostVMstatereport for vmsync?

  2. Export VM at every snapshot

    Pros
    1. stop operation will not get affected

    Cons
    1. VM snapshots will be slow

 

Note: Importing VM will not be costly operation assuming that exported will be kept on primary and then will be imported as in place

 

 

 

 

 

 

 

  • No labels