'Creates file backing for virtual disk.'

def _create_disk_backing(self, disk_type, vmdk_ds_file_path):

    cf = self._session.vim.client.factory
    disk_device_bkng = cf.create('ns0:VirtualDiskFlatVer2BackingInfo')
    if (disk_type == VirtualDiskType.EAGER_ZEROED_THICK):
        disk_device_bkng.eagerlyScrub = True
    elif (disk_type == VirtualDiskType.THIN):
        disk_device_bkng.thinProvisioned = True
    disk_device_bkng.fileName = (vmdk_ds_file_path or '')
    disk_device_bkng.diskMode = 'persistent'
    return disk_device_bkng
