Why use Samba to share a directory in a virtual machine?
The Mac version of VMware Fusion comes with a shared folder feature, but when you place a C + + source file in the shared directory and call GNU-GCC compile, there are a variety of problems, and here is no longer an example, the reason is unknown.
Install Samba in Ubuntu
sudo apt-get install samba
vim /etc/samba/smb.conf
service smbd restart && service nmbd restart
smbpasswd -a 用户名
Fixed virtual machine Ubuntu IP address
After a restart or sleep wake-up, the virtual machine's IP address is constantly changing and inconvenient to use.
In the Mac terminal, entersudo vi /Library/Preferences/VMware\ Fusion/vmnet8/dhcpd.conf
- Search for the keyword "range" in the configuration file, which is the range that can be set.
- Then add the following in the configuration file, where the IP address is within the range set above, and the MAC address can be viewed in the advanced options, network adapter settings, network adapter, such as VMware fusion-> virtual machine.
Restart your Mac. Read a lot of tutorials, said that just restart the virtual machine Ubuntu and VMware Fusion can be, but I tried many times and not, the virtual machine Ubuntu is not connected to the Internet, restart the Mac can be.
Show virtual machines in the Finder home directory of Ubuntu
Finder-> to connect to, connect to server, enter the virtual machine. Ubuntu Fixed IP address
Over
Reference links
Use Samba to share virtual machines in VMware Fusion in Ubuntu's home directory under Mac