diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 929d117..c5e03c4 100755
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -2032,25 +2032,26 @@
 		return err
 	}
 	_ = dh.ReasonUpdate(ctx, cmn.DrStartingOpenomci, !dh.IsReconciling() || dh.IsReconcilingReasonUpdate())
+	if !dh.IsReconciling() && !dh.GetSkipOnuConfigEnabled() {
+		/* this might be a good time for Omci Verify message?  */
+		verifyExec := make(chan bool)
+		omciVerify := otst.NewOmciTestRequest(log.WithSpanFromContext(context.TODO(), ctx),
+			dh.device.Id, pDevEntry.PDevOmciCC, false,
+			true, true) //exclusive and allowFailure (anyway not yet checked)
+		omciVerify.PerformOmciTest(log.WithSpanFromContext(context.TODO(), ctx), verifyExec)
 
-	/* this might be a good time for Omci Verify message?  */
-	verifyExec := make(chan bool)
-	omciVerify := otst.NewOmciTestRequest(log.WithSpanFromContext(context.TODO(), ctx),
-		dh.device.Id, pDevEntry.PDevOmciCC, false,
-		true, true) //exclusive and allowFailure (anyway not yet checked)
-	omciVerify.PerformOmciTest(log.WithSpanFromContext(context.TODO(), ctx), verifyExec)
-
-	/* 	give the handler some time here to wait for the OMCi verification result
-	after Timeout start and try MibUpload FSM anyway
-	(to prevent stopping on just not supported OMCI verification from ONU) */
-	select {
-	case <-time.After(((cmn.CDefaultRetries+1)*otst.CTestRequestOmciTimeout + 1) * time.Second):
-		logger.Warnw(ctx, "omci start-verification timed out (continue normal)", log.Fields{"device-id": dh.DeviceID})
-	case testresult := <-verifyExec:
-		logger.Infow(ctx, "Omci start verification done", log.Fields{"device-id": dh.DeviceID, "result": testresult})
-	case <-dh.deviceDeleteCommChan:
-		logger.Warnw(ctx, "Deleting device, stopping the omci test activity", log.Fields{"device-id": dh.DeviceID})
-		return nil
+		/* 	give the handler some time here to wait for the OMCi verification result
+		after Timeout start and try MibUpload FSM anyway
+		(to prevent stopping on just not supported OMCI verification from ONU) */
+		select {
+		case <-time.After(((cmn.CDefaultRetries+1)*otst.CTestRequestOmciTimeout + 1) * time.Second):
+			logger.Warnw(ctx, "omci start-verification timed out (continue normal)", log.Fields{"device-id": dh.DeviceID})
+		case testresult := <-verifyExec:
+			logger.Infow(ctx, "Omci start verification done", log.Fields{"device-id": dh.DeviceID, "result": testresult})
+		case <-dh.deviceDeleteCommChan:
+			logger.Warnw(ctx, "Deleting device, stopping the omci test activity", log.Fields{"device-id": dh.DeviceID})
+			return nil
+		}
 	}
 
 	/* In py code it looks earlier (on activate ..)
@@ -4205,7 +4206,7 @@
 		}()
 	}
 	dh.mutexReconcilingFlag.Lock()
-	if skipOnuConfig {
+	if skipOnuConfig || dh.GetSkipOnuConfigEnabled() {
 		dh.reconciling = cSkipOnuConfigReconciling
 	} else {
 		dh.reconciling = cOnuConfigReconciling
@@ -4677,6 +4678,11 @@
 	return dh.pOpenOnuAc.ExtendedOmciSupportEnabled
 }
 
+// GetExtendedOmciSupportEnabled - TODO: add comment
+func (dh *deviceHandler) GetSkipOnuConfigEnabled() bool {
+	return dh.pOpenOnuAc.skipOnuConfig
+}
+
 // InitPmConfigs - TODO: add comment
 func (dh *deviceHandler) InitPmConfigs() {
 	dh.pmConfigs = &voltha.PmConfigs{}
diff --git a/internal/pkg/core/openonu.go b/internal/pkg/core/openonu.go
index 9fa2597..f1b5581 100755
--- a/internal/pkg/core/openonu.go
+++ b/internal/pkg/core/openonu.go
@@ -21,15 +21,16 @@
 	"context"
 	"errors"
 	"fmt"
-	grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
-	"github.com/opencord/voltha-lib-go/v7/pkg/db"
-	vgrpc "github.com/opencord/voltha-lib-go/v7/pkg/grpc"
-	codes "google.golang.org/grpc/codes"
 	"hash/fnv"
 	"strings"
 	"sync"
 	"time"
 
+	grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
+	"github.com/opencord/voltha-lib-go/v7/pkg/db"
+	vgrpc "github.com/opencord/voltha-lib-go/v7/pkg/grpc"
+	codes "google.golang.org/grpc/codes"
+
 	conf "github.com/opencord/voltha-lib-go/v7/pkg/config"
 	"github.com/opencord/voltha-protos/v5/go/adapter_service"
 	"github.com/opencord/voltha-protos/v5/go/common"
@@ -97,6 +98,7 @@
 	dlToOnuTimeout4M            time.Duration
 	rpcTimeout                  time.Duration
 	maxConcurrentFlowsPerUni    int
+	skipOnuConfig               bool
 }
 
 // NewOpenONUAC returns a new instance of OpenONU_AC
@@ -156,6 +158,7 @@
 	openOnuAc.pDownloadManager = swupg.NewAdapterDownloadManager(ctx)
 	openOnuAc.pFileManager = swupg.NewFileDownloadManager(ctx)
 	openOnuAc.pFileManager.SetDownloadTimeout(ctx, cfg.DownloadToAdapterTimeout)
+	openOnuAc.skipOnuConfig = cfg.SkipOnuConfig
 
 	return &openOnuAc
 }
@@ -265,6 +268,7 @@
 	var handler *deviceHandler
 	if handler = oo.getDeviceHandler(ctx, device.Id, false); handler == nil {
 		handler := newDeviceHandler(ctx, oo.coreClient, oo.eventProxy, device, oo)
+		logger.Infow(ctx, "reconciling-device  skip-onu-config value ", log.Fields{"device-id": device.Id, "parent-id": device.ParentId, "skip-onu-config": oo.skipOnuConfig})
 		oo.addDeviceHandlerToMap(ctx, handler)
 		handler.device = device
 		if err := handler.updateDeviceStateInCore(log.WithSpanFromContext(context.Background(), ctx), &ca.DeviceStateFilter{
