This article summarizes how Windows XP and Windows 7 access the shared files in the linxu virtual machine. The system installed on the host is Windows 7, and the Linux version installed on the virtual machine is fedora (32-bit ).
Run the following command or action in a virtual machine Linux:
1. Install the samba Service
Run the rpm-Qi Samba command to check whether the samba service is installed. If not, you can use Yum install samba for online installation (in the fedora 11 environment ).
2. Start the samba service.
Service SMB start
To enable the samba service automatically, run the ntsysv command (or the system service option in the setup command) and check SMB, after confirming, you can load the samba service at startup.
3. Configure the samba Service
For details about how to configure the samba service, see "configure the samba service and NFS service in Linux".
4. Restart the samba service.
Service SMB restart
5. Disable the Firewall
Service iptables stop
By default, the firewall disables the 139 TCP port and the 137,138 port required by the nmbd process. Therefore, we use the Command Service iptables stop to disable the firewall. You can also modify the firewall to allow port tcp139 and UDP 137,138.
6. Host and Virtual Machine Ping
If the ping fails, you also need to configure the Host IP address and Virtual Machine IP address in one CIDR block. After mutual Ping, We can log on to the shared files in the virtual machine operating system on the host.