Skip navigation
VMware
5,368 Views 17 Replies Last post: Nov 14, 2010 9:01 AM by aa2k RSS
1 2 Previous Next
ArildS Novice 36 posts since
May 3, 2004
Currently Being Moderated

Jul 31, 2009 2:27 AM

How to install Samba server on ESX 4 (vSphere 4)

VMWare does not support samba server and do not include the required RPMs in the ISO image.

 

As we know samba is riddled with security problems and it's usage is frowned upon 

However, if used in a responsible manner. I.e behind firewalls it should be safe. DON'T use it on an ESX conneted directly to the internet. Actually you better not connect your ESX servers directly to the internet at all.

 

-


> USE AT YOUR OWN RISK!!! <----


 

Also you may affect ESX stability by using unsupported RPMs and void the VMWare support license by using them.

 

Samba on ESX 4 for dummies:

Download the required RPMs from the ISO image and/or the Centos FTP site: ftp://ftp.sunet.se/pub/os/Linux/distributions/centos/5.2/updates/x86_64/RPMS/  (as new versions arrive find the right Centos distro)

 

You will need (in this order):

 

samba-common-3.0.28-1.el5_2.1.x86_64.rpm   (is in the iso)

cups-libs-1.2.4-11.18.el5_2.3.x86_64.rpm

samba-3.0.28-1.el5_2.1.x86_64.rpm

 

Upload the files to your ESX server with an FTP client and use port 22 (Filezilla is great). Connect with a valid user (not Root) and use port 22.

 

Use these commands to install (in this order):

 

rpm -Uvh samba-common-3.0.28-1.el5_2.1.x86_64.rpm

rpm -Uvh  --nodeps cups-libs-1.2.4-11.18.el5_2.3.x86_64.rpm

rpm -Uvh samba-3.0.28-1.el5_2.1.x86_64.rpm

 

To set up samba to use it you'll need this info if you are a dummy

1.Open the firewall in ESX: esxcfg-firewall -o 445,tcp,in,smb-server

(you could also make scripts to open/close fw for every use)

 

2. Edit the smb.conf: nano /etc/samba/smb.conf

(you may need something like this under Share Definitions. Use [ before the labels vmfs and vmimages)

vmfs]

comment = vmfs

browseable = yes

writable = yes

valid users = root

path = /vmfs/volumes

 

vmimages]

comment = vmimages

browseable = yes

writable = yes

valid users = root

path = /vmimages

 

3. Turn samba on: chkconfig --level 3 smb on

4. Start samba service: /etc/init.d/smb start

5. Restart the FW: /etc/init.d/firewall restart

6. Set root smb password: smbpasswd -a root

 

 

 

 

 

 

This concludes the Samba in ESX 4 guide for real dummies

 

Message was edited by: ArildS

puzzledtux Hot Shot 234 posts since
Dec 18, 2008
Currently Being Moderated
1. Jul 29, 2009 1:35 AM in response to: ArildS
Re: How to install Samba server on ESX 4 (vSphere 4)

I would rather setup a new Linux virtual machine and configure samba in it. By installing samba packages on the ESX directly one would be breaking the VMware support clause.

AntonVZhbankov Guru User Moderators vExpert 5,367 posts since
May 26, 2008
Currently Being Moderated
2. Jul 29, 2009 2:35 AM in response to: ArildS
Re: How to install Samba server on ESX 4 (vSphere 4)

Service Console in ESX is a kind of Linux machine, yes. But do not use it other than for monitoring or troubleshooting purposes.

If you want Samba server then create VM, install Linux and setup samba


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCA, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
AntonVZhbankov Guru User Moderators vExpert 5,367 posts since
May 26, 2008
Currently Being Moderated
4. Jul 29, 2009 3:43 AM in response to: ArildS
Re: How to install Samba server on ESX 4 (vSphere 4)

>need it for simplicity.

Сan't agree. Is it so difficult to install Windows in VM or Linux? Any additional software you have installed in Service Console add complexity to your environment.

 

You can migrate VM, backup it, snapshot it, clone etc. You can't do this to samba in Service Console, actually you lose all your virtualization benefits. What if ESX fails? What if you want to move all your VMs and services to brand new powerful cluster with ESXi embedded?


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCA, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
AntonVZhbankov Guru User Moderators vExpert 5,367 posts since
May 26, 2008
Currently Being Moderated
6. Jul 29, 2009 4:27 AM in response to: ArildS
Re: How to install Samba server on ESX 4 (vSphere 4)

Just use Veeam FastSCP. It's free, has very simple to understand GUI interface and you can just copy/paste files like in Windows Explorer.


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCA, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
AntonVZhbankov Guru User Moderators vExpert 5,367 posts since
May 26, 2008
Currently Being Moderated
8. Jul 29, 2009 4:42 AM in response to: ArildS
Re: How to install Samba server on ESX 4 (vSphere 4)

SCP implementation in ESX is not fast, VMware is gonna fix it. But I wonder, are there any engineers with "dummy" level knowledge and terabytes of data?

 

In most cases there is better way than setup samba on ESX. Just imagine that you have ESXi only, and there is no way to install samba here. What would you do?

Yes, you can actually setup samba in ESX Service Console, but this is bad practice, and some "dummy" will pay for it just because he didn't take couple of hours planning. In my opinion, this is not what newbies should learn.

 

In some cases your solution can be the best possible, but not all, and it should not be marked as best practice, especially for newbies.


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCA, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru
jasoncllsyste… Hot Shot 176 posts since
Mar 16, 2009
Currently Being Moderated
10. Jul 31, 2009 2:36 AM in response to: ArildS
Re: How to install Samba server on ESX 4 (vSphere 4)

 

I would said you shouldn't posted here.

 

 

Used at your own risk and good luck!

 

 

 

 

Regards,

Jas aka Superman

MALAYSIA VMware Communities

http://www.malaysiavm.com

 

'If you found this or any other answer useful please consider allocating points for helpful or correct answers ***

 

 

Best Regards, Follow me on Twitter: jlchannel http://www.malaysiavm.com *** If you found this or any other answer useful please consider allocating points for helpful or correct answers ***
LucasAlbers Expert 563 posts since
Mar 29, 2005
Currently Being Moderated
12. Jul 31, 2009 7:59 AM in response to: ArildS
Re: How to install Samba server on ESX 4 (vSphere 4)

 

A samba server should be stable. If only one user is connecting to it, it will only max out the cpu one one samba process running as that user.

 

 

It could potentially use up server console memory.

 

 

Wouldn't ftp be a faster alternative?

 

 

 

 

 

Andr3y Enthusiast 35 posts since
May 4, 2009
Currently Being Moderated
13. Aug 3, 2009 11:20 PM in response to: AntonVZhbankov
Re: How to install Samba server on ESX 4 (vSphere 4)

 

Good day Anton,

 

 

Sorry to raise this topic again.

 

 

In my test lab I have one server which acts as ESX server and Windows Server at the same time. So I still have 2 out of 3 HD's configured as NTFS which contain Win server setup and most of my data. Will this example be a best solution in combination with ntfs-3g to mount my NTFS partitions? I only have 1-2 users accessing the partition from time to time.

 

 

Or is there another more stable solution via VM somehow?

 

 

Thank you,

 

 

Andrey

 

 

AntonVZhbankov Guru User Moderators vExpert 5,367 posts since
May 26, 2008
Currently Being Moderated
14. Aug 3, 2009 11:34 PM in response to: Andr3y
Re: How to install Samba server on ESX 4 (vSphere 4)

Yes, of course Windows VM with RDM disks gives you more flexibility and stability. Less you touch service console - less possible problems in the future.


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCA, MCITP: SA+VA, VCP 3/4/5, VMware vExpert http://blog.vadmin.ru

Bookmarked By (0)

Share This Page

Communities