18.08.2013 Views

Virtual Disk API Programming Guide - Documentation - VMware

Virtual Disk API Programming Guide - Documentation - VMware

Virtual Disk API Programming Guide - Documentation - VMware

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Designing vSphere Backup Solutions<br />

When applications perform random I/O or write to previously unallocated areas of thin‐provisioned disk,<br />

subsequent backups can be larger than expected, even with CBT enabled. In some cases, disk defragmentation<br />

might help reduce the size of backups.<br />

<strong>Virtual</strong> Machine Configuration<br />

Do not make verbatim copies of configuration files, which can change. For example, entries in the .vmx file<br />

point to the snapshot, not the base disk. The .vmx file contains virtual‐machine specific information about<br />

current disks, and attempting to restore this information could fail. Instead use PropertyCollector and keep<br />

a record of the ConfigInfo structure.<br />

About Changed Block Tracking<br />

QueryChanged<strong>Disk</strong>Areas("*") returns information about areas of a virtual disk that are in use (allocated).<br />

The current implementation depends on VMFS properties, similar to propertues that SAN transport mode<br />

uses to locate data on a SCSI LUN. Both rely on unallocated areas (file holes) in virtual disk, and the LazyZero<br />

designation for VMFS blocks. Thus, changed block tracking yields meaningful results only on VMFS. On other<br />

storage types, it either fails, or returns a single extent covering the entire disk.<br />

You should enable changed block tracking in the order recommended by “Enabling Changed Block Tracking”<br />

on page 70. The first time you call QueryChanged<strong>Disk</strong>Areas("*"), it should return allocated areas of virtual<br />

disk. Subsequent calls return changed areas, instead of allocated areas. If you call QueryChanged<strong>Disk</strong>Areas<br />

after a snapshot but before you enable changed block tracking, it also returns unallocated areas of virtual disk.<br />

With thin‐provisioned virtual disk this could be a large amount of zero data.<br />

The guest operating system has no visibility of changed block tracking. Once a virtual machine has written to<br />

a block on virtual disk, the block is considered in use. The information required for the "*" query is computed<br />

when changed block tracking is enabled, and the .ctk file is pre‐filled with allocated blocks. The mechanism<br />

cannot report changes made to virtual disk before changed block tracking was enabled.<br />

Windows and Linux Implementations<br />

The following sections discuss issues that depend on whether a virtual machine is running Windows or Linux.<br />

The <strong>VMware</strong> VSS Implementation<br />

On Windows Server 2008, disk UUIDs must be enabled for VSS quiesced snapshots. <strong>Disk</strong> UUIDs might not be<br />

enabled if a virtual machine was upgraded from virtual hardware version 4.<br />

<strong>VMware</strong> VSS does not support virtual machines with IDE disks, nor does it support virtual machines with an<br />

insufficient number of free SCSI slots.<br />

Before vSphere 5.1, reverting to a writable snapshot sometimes left orphaned virtual disks that the system<br />

never removed. In the vSphere 5.1 release, writable snapshots are correctly accounted for as sibling snapshots.<br />

This permits cleaner management, because the disk chain matches the snapshot hierarchy, and it avoids<br />

orphaned disks. Most backup software takes a read‐only snapshot so is not affected. VSS backup software may<br />

create two snapshots, one made writable by calling CreateSnapshot_task with the quiesce flag set true.<br />

To add support for granular application control, specify:<br />

whether pre‐freeze and post‐thaw scripts get invoked<br />

whether quiescing gets invoked<br />

VSS snapshot context (application, file system quiescing, and so forth)<br />

VSS backup context (full, differential, incremental)<br />

writers/components to be involved during quiescing<br />

whether to fail quiescing or continue if one of the writers fails to quiesce<br />

retry count<br />

<strong>VMware</strong>, Inc. 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!