{"componentChunkName":"component---src-templates-post-template-js","path":"/win11-24h2-wsl-and-hyperv-en","result":{"data":{"markdownRemark":{"id":"d61d63d2-8889-531d-8c6b-993c8f436bb8","html":"<blockquote>\n<p>This page has been machine-translated from the <a href=\"/win11-24h2-wsl-and-hyperv\">original page</a>.</p>\n</blockquote>\n<h2 id=\"overview-of-the-problem-and-the-solution\" style=\"position:relative;\"><a href=\"#overview-of-the-problem-and-the-solution\" aria-label=\"overview of the problem and the solution permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Overview of the Problem and the Solution</h2>\n<p>A while after upgrading from Windows 10 22H2 to Windows 11 24H2, I noticed that I could no longer use WSL2 and Hyper-V virtual machines together.</p>\n<p>Specifically, while WSL was running, I could no longer start a Hyper-V virtual machine, and conversely, while a Hyper-V virtual machine was running, I could no longer start WSL.</p>\n<p>At that time, both WSL and Hyper-V virtual machines seemed to fail to start with error code <code class=\"language-text\">0x80070142</code>, which indicates insufficient resources.</p>\n<p>If this problem occurs, you can at least use either the virtual machine or WSL by stopping all Hyper-V virtual machines or shutting down WSL with <code class=\"language-text\">wsl --shutdown</code>.</p>\n<p>However, that was too inconvenient, so I investigated the cause and found a post saying that this happened because <code class=\"language-text\">.wslconfig</code> directly under USERPROFILE had been deleted for some reason and was not recreated.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 960px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/9a06bb0bfc195b07369eee6baf0314ab/c425d/image-20250810202603515.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 12.5%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAoElEQVQI1zWNWQ6DMBBDOUlZCoEszR5oIFK3+5/JHaL2w/KT7dE0fitwcYcJO252rSx1hIkHZXfomGGJ3VoQUoGyGzTlwib4RBufIQ0x9SZkNExYLNKDCYeZNDBVeVGeFCiz4MrVo1NCk8hn6uf/Tjowbuu+2Y431uOJdX8hlw9SfmDiGv0k0Y0C7ZX/XKBnsj68DEv1bpRoqetGXnfnzRdTY1xFwKKSRAAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/9a06bb0bfc195b07369eee6baf0314ab/8ac56/image-20250810202603515.webp 240w,\n/static/9a06bb0bfc195b07369eee6baf0314ab/d3be9/image-20250810202603515.webp 480w,\n/static/9a06bb0bfc195b07369eee6baf0314ab/e46b2/image-20250810202603515.webp 960w,\n/static/9a06bb0bfc195b07369eee6baf0314ab/b3d06/image-20250810202603515.webp 1279w\"\n              sizes=\"(max-width: 960px) 100vw, 960px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/9a06bb0bfc195b07369eee6baf0314ab/8ff5a/image-20250810202603515.png 240w,\n/static/9a06bb0bfc195b07369eee6baf0314ab/e85cb/image-20250810202603515.png 480w,\n/static/9a06bb0bfc195b07369eee6baf0314ab/d9199/image-20250810202603515.png 960w,\n/static/9a06bb0bfc195b07369eee6baf0314ab/c425d/image-20250810202603515.png 1279w\"\n            sizes=\"(max-width: 960px) 100vw, 960px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/9a06bb0bfc195b07369eee6baf0314ab/d9199/image-20250810202603515.png\"\n            alt=\"image-20250810202603515\"\n            title=\"image-20250810202603515\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>Reference: <a href=\"https://github.com/microsoft/WSL/issues/12116\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Error : Wsl/Service/CreateInstance/CreateVm/HCS/0x80070142 after upgrading to Win11 24H2 · Issue #12116 · microsoft/WSL</a></p>\n<p>So I tried manually creating <code class=\"language-text\">.wslconfig</code> with the following rough settings, and the problem was resolved. I was able to use WSL and virtual machines together again.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">[wsl2]\nmemory=4GB\nswap=0\nprocessors=2</code></pre></div>\n<p>Reference: <a href=\"https://learn.microsoft.com/ja-jp/windows/wsl/wsl-config\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Advanced settings configuration in WSL | Microsoft Learn</a></p>\n<h2 id=\"summary\" style=\"position:relative;\"><a href=\"#summary\" aria-label=\"summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summary</h2>\n<p>It was a subtle but annoying problem, so I am leaving it here as a quick note.</p>","fields":{"slug":"/win11-24h2-wsl-and-hyperv-en","tagSlugs":["/tag/notes/","/tag/windows/","/tag/english/"]},"frontmatter":{"date":"2025-08-10","description":"This post summarizes how to fix the issue where Hyper-V virtual machines and WSL can no longer be used together after upgrading to Windows 11 24H2.","tags":["Notes","Windows","English"],"title":"How to Fix the Issue Where Hyper-V Virtual Machines and WSL Can No Longer Be Used Together After Upgrading to Windows 11 24H2","socialImage":{"publicURL":"/static/a94cf69f03a66d399c1d2e7c17255d88/win11-24h2-wsl-and-hyperv.png"}}}},"pageContext":{"slug":"/win11-24h2-wsl-and-hyperv-en"}},"staticQueryHashes":["251939775","401334301","825871152"]}