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

Need to restart the multipass VM for samba shares to work properly. #3551

Open
micheldiemer opened this issue Jun 26, 2024 · 1 comment
Open
Labels
bug needs triage Issue needs to be triaged

Comments

@micheldiemer
Copy link

Description
I have a shared folder in Windows. I have created a specific local user for this kind of shared. The shared folder is mounted on the multipass VM startup on /etc/fstab. The driver is Hyper-V. When booting up my computer, connecting to the VM is very slow and the folders are not shared.

To Reproduce

  1. Use Hyper-V and create a local user in windows
  2. Using windows, share a folder
  3. Install samba client on the multipass VM and mount the share in etc/fstab with the following settings : //WINDOWS-PC/multipass-bin /usr/local/smbbin cifs,vers=3.0,credentials=/root/.smbcredentials,uid=1000,gid=33,actimeo=0,closetimeo=0,iocharset=utf8,forceuid,forcegid,domain=WORKGROUP,mfsymlinks,dir_mode=02755,file_mode=0755,noperm 0 0
  4. Restart the VM. Make sure that the shared folders are working.
  5. Restart the Windows computer. Quite often, if not all the time, the shared folders are not working. multipass restart virtualmachinewithmanualsharedfolders is required.

Expected behavior
I want shared folders to work all the time, having no need to restart the virtual machine for this reason.

Logs
See attached file

In particular these two errors :

[sshfs-mount-handler] There was an error with sshfs_server for instance 'dev' with path "/var/www/gsbpesanti.lan": Crashed - program: C:/Program Files/Multipass/bin/sshfs_server; error: Process crashed

[sshfs mount] Caught an unhandled exception: unable to create a channel for remote process: 'findmnt --source :C:/Users/Michel/Documents/A/Informatique/ETABLISSEMENTS/IFIDE SUP'FORMATION/2023-2024/SIO1/ATELIER 2/ATELIER 2 - RENDUS/PESANTI Luke/Livrable2/gsbMVC -o TARGET -n', the SSH session is not connected
The folder << C:\Users\Michel\Documents\A\Informatique\ETABLISSEMENTS\IFIDE SUP'FORMATION\2023-2024\SIO1\ATELIER 2\ATELIER 2 - RENDUS\PESANTI Luke\Livrable2\gsbMVC >> exists.

Additional info

  • OS: Microsoft Windows 11 Entreprise 10.0.22621 N/A build 22621
  • multipass version multipass 1.13.1+win multipassd 1.13.1+win
  • multipass info

Name: dev
State: Running
Snapshots: 0
IPv4: 172.19.247.186
192.168.10.1
Release: Ubuntu 24.04 LTS
Image hash: 32a9d30d1880 (Ubuntu 24.04 LTS)
CPU(s): 1
Load: 0.00 0.00 0.00
Disk usage: 4.8GiB out of 19.3GiB
Memory usage: 467.3MiB out of 896.3MiB
Mounts: C:/Users/Michel/Documents/A/Informatique/ETABLISSEMENTS/IFIDE SUP'FORMATION/2023-2024/SIO1/ATELIER 2/ATELIER 2 - RENDUS/PESANTI Luke/Livrable2/gsbMVC => /var/www/gsbpesanti.lan
UID map: -2:default
GID map: -2:default

  • multipass get local.driver
    hyperv
@micheldiemer micheldiemer added bug needs triage Issue needs to be triaged labels Jun 26, 2024
@andrei-toterman
Copy link
Contributor

Hey, @micheldiemer! If I understand correctly, you want to share a folder over SMB. The errors you reported are related to an SSHFS mount, which is a different technology. Are those mounts totally unrelated? Also, if you want an SMB share, Multipass on Hyper-V provides that feature through native mounts. You could do something like:

multipass mount --type native <source-dir> <instance-name>:<target-dir>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants