Share via

Sandbox configuration error

Anonymous
2023-02-13T14:58:29+00:00

Using Windows Sandbox on Win-11 Pro,

Tried to map one of my Host-drives to the Sandbox by means of a configuration file but I keep getting an error message and don't get it working.

Configuration file:

<Configuration>

<MappedFolders>

&lt;MappedFolder&gt; 

  &lt;HostFolder&gt;D:\&lt;/HostFolder&gt; 

  &lt;SandboxFolder&gt;D:\&lt;/SandboxFolder&gt; 

  &lt;ReadOnly&gt;false&lt;/ReadOnly&gt; 

&lt;/MappedFolder&gt; 

</MappedFolders>

</Configuration>

Error message:

What do I do wrong?

Kind regards, Hans Troost

Windows for home | Windows 11 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2023-03-26T09:01:49+00:00

<HostFolder>D:&lt;/HostFolder> <---------- This is OK

<SandboxFolder>D:&lt;/SandboxFolder> <---------- This is wrong

I don't think you can map anything to "D:" in Sandbox, because within Sandbox there is only one partition C:, and D:\ is an invalid partition letter. You can map to anything under C:\ in Sandbox. For example:

<HostFolder>D:&lt;/HostFolder>

<SandboxFolder>C:\temp</SandboxFolder>

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-03-28T18:58:49+00:00

    Dear Zhen Jiang,

    Thanks for your reply. My apologies for the delay: my laptop was away to be repaired. Yesterday I got it back and today I reconfigured it.

    Your analysis of my problem seems to be correct and your recommendation is perfect, I just tested it and it works - I mapped my D:-drive (Host) to C:\D-drive (Sandbox) - and everything works fine now.

    Many thanks for picking up this question, which dates from Feb,13, so some time ago. I'm very happy to be able now to quickly setup a test-env for new/modified software hat I don't want to install before I'm sure that is does what I'm looking for.

    Best regards,

    Hans Troost

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-02-14T11:39:14+00:00

    Hello,

    Yes, this is a common way to do it, but you can set it to always open with Windows Sandbox.

    Best regards,

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2023-02-13T20:39:31+00:00

    Thanks Felipe for replying,

    Just read and tried your suggestion, but unfotunately it did'n't change anything: still same error.

    I keep looking further to helpful suggestions...

    Possibly it is my way of using it: I right-click the file and choose "Open" --> "with Windows Sandbox". Is that indeed the right way to do it?

    Regards, Hans Troost

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-02-13T17:17:55+00:00

    Hello, I'm Felipe and I'm an independent Community Expert, and I'll do my best to help you.

    It seems that the configuration file is missing the CreateInSandbox attribute, which is required to specify if the mapped folder should be created inside the sandbox or not. Try adding the following line to your configuration file:

    <CreateInSandbox>true</CreateInSandbox>

    So, the final configuration file should look like this:

    <Configuration>

    <MappedFolders>

    &lt;MappedFolder&gt;
    
      &lt;HostFolder&gt;D:\&lt;/HostFolder&gt;
    
      &lt;SandboxFolder&gt;D:\&lt;/SandboxFolder&gt;
    
      &lt;ReadOnly&gt;false&lt;/ReadOnly&gt;
    
      &lt;CreateInSandbox&gt;true&lt;/CreateInSandbox&gt;
    
    &lt;/MappedFolder&gt;
    

    </MappedFolders>

    </Configuration>

    Was this answer helpful?

    0 comments No comments