VMware GSX Server 3.2Features | Documentation | Knowledge Base | Discussion Forums Using Samba for File Sharing on a Linux HostOn a Linux host computer, GSX Server can automatically install and configure a Samba server to act as a file server for Microsoft Windows guest operating systems. You can then use Windows Explorer in the virtual machine to move and copy files between virtual machine and host or between virtual machines on the same network just as you would with files on physical computers that share a network connection. The lightly modified Samba server installed by GSX Server runs over the GSX Server virtual Ethernet, and the Samba traffic between different operating systems is isolated from actual local area networks. The source code differences for the changes (in diff format and based on Samba 2.0.6) are available from VMware. For more information, see www.vmware.com/download/open_sources.html. If you already have Samba configured on your Linux host, the recommended approach is to modify that configuration so it includes the IP subnet used by the GSX Server virtual Ethernet adapter, VMnet1. You can configure your existing Samba server to work with a host-only network. Note that all the shares you set up in Samba and in the guest operating system normally appear on the bridged network as well. If you need to be sure the shares set up in the guest operating system are seen only on the host-only network, you may find it easiest to install and use the Samba server provided with GSX Server. If you do not need any shares to appear on your bridged network, you can use your existing Samba server and set up the configuration file so it works only on the host-only network. Samba configurations can be quite complex. This section provides several sample configuration files. If you need to go beyond the issues covered here, see the man page for the smb.conf file. To view this man page, type one of the following commands in a terminal window: man smb.conf or man 5 smb.conf Pay particular attention to the section on encrypted passwords. If you have enabled clear-text passwords in the guest operating system, be sure that smb.conf is set up to use clear-text passwords. Similarly, if you are using encrypted passwords, you must have the same setting in the guest operating system and in smb.conf. Note: Using Samba printer sharing with virtual machines is not supported. Consult the man pages for guidance on configuring Samba for printing. Sample smb.conf for Host-Only NetworkingThe following sample Samba configuration file is for use with host-only networking. This configuration is for the 2.0.6 version of Samba installed by GSX Server. The configuration files are placed in /etc/vmware/vmnet1/smb by default.
# This is the VMware(TM) Samba configuration file. You should read the Sample smb.conf for Bridged NetworkingThe following sample Samba configuration file is for use with bridged networking. This configuration file is based on the 2.0.7 version of Samba and assumes that you are using your existing Samba server, as provided with your host computer's Linux distribution. The configuration file is placed in /etc by default.
# This is the main Samba configuration file. You should read the Adding User Names and Passwords to the GSX Server Samba Password FileYou must be sure the Samba password file includes entries for all users of the virtual machine who will access the host's file system. The user names and passwords in the Samba password file must be the same as those used for logging on to the guest operating system. You may add user names and passwords to the GSX Server Samba password file at any time from a terminal window on your Linux host computer. 1. Log on to the root account. 2. Run the GSX Server Samba password command. Note: vmware-smbpasswd is based on the standard Samba password program. If you are familiar with the options used in smbpasswd, you may use any of them in vmware-smbpasswd. 3. Log off of the root account.
You may receive an error message that says
If your installation of GSX Server does not include the GSX Server Samba server and you want to set it up, log on to the root account on your host computer (su -), then run vmware-config.pl from a terminal on the host. The configuration program asks Caution: In order to configure GSX Server correctly, the vmware-config.pl configuration program requires all virtual machines to be shut down. The program shuts down any running virtual machines automatically. If You Are Already Running SambaIf you already have Samba running on your Linux host, you should not install the GSX Server Samba server when you are installing GSX Server on your host.
The configuration program prompts you Be sure to modify your Samba configuration so it includes the IP subnet used by the GSX Server virtual Ethernet adapter, VMnet1. To determine what subnet is being used by VMnet1, run /sbin/ifconfig vmnet1 You must be sure the Samba password file includes entries for all users of the virtual machine who will access the host's file system. The user names and passwords in the Samba password file must be the same as those used for logging on to the guest operating system. You may add user names and passwords to the Samba password file at any time from a terminal window on your Linux host computer. 1. Log on to the root account. 2. Run the Samba password command. 3. Log off of the root account. Using a Samba Server for Both Bridged and Host-Only NetworksYou may use the Samba server of your choice either the existing Samba server from your host operating system's distribution or the one provided with GSX Server for both host-only and bridged networking. To do so, you must modify one parameter in the smb.conf file. You can define the interface parameter so your Samba server serves multiple interfaces. An example of this is: interface = eth0 vmnet1 This example tells the Samba server that it is to listen to and use both the eth0 and vmnet1 interfaces the interfaces used by bridged and host-only networking, respectively. Using GSX Server's Samba with an Existing InstallationIt may also be possible to run both your existing Samba server and the GSX Server Samba server at the same time. In order to do this, your current Samba server must be version 2.0.6 or higher and must be configured correctly. However, this approach is not recommended. To determine the version of your Samba server, run smbd -V If you want to try running both Samba servers at the same time, use this sample smb.conf file as a basis for configuring the regular Samba server on your host computer. Sample smb.conf for Running Two Samba Servers at the Same Time
; This file is the recommended smb.conf file for your |