{"record":{"id":"ce91413305994320","repo":"hashicorp/vagrant","slug":"hyper-v-access-check-has-failed-for-the-configured","errorCode":null,"errorMessage":"Hyper-V access check has failed for the configured destination. This\nis usually caused by running on a non-system drive which is missing\nrequired permissions. Running the following command may resolve the\nproblem:\n\n  icacls.exe %{root_dir} /T /Q /grant \"NT AUTHORITY\\SYSTEM:(IO)(CI)(F)\"","messagePattern":"Hyper-V access check has failed for the configured destination\\. This\nis usually caused by running on a non-system drive which is missing\nrequired permissions\\. Running the following command may resolve the\nproblem:\n\n  icacls\\.exe %(.+?) /T /Q /grant \"NT AUTHORITY\\\\SYSTEM:\\(IO\\)\\(CI\\)\\(F\\)\"","errorType":"exception","errorClass":"VagrantPlugins::HyperV::Errors::SystemAccessRequired","httpStatus":null,"severity":"error","filePath":"plugins/providers/hyperv/action/check_access.rb","lineNumber":18,"sourceCode":"# Copyright IBM Corp. 2010, 2025\n# SPDX-License-Identifier: BUSL-1.1\n\nmodule VagrantPlugins\n  module HyperV\n    module Action\n      class CheckAccess\n        def initialize(app, env)\n          @app    = app\n        end\n\n        def call(env)\n          env[:ui].output(\"Verifying Hyper-V is accessible...\")\n          result = env[:machine].provider.driver.execute(:check_hyperv_access,\n            \"Path\" => Vagrant::Util::Platform.wsl_to_windows_path(env[:machine].data_dir).gsub(\"/\", \"\\\\\")\n          )\n          if !result[\"result\"]\n            raise Errors::SystemAccessRequired,\n              root_dir: result[\"root_dir\"]\n          end\n\n          @app.call(env)\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":28,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/hyperv/action/check_access.rb#L1-L28","documentation":"The Hyper-V provider's CheckAccess action runs the check_hyperv_access PowerShell script against the machine's data dir (WSL-translated to a Windows path). If Hyper-V reports the path inaccessible (result false), SystemAccessRequired is raised with root_dir; the message prescribes granting NT AUTHORITY\\SYSTEM full control over that tree via icacls.exe.","triggerScenarios":"`vagrant up --provider=hyperv` when the .vagrant machine data dir sits on a non-system drive whose ACLs do not let the SYSTEM account (used by Hyper-V for import/export) access the files.","commonSituations":"Projects on secondary drives (D:, E:); restrictive corporate ACLs or disabled inheritance; VAGRANT_HOME relocated to a non-system volume.","solutions":["Run the exact icacls command from the message: icacls.exe <root_dir> /T /Q /grant \"NT AUTHORITY\\SYSTEM:(IO)(CI)(F)\"","Or relocate the project (and VAGRANT_HOME) to the system drive","Re-run `vagrant up` after granting; verify inheritance with `icacls <dir>`"],"exampleFix":"# before: project on D:\\ with default ACLs -> SystemAccessRequired\n\n# after (admin shell)\nicacls.exe D:\\projects\\demo\\.vagrant /T /Q /grant \"NT AUTHORITY\\SYSTEM:(IO)(CI)(F)\"","handlingStrategy":"validation","validationCode":"# preflight: grant SYSTEM access to the data dir before vagrant up (admin shell)\nicacls.exe .\\.vagrant /T /Q /grant \"NT AUTHORITY\\SYSTEM:(IO)(CI)(F)\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep Hyper-V projects and VAGRANT_HOME on the system drive when possible","Apply the SYSTEM grant once in machine bootstrap scripts for non-system drives","Re-check ACLs after corporate GPO changes or drive migrations"],"tags":["vagrant","hyperv","windows","acl","permissions"],"backgroundTag":"permission-denied","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}