Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent error on windows virtiofs mount #1793

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

z0rb
Copy link

@z0rb z0rb commented Dec 25, 2023

After installing WinFSP and the virtiofs driver in the provisioning phase, then configuring the service to autostart with sc config VirtioFsSvc binPath="C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" start=auto depend=VirtioFsDrv ... the virtiofs share gets mounted as a separate drive in Windows 10.
Guide: https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/Virtiofs:-Shared-file-system#setup-with-installer

image

I have no experience writing vagrant plugins. In my fork I have just tried to implement a NOOP so that the libvirt plugin doesn't error out because of the missing guest capability. This works for me as vagrant up succeeds and the share works properly.

Question for maintainers. Would this be ok to merge into main, to prevent the error? The capability obviously exists, but I do not know what would be acceptable for main.

Copy link

A docker image containing the code from this plugin to allow testing locally without installing
can be pulled from: ghcr.io/vagrant-libvirt/vagrant-libvirt:pr-1793-slim

If you need the image with the full dev toolchain, you can instead pull: ghcr.io/vagrant-libvirt/vagrant-libvirt:pr-1793

@z0rb
Copy link
Author

z0rb commented Dec 25, 2023

As a detail, the box I am using was build from the main branch of: https://github.com/ruzickap/ansible-role-virtio-win
With the addition of the following tasks:

  tasks:
    - name: Download WinFSP
      win_get_url:
        url: https://github.com/winfsp/winfsp/releases/download/v2.0/winfsp-2.0.23075.msi
        dest: "%HOMEDRIVE%\\winfsp.msi"
      register: result
      until: result is succeeded

    - name: Install WinFSP
      win_command: msiexec /i winfsp.msi /qn
      args:
        chdir: C:\

    - name: Download VirtioFS
      win_get_url:
        url: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win-guest-tools.exe
        dest: "%HOMEDRIVE%\\virtio-win-guest-tools.exe"
      register: result
      until: result is succeeded
      
    - name: Install VirtioFS
      win_command: virtio-win-guest-tools.exe -s
      args:
        chdir: C:\

    - name: Configure VirtioFS Service
      win_command: sc config VirtioFsSvc binPath="C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" start=auto depend=VirtioFsDrv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant