VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
@Override
public VcTask body() throws Exception {
final VirtualDiskManager mgr = VcContext.getService().getVirtualDiskManager();
return new VcTask(TaskType.CopyVmdk,
mgr.copyVirtualDisk(srcDsPath, srcDc.getMoRef(),
dstDsPath, dstDc.getMoRef(), diskSpec, true),
callback);
}
});
return task;