def copy_virtual_disk(session, dc_ref, source, dest):
 LOG.debug('Copying Virtual Disk %(source)s to %(dest)s', {'source': source, 'dest': dest})
 vim = session.vim
 vmdk_copy_task = session._call_method(vim, 'CopyVirtualDisk_Task', vim.service_content.virtualDiskManager, sourceName=source, sourceDatacenter=dc_ref, destName=dest)
 session._wait_for_task(vmdk_copy_task)
 LOG.debug('Copied Virtual Disk %(source)s to %(dest)s', {'source': source, 'dest': dest})

def copy_virtual_disk ( session , dc_ref , source , dest ) : LOG . debug ( 'Copying Virtual Disk %(source)s to %(dest)s' , { 'source' : source , 'dest' : dest } ) vim = session . vim vmdk_copy_task = session . _call_method ( vim , 'CopyVirtualDisk_Task' , vim . service_content . virtualDiskManager , sourceName = source , sourceDatacenter = dc_ref , destName = dest ) session . _wait_for_task ( vmdk_copy_task ) LOG . debug ( 'Copied Virtual Disk %(source)s to %(dest)s' , { 'source' : source , 'dest' : dest } )
copy a sparse virtual disk to a thin virtual disk .