'Create snapshots of a Cinder volume via libvirt.
:param instance: VM instance object reference
:param volume_id: id of volume being snapshotted
:param create_info: dict of information used to create snapshots
- snapshot_id : ID of snapshot
- type : qcow2 / <other>
- new_file : qcow2 file created by Cinder which
becomes the VM\'s active image after
the snapshot is complete'

def volume_snapshot_create(self, context, instance, volume_id, create_info):

    LOG.debug('volume_snapshot_create:    create_info:    %(c_info)s', {'c_info': create_info}, instance=instance)
    try:
        guest = self._host.get_guest(instance)
    except exception.InstanceNotFound:
        raise exception.InstanceNotRunning(instance_id=instance.uuid)
    if (create_info['type'] != 'qcow2'):
        msg = (_('Unknown    type:    %s') % create_info['type'])
        raise exception.InternalError(msg)
    snapshot_id = create_info.get('snapshot_id', None)
    if (snapshot_id is None):
        msg = _('snapshot_id    required    in    create_info')
        raise exception.InternalError(msg)
    try:
        self._volume_snapshot_create(context, instance, guest, volume_id, create_info['new_file'])
    except Exception:
        with excutils.save_and_reraise_exception():
            LOG.exception(_('Error    occurred    during    volume_snapshot_create,    sending    error    status    to    Cinder.'), instance=instance)
            self._volume_snapshot_update_status(context, snapshot_id, 'error')
    self._volume_snapshot_update_status(context, snapshot_id, 'creating')
    def _wait_for_snapshot():
        snapshot = self._volume_api.get_snapshot(context, snapshot_id)
        if (snapshot.get('status') != 'creating'):
            self._volume_refresh_connection_info(context, instance, volume_id)
            raise loopingcall.LoopingCallDone()
    timer = loopingcall.FixedIntervalLoopingCall(_wait_for_snapshot)
    timer.start(interval=0.5).wait()
