This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
Deleting VDI snapshot data and retaining the snapshot metadata
A VDI snapshot is made up of both data and metadata. The data is the full image of the disk at the time the snapshot was taken. The metadata includes the changed block tracking information.
After the snapshot data on the host has been exported to the backup location, you can use the data_destroy
call to delete only the snapshot data and retain only the snapshot metadata on the host.
This action converts the snapshot that is stored on the host or SR into a smaller metadata-only snapshot.
The type
field of the snapshot changes to be cbt_metadata
.
Metadata-only snapshots are linked to the metadata-only snapshots that precede and follow them in time.
You can use the data_destroy
call only for snapshots for VDIs that have changed block tracking enabled.
Note:
The API also provides a
destroy
call, which deletes both the data in the snapshot and the metadata in the snapshot.
Do not use the destroy
call to delete snapshots that are part of a set of changed block tracking backups unless you are sure that you no longer need the changed block tracking metadata.
For example, use destroy
to remove a metadata-only snapshot that is older than age allowed by your retention policy.
Examples
You can use any of our supported language bindings to delete the data in a snapshot and convert the snapshot to a metadata only snapshot. The following examples show how to do it in Python and at the xe command line.
Python:
session.xenapi.VDI.data_destroy(<snapshot_vdi_ref>)
<!--NeedCopy-->
xe command line:
xe vdi-data-destroy uuid=<snapshot_vdi_uuid>
<!--NeedCopy-->
Errors
You might see the following errors when using this call:
VDI_MISSING:
-
The call cannot find the VDI snapshot.
Check that the reference or UUID you are using to refer to the VDI snapshot is correct. Check that the VDI exists.
VDI_NO_CBT_METADATA:
-
No changed block tracking metadata exists for this VDI snapshot.
Check that changed block tracking is enabled for the VDI. You cannot use the
data_destroy
call on VDIs that do not have changed block tracking enabled. For more insformation, see Using changed block tracking with a virtual disk image.
VDI_IN_USE:
-
The VDI snapshot is currently in use by another operation.
Check that the VDI snapshot is not being accessed by another client or operation. Check that the VDI is not attached to a VM.
If the VDI snapshot is connected to a VM snapshot by a VBD, you receive this error. Before you can run
VDI.data_destroy
on this VDI snapshot, you must remove the VM snapshot. UseVM.destroy
to remove the VM snapshot.
Checking the type of a VDI or VDI snapshot
The value of the type
VDI field shows what type of VDI or VDI snapshot an object is.
The values this field can have are stored in the vdi_type
enum.
You can query the value of this field by using the get_type
call.
A metadata-only VDI snapshot has the type cbt_metadata
.
Examples
You can use any of our supported language bindings to query the VDI type of a VDI or VDI snapshot. The following examples show how to do it in Python and at the xe command line.
Python:
vdi_type = session.xenapi.VDI.get_type(<snapshot_vdi_ref>)
<!--NeedCopy-->
xe command line:
xe vdi-param-get param-name=type uuid=<snapshot_vdi_uuid>
<!--NeedCopy-->
Share
Share
In this article
This Preview product documentation is Cloud Software Group Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Cloud Software Group Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Cloud Software Group product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.