I’m having the hardest tine setting up a shared folder between a Linux host and Win11guest. I want to get rid of dual boot, but there are a few programs that I use which are Win only. I have set up a VB VM, but I want a fine tuned KVM VM. On VB sharing is trivial, but I can’t get it to work in KVM. I have the host sharing the folder with Samba, and can see it from another Linux VM, but not from windows. Any clues?

  • 82cb5abccd918e03@lemmygrad.ml
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    Back when I had to use a windows vm just did

    qemu ... -net user,smb=$HOME/
    

    then in the windows vm just type \\10.0.2.4 into file explorer. Does that not work?

    man qemu says:

                  smb=dir[,smbserver=addr]
                         When using  the  user  mode  network  stack,  activate  a
                         built-in  SMB  server  so that Windows OSes can access to
                         the host files in dir transparently. The  IP  address  of
                         the  SMB server can be set to addr. By default the 4th IP
                         in the guest network is used, i.e. x.x.x.4.
    
                         In the guest Windows OS, the line:
    
                            10.0.2.4 smbserver
    
                         must be added in the file C:\WINDOWS\LMHOSTS (for windows
                         9x/Me)  or C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS (Windows
                         NT/2000).
    
                         Then dir can be accessed in \\smbserver\qemu.
    
                         Note that a SAMBA server must be installed  on  the  host
                         OS.
    
    

    Another way is to setup Spice and use a webdav daemon in Windows to transfer files over Spice folder sharing.

    You could also just RDP to the machine which is probably the easiest.

    The simplest would just be to scp files to and from Windows. Like in powershell do scp -R yourusername@10.0.2.2:~/path/stuff output_dir to get files from Linux.