 # TODO: integrate in xapi.js
 export_ = $coroutine ({vm, compress, onlyMetadata}) ->
   if vm.power_state is 'Running'
-    yield checkPermissionsForSnapshot.call(this, vm)
+    yield checkPermissionOnSrs.call(this, vm)
 
   stream = yield @getXAPI(vm).exportVm(vm._xapiId, {
     compress: compress ? true,

#---------------------------------------------------------------------

rollingSnapshot = $coroutine ({vm, tag, depth}) ->
  yield checkPermissionsForSnapshot.call(this, vm)
  yield @rollingSnapshotVm(vm, tag, depth)

rollingSnapshot.params = {


#---------------------------------------------------------------------

clone = $coroutine ({vm, name, full_copy}) ->
  yield checkPermissionOnSrs.call(this, vm)

  return @getXAPI(vm).cloneVm(vm._xapiRef, {
    nameLabel: name,
    fast: not full_copy
