Support backup and restore of volumes created by VMDK driver¶
The volumes created by the VMDK driver are virtual disks stored in datastores
managed by ESX or vCenter server. Currently, the
backup-restore operations are not supported for these volumes. This
blueprint proposes adding support for these operations in VMDK driver.
The default implementation of
backup-restore does the
Attach the volume as a block device or file.
Backup\restore the file by calling backup service.
Detach the volume.
It uses an instance of
InitiatorConnector (determined by the back-end
driver protocol) to do the actual\detach. There is no
vmdk protocol and hence the attach\detach fails for volumes
created by the VMDK driver. This blueprint proposes adding support for
backup-restore for these volumes.
The change involves overriding the default implementations of
restore_backup methods in
VMwareEsxVmdkDriver. The steps in
backup_volume are listed below:
Create the backing VM if it not found.
Download the stream-optimized version of the virtual disk corresponding to the volume to a temporary directory.
backup_service.backup()method to backup the stream-optimized virtual disk file.
Delete the temporary file.
Following are the steps in
backup_service.restore()to download the stream-optimized virtual disk file to a temporary directory.
If the backing VM doesn’t exist (in the case of restoring the backup to create a new volume), import the stream-optimized virtual disk file to create a new backing VM.
If the backing VM exists, import the stream-optimized virtual disk file to create a temporary VM and reconfigure the backing VM to replace its virtual disk with that of the temporary VM.
Delete the temporary file and temporary VM.
HTTP read/write: It is possible to create an HTTP connection to read/write
from/to a virtual disk file in vCenter/ESX and an adapter can be written for
this connection to support some of the file operations required by the backup
drivers. This implementation works for both Swift and Ceph backup drivers. But
the TSM backup driver raises
InvalidBackup exception if the volume to be
backed up is not a block device or regular file.
Data model impact¶
REST API impact¶
Other end user impact¶
Other deployer impact¶
- Primary assignee:
- Other contributors: