diff --git a/src/nvc_mount.c b/src/nvc_mount.c index 5dac863c..67860ad2 100644 --- a/src/nvc_mount.c +++ b/src/nvc_mount.c @@ -1068,8 +1068,9 @@ nvc_device_mig_caps_mount(struct nvc_context *ctx, const struct nvc_container *c // Check if NV_CAPS_MODULE_NAME exists as a major device, and if so, // mount in the appropriate /dev based capabilities as devices. if ((nvcaps_major = nvidia_get_chardev_major(NV_CAPS_MODULE_NAME)) != -1) { - if (setup_mig_minor_cgroups(&ctx->err, cnt, nvcaps_major, &dev->node) < 0) - goto fail; + if (!(cnt->flags & OPT_NO_CGROUPS)) + if (setup_mig_minor_cgroups(&ctx->err, cnt, nvcaps_major, &dev->node) < 0) + goto fail; } // Set the return value to indicate success.