Setting Up File Sharing Between Manjaro Linux Host and Windows 10 Guest
It took me many hours to finally find a simple solution for file exchange between a Manjaro Linux host and Windows 10 virtual machine.
When installing or using an existing VM image, you need to select the operating system during setup (Windows 10 in my case). I recommend keeping the default configuration settings, though you can add shared host memory or shared storage if needed.
I initially tried adding a filesystem device in the VM configuration using both virtiofs and virtio-9p drivers, but neither worked properly.
Eventually, I discovered that Samba works perfectly for this purpose, though it can only be used within your home network using your host system’s specific IP address.
Here’s my short guide:
Prerequisite: Installing Samba on Manjaro Linux
sudo pacman -Syu
sudo pacman -S samba
After installation, you can:
- Start the Samba service:
sudo systemctl start smb
- Configure Samba to start automatically at boot:
sudo systemctl enable smb
- Check the configuration with
testparm
:
sudo testparm
-
The default configuration file is located at
/etc/samba/smb.conf
-
If modifying your configuration file, restart the service:
sudo systemctl restart smb
Host Linux, Client Windows - Configuration
Only Samba works correctly for sharing files between systems.
The folder I want to share is:
/mnt/Daten/VirtualPC/XChange
Host Linux Configuration
Edit the file: /etc/samba/smb.conf
Replace the OLD settings (which only worked for NAS):
[global]
workgroup = WORKGROUP
With these NEW settings:
[global]
workgroup = WORKGROUP
security = user
map to guest = Bad User
guest account = mylinuxhostuser
log level = 1
[XChange-Daten]
path = /mnt/Daten/VirtualPC/XChange
browseable = yes
writable = yes
guest ok = yes
force user = mylinuxhostuser
Client: Windows Setup
- Open File Explorer
- Navigate to “This PC”
- Click on “Computer” in the top menu
- Select “Map network drive”
- Enter: \myhostPC-IP-address\XChange
After your setting you still may have a problem to transfer your files from host to client. Here you will find the solution.
#x Disabling the Windows Security Warning for virt-manager over Samba
The warning message appears because Windows 10 identifies files transferred from your Linux host via Samba as a potential security risk. This is a standard Windows security measure.
1. Temporary solution
You can simply click “OK” to use the files despite the warning. However, you would need to repeat this each time you access them.
2. Permanent solutions
a) Add files to the exception list:
- Click “Show details” in the warning message
- Enable the option to “Unblock these files”
- Confirm with “OK”
b) Adjust Internet options in Windows:
- Open Windows Control Panel
- Go to “Internet Options” → “Security” → “Local Intranet”
- Click “Sites” → “Advanced”
- Add the UNC path or IP address of your Linux server
- Confirm with “OK”
c) Change security zone settings:
- Open Windows Control Panel
- Go to “Internet Options” → “Security”
- Select the “Internet” or “Local Intranet” zone
- Click “Custom level”
- Look for “File download” and set this option to “Enable”
d) Adjust Group Policies (for advanced users):
- Open the Group Policy Editor (gpedit.msc)
- Navigate to “User Configuration” → “Administrative Templates” → “Windows Components” → “Attachments”
- Configure the settings for file attachments according to your needs