'Copy data from snapshot to destination volume.'

def _copy_volume_from_snapshot(self, snapshot, volume, volume_size):

    LOG.debug('snapshot:    %(snap)s,    volume:    %(vol)s,    volume_size:    %(size)s', {'snap': snapshot.id, 'vol': volume.id, 'size': snapshot.volume_size})
    info_path = self._local_path_volume_info(snapshot.volume)
    snap_info = self._read_info_file(info_path)
    vol_dir = self._local_volume_dir(snapshot.volume)
    forward_file = snap_info[snapshot.id]
    forward_path = os.path.join(vol_dir, forward_file)
    img_info = self._qemu_img_info(forward_path)
    snapshot_path = os.path.join(vol_dir, img_info.backing_file)
    volume_path = self.local_path(volume)
    self._delete(volume_path)
    self._vhdutils.convert_vhd(snapshot_path, volume_path)
    self._vhdutils.resize_vhd(volume_path, (volume_size * units.Gi), is_file_max_size=False)
