Skip to content

Commit 73af76e

Browse files
authored
Merge pull request #301058 from PatAltimore/patricka-freshness2
Freshness review
2 parents f078b1b + 8884391 commit 73af76e

File tree

1 file changed

+36
-39
lines changed

1 file changed

+36
-39
lines changed

articles/iot-edge/how-to-share-windows-folder-to-vm.md

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,69 +7,69 @@ ms.service: azure-iot-edge
77
ms.custom: linux-related-content
88
services: iot-edge
99
ms.topic: how-to
10-
ms.date: 06/04/2024
10+
ms.date: 06/09/2025
1111
ms.author: patricka
1212
---
1313

1414
# Share a Windows folder with Azure IoT Edge for Linux on Windows
1515

1616
[!INCLUDE [iot-edge-version-all-supported](includes/iot-edge-version-all-supported.md)]
1717

18-
The Azure IoT Edge for Linux on Windows (EFLOW) virtual machine is isolated from the Windows host OS and the virtual machine doesn't have access to the host file system. By default, the EFLOW virtual machine has its own file system and has no access to the folders or files on the host computer. The *EFLOW file and folder sharing mechanism* provides a way to share Windows files and folders to the CBL-Mariner Linux EFLOW VM.
18+
The Azure IoT Edge for Linux on Windows (EFLOW) virtual machine is isolated from the Windows host OS, and the virtual machine can't access the host file system. By default, the EFLOW virtual machine has its own file system and can't access folders or files on the host computer. The *EFLOW file and folder sharing mechanism* lets you share Windows files and folders with the CBL-Mariner Linux EFLOW VM.
1919

20-
This article shows you how to enable the folder sharing between the Windows host OS and the EFLOW virtual machine.
20+
This article shows you how to share a folder between the Windows host OS and the EFLOW virtual machine.
2121

2222
## Prerequisites
2323
- Azure IoT Edge for Linux on Windows 1.4.4 LTS update or higher. For more information about EFLOW release notes, see [EFLOW Releases](https://aka.ms/AzEFLOW-Releases).
24-
- A machine with an x64/x86 processor.
25-
- Windows 10/11 (21H2) or higher with [November 2022](https://support.microsoft.com/topic/november-15-2022-kb5020030-os-builds-19042-2311-19043-2311-19044-2311-and-19045-2311-preview-237a9048-f853-4e29-a3a2-62efdbea95e2) update applied.
24+
- A machine with an x64 or x86 processor.
25+
- Windows 10 or 11 (21H2) or higher with the [November 2022](https://support.microsoft.com/topic/november-15-2022-kb5020030-os-builds-19042-2311-19043-2311-19044-2311-and-19045-2311-preview-237a9048-f853-4e29-a3a2-62efdbea95e2) update applied.
2626

27-
If you don't have an EFLOW device ready, you should create one before continuing with this guide. Follow the steps in [Create and provision an IoT Edge for Linux on Windows device using symmetric keys](how-to-provision-single-device-linux-on-windows-symmetric.md) to install, deploy, and provision EFLOW.
27+
If you don't have an EFLOW device ready, create one before you continue with this guide. Follow the steps in [Create and provision an IoT Edge for Linux on Windows device using symmetric keys](how-to-provision-single-device-linux-on-windows-symmetric.md) to install, deploy, and provision EFLOW.
2828

29-
## How it works?
29+
## How it works
3030

31-
The Azure IoT Edge for Linux on Windows file and folder sharing mechanism is implemented using [virtiofs](https://virtio-fs.gitlab.io/) technology. *Virtiofs* is a shared file system that lets virtual machines access a directory tree on the host OS. Unlike other approaches, it's designed to offer local file system semantics and performance. *Virtiofs* isn't a network file system repurposed for virtualization. It's designed to take advantage of the locality of virtual machines and the hypervisor. It takes advantage of the virtual machine's co-location with the hypervisor to avoid overhead associated with network file systems.
31+
Azure IoT Edge for Linux on Windows uses [virtiofs](https://virtio-fs.gitlab.io/) technology for file and folder sharing. *Virtiofs* is a shared file system that lets virtual machines use a directory tree on the host OS. Unlike other approaches, it's designed for local file system semantics and performance. *Virtiofs* isn't a network file system repurposed for virtualization. It uses the locality of virtual machines and the hypervisor to avoid the overhead of network file systems.
3232

33-
:::image type="content" source="media/how-to-share-windows-folder-to-vm/folder-sharing-virtiofs.png" alt-text="Screenshot of a Windows folder shared with the EFLOW virtual machine using Virtio-FS technology.":::
33+
:::image type="content" source="media/how-to-share-windows-folder-to-vm/folder-sharing-virtiofs.png" alt-text="Screenshot of a Windows folder shared with the EFLOW virtual machine by using Virtio-FS technology.":::
3434

35-
Only Windows folders can be shared to the EFLOW Linux VM and not the other way. Also, for security reasons, when setting the folder sharing mechanism, the user must provide a *root folder* and all the shared folders must be under that *root folder*.
35+
You can only share Windows folders to the EFLOW Linux VM, not the other way. For security, when you set up folder sharing, you need to provide a *root folder*, and all shared folders must be under that *root folder*.
3636

37-
Before starting with the adding and removing share mechanisms, let's define four concepts:
37+
Before you add or remove shared folders, review these four concepts:
3838

39-
- **Root folder**: Windows folder that is the root path containing subfolders to be shared to the EFLOW VM. The root folder isn't shared to the EFLOW VM. Only the subfolders under the root folder are shared to the EFLOW VM.
40-
- **Shared folder**: A Windows folder that's under the *root folder* and is shared with the EFLOW VM. All the content inside this folder is shared with the EFLOW VM.
41-
- **Mounting point**: Path inside the EFLOW VM where the Windows folder content is placed.
42-
- **Mounting option**: *Read-only* or *read and write* access. Controls the file access of the mounted folder inside the EFLOW VM.
39+
- **Root folder**: The Windows folder that is the root path for subfolders you share with the EFLOW VM. The root folder itself isn't shared. Only subfolders under the root folder are shared.
40+
- **Shared folder**: A Windows folder under the *root folder* that you share with the EFLOW VM. All content in this folder is shared with the EFLOW VM.
41+
- **Mounting point**: The path inside the EFLOW VM where the Windows folder content appears.
42+
- **Mounting option**: *Read-only* or *read and write* access. This setting controls file access for the mounted folder inside the EFLOW VM.
4343

4444
## Add shared folders
45-
The following steps provide example EFLOW PowerShell commands to share one or more Windows host OS folders with the EFLOW virtual machine.
45+
These steps show example EFLOW PowerShell commands to share one or more Windows host OS folders with the EFLOW virtual machine.
4646

4747
>[!NOTE]
48-
>If you're using Windows 10, ensure to reboot your Windows host OS after your fresh MSI installation or update before adding the Windows shared folders to the EFLOW VM.
48+
>If you're using Windows 10, reboot your Windows host OS after a fresh MSI installation or update before adding the Windows shared folders to the EFLOW VM.
4949
50-
1. Start by creating a new root shared folder. Go to **File Explorer** and choose a location for the *root folder* and create the folder.
50+
1. Create a new root shared folder. Go to **File Explorer**, choose a location for the *root folder*, and create the folder.
5151

52-
For example, create a *root folder* under *C:\Shared* named **EFLOW-Shared**.
52+
For example, create a *root folder* named *EFLOW-Shared* under *C:\Shared*.
5353

54-
:::image type="content" source="media/how-to-share-windows-folder-to-vm/root-folder.png" alt-text="Screenshot of the C:\Shared folder that includes EFLOW-Shared folder.":::
54+
:::image type="content" source="media/how-to-share-windows-folder-to-vm/root-folder.png" alt-text="Screenshot of the C:\Shared folder that shows the EFLOW-Shared folder.":::
5555

56-
1. Create one or more *shared folders* to be shared with the EFLOW virtual machine. Shared folders should be created under the *root folder* from the previous step.
56+
1. Create one or more *shared folders* under the *root folder* to share with the EFLOW virtual machine.
5757

58-
For example, create two folders one named **Read-Access** and one named **Read-Write-Access**.
58+
For example, create two folders: one named **Read-Access** and one named **Read-Write-Access**.
5959

6060
:::image type="content" source="media/how-to-share-windows-folder-to-vm/shared-folders.png" alt-text="Screenshot of Windows shared folders Read-Access and Read-Write-Access.":::
6161

6262
1. Within the *Read-Access* shared folder, create a sample file that we'll later read inside the EFLOW virtual machine.
6363

64-
For example, using a text editor, create a file named *Hello-World.txt* within the *Read-Access* folder and save some text in the file.
64+
For example, use a text editor to create a file named *Hello-World.txt* in the *Read-Access* folder and save some text in the file.
6565

66-
1. Using a text editor, create the shared folder configuration file. This file contains the information about the folders to be shared with the EFLOW VM including the mounting points and the mounting options. For more information about the JSON configuration file, see [PowerShell functions for IoT Edge for Linux on Windows](reference-iot-edge-for-linux-on-windows-functions.md).
66+
1. Use a text editor to create the shared folder configuration file. This file has information about the folders to share with the EFLOW VM, including the mount points and options. For more information about the JSON configuration file, see [PowerShell functions for IoT Edge for Linux on Windows](reference-iot-edge-for-linux-on-windows-functions.md).
6767

68-
For example, using the previous scenario, we'll share the two *shared folders* we created under the *root folder*.
69-
- *Read-Access* shared folder is mounted in the EFLOW virtual machine under the path */tmp/host-read-access* with *read-only* access.
70-
- *Read-Write-Access* shared folder is mounted in the EFLOW virtual machine under the path */tmp/host-read-write-access* with *read and write* access.
68+
For example, in this scenario, share the two *shared folders* you created under the *root folder*.
69+
- The *Read-Access* shared folder is mounted in the EFLOW virtual machine under the path */tmp/host-read-access* with *read-only* access.
70+
- The *Read-Write-Access* shared folder is mounted in the EFLOW virtual machine under the path */tmp/host-read-write-access* with *read and write* access.
7171

72-
Create the JSON configuration file named **sharedFolders.json** within the *root folder* *EFLOW-Shared* with the following contents:
72+
Create a JSON configuration file named *sharedFolders.json* in the *root folder* *EFLOW-Shared* with the following contents:
7373

7474
```json
7575
[
@@ -91,30 +91,27 @@ The following steps provide example EFLOW PowerShell commands to share one or mo
9191
]
9292
```
9393

94-
1. Open an elevated *PowerShell* session by starting with **Run as Administrator**.
94+
1. Open an elevated *PowerShell* session by selecting **Run as Administrator**.
9595

96-
1. Create the shared folder assignation using the configuration file (*sharedFolders.json*) previously created.
96+
1. Create the shared folder assignment by using the configuration file (*sharedFolders.json*) you created earlier.
9797

9898
```powershell
9999
Add-EflowVmSharedFolder -sharedFoldersJsonPath "C:\Shared\EFLOW-Shared\sharedFolders.json"
100100
```
101101

102-
1. Once the cmdlet finished, the EFLOW virtual machine should have access to the shared folders. Connect to the EFLOW virtual machine and check the folders are correctly shared.
103-
```powershell
104-
Connect-EflowVm
105-
```
102+
1. After the cmdlet finishes, the EFLOW virtual machine can access the shared folders. Connect to the EFLOW virtual machine and check that the folders are shared correctly.
106103

107-
1. Go to the *Read-Access* shared folder (mounted under */tmp/host-read-access*) and check the content of the *Hello-World.txt* file.
104+
1. Go to the *Read-Access* shared folder (mounted under */tmp/host-read-access*) and check the contents of the *Hello-World.txt* file.
108105

109106
>[!NOTE]
110-
>By default, all shared folders are shared under *root* ownership. To access the folder, you should log in as root using `sudo su` or change the folder ownership to *iotedge-user* using `chown` command.
107+
>By default, all shared folders are owned by *root*. To access the folder, sign in as root using `sudo su` or change the folder ownership to *iotedge-user* using the `chown` command.
111108

112109
```bash
113110
sudo su
114111
cd /tmp/host-read-access
115112
cat Hello-World.txt
116113
```
117-
If everything was successful, you should be able to see the contents of the *Hello-World.txt* file within the EFLOW virtual machine. Verify write access by creating a file inside the */tmp/host-read-write-access* and then checking the contents of the new created file inside the *Read-Write-Access* Windows host folder.
114+
If everything was successful, you see the contents of the *Hello-World.txt* file in the EFLOW virtual machine. To verify write access, create a file in */tmp/host-read-write-access* and then check the contents of the new file in the *Read-Write-Access* Windows host folder.
118115

119116
## Check shared folders
120117
The following steps provide example EFLOW PowerShell commands to check the Windows shared folders and options (access permissions and mounting point) with the EFLOW virtual machine.
@@ -131,7 +128,7 @@ For more information about the `Get-EflowVmSharedFolder` cmdlet, see [PowerShell
131128

132129

133130
## Remove shared folders
134-
The following steps provide example EFLOW PowerShell commands to stop sharing a Windows shared folder with the EFLOW virtual machine.
131+
The following steps provide example EFLOW PowerShell commands to stop sharing a Windows shared folder with the EFLOW virtual machine.
135132

136133
1. Open an elevated PowerShell session by starting with **Run as Administrator**.
137134

@@ -143,4 +140,4 @@ The following steps provide example EFLOW PowerShell commands to stop sharing a
143140
For more information about the `Remove-EflowVmSharedFolder` cmdlet, see [PowerShell functions for IoT Edge for Linux on Windows](reference-iot-edge-for-linux-on-windows-functions.md).
144141

145142
## Next steps
146-
Follow the steps in [Common issues and resolutions for Azure IoT Edge for Linux on Windows](troubleshoot-iot-edge-for-linux-on-windows-common-errors.md) to troubleshoot any issues encountered when setting up IoT Edge for Linux on Windows.
143+
Follow the steps in [Common issues and resolutions for Azure IoT Edge for Linux on Windows](troubleshoot-iot-edge-for-linux-on-windows-common-errors.md) to troubleshoot issues you encounter when setting up IoT Edge for Linux on Windows.

0 commit comments

Comments
 (0)