engineering:computer_science:linux:kvm:mount_viofs_windows_guest

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
engineering:computer_science:linux:kvm:mount_viofs_windows_guest [2024/08/16 13:56] – removed - external edit (Unknown date) 127.0.0.1engineering:computer_science:linux:kvm:mount_viofs_windows_guest [2024/08/16 13:56] (current) – ↷ Page moved from refractor_computer_science:linux:kvm:mount_viofs_windows_guest to engineering:computer_science:linux:kvm:mount_viofs_windows_guest carlossousa
Line 1: Line 1:
 +====== Mounting Shared File System (directory) from KVM Host in Windows Guest ======
 +
 +[[https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/Virtiofs:-Shared-file-system|Original Source - Virtiofs Documentation / github Wiki]]
 +
 +  * Start by launching virt-manager
 +  * Select your Virtual Machine
 +  * You want to go to the View / Details sub section. Where you can add / edit hardware
 +  * Go to the Memory Element and Check / Activate "Enable shared memory"
 +  * Add a new Hardware , Type "Filesystem", "Source Path" being the folder you want to share with your Windows Guest (eg: /home/user/sharing), "Target Path" being a Tag that you will use to identify it (eg: popos-sharing)
 +  * Start your Windows Guest
 +  * Install WinFSP, you need at least the Core Module - [[https://github.com/winfsp/winfsp|winfsp - GitHub page]]
 +  * Install virtio-win-guest-tools, you need at least the viofs module - [[https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/|Fedora People - virtio direct downloads]]
 +  * If you just want to share a single folder, you can just start the service and you're done (command: sc start VirtioFsSvc)
 +
 +===== Mounting multiple directories on the same Guest =====
 +
 +  * Stop the VirtioFsSvc (command: sc stop VirtioFsSvc)
 +  * Disable the Service from auto start (command: sc config VirtioFsSvc start=demand)
 +  * Generate a configuration that is required with the following command. Remember to adapt to your virtiofs.exe location
 +
 +<code>
 +"C:\Program Files (x86)\WinFsp\bin\fsreg.bat" virtiofs "<path to the binary>\virtiofs.exe" "-t %1 -m %2"
 +
 +</code>
 +  * Mount your folder with the following command:
 +
 +<code>
 +"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsZ mount_tag0 Z:
 +
 +</code>
 +
 +Note 1: "viofsZ" letter and "Z:" must match. This is the letter that the drive will be mounted to.
 +
 +Note 2: "popos-sharing" is the tag you used when adding the Filesystem (Target Path)
 +
 +  * Repeat for other folders you want / need.
 +