diff --git a/src/linux/init/config.cpp b/src/linux/init/config.cpp index 93a87a1d45..19dfb77a59 100644 --- a/src/linux/init/config.cpp +++ b/src/linux/init/config.cpp @@ -845,16 +845,16 @@ try } // - // Run the Plan 9 server. This requires a DrvFs mount for the socket file, - // so either fstab or automount must be enabled to have a chance for the - // mount to be available. + // Run the Plan 9 server. On WSL1 this requires a DrvFs mount for the socket + // file, so either fstab or automount must be enabled to have a chance for + // the mount to be available. WSL2 serves over an hvsocket and has no such + // dependency. // // N.B. Failure to start the server is non-fatal. // - unsigned int Plan9Port = LX_INIT_UTILITY_VM_INVALID_PORT; if ((WI_IsFlagClear(Config.FeatureFlags.value(), LxInitFeatureDisable9pServer)) && (Config.Plan9Enabled) && - (Config.AutoMount || Config.MountFsTab)) + (UtilIsUtilityVm() || Config.AutoMount || Config.MountFsTab)) { std::tie(Plan9Port, Config.Plan9ControlChannel) = StartPlan9Server(Plan9SocketPath, Config); }