# Name

VixDiskLib_SpaceNeededForClone

# Description

    VixError
    VixDiskLib_SpaceNeededForClone(VixDiskLibHandle srcHandle,
                                   VixDiskLibDiskType diskType,
                                   uint64 *spaceNeeded);

This function computes the space required in bytes to clone a virtual disk.

# Parameters

srcHandle
  Handle to the disk to be copied.
diskType
  The type of the to be created disk. If diskType is set to VIXDISKLIB_DISK_UNKNOWN, the source disk type is assumed.
spaceNeeded
  Space needed in bytes for the new disk.

# Return Value

VIX_OK if the function succeeded, otherwise an appropriate VIX error code.

# Remarks

- Calculations take into account possible format conversion.

# Example

       vixError = VixDiskLib_SpaceNeededForClone(child.Handle(),
                                                 VIXDISKLIB_DISK_VMFS_FLAT,
                                                 &spaceReq);

Copyright (C) 2007-2015 VMware, Inc. All rights reserved.