Samba still won't start because of vmware - Setup

This is a discussion on Samba still won't start because of vmware - Setup ; Hi: openSuse 10.3, VMwarePlayer-2.0.4, samba-3.0.26a I have the problem that even if the /etc/init.d/vmware service runs before the smb and nmb services, smb fails because the vmnet1 (192.168.230.1) interface created by vmware fails to appear before samba tries to bind ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Samba still won't start because of vmware

  1. Samba still won't start because of vmware

    Hi:

    openSuse 10.3, VMwarePlayer-2.0.4, samba-3.0.26a

    I have the problem that even if the /etc/init.d/vmware service runs
    before the smb and nmb services, smb fails because the vmnet1
    (192.168.230.1) interface created by vmware fails to appear before samba
    tries to bind to it.

    The reason I think this is the correct explanation is that after the
    system boots, smbd and nmbd are not running, and the syslog shows them
    complaining that the interface didn't exist. I then run them manually
    and they work fine. But I don't want to have to run them manually all
    the time.

    I need a way for the boot process to wait until vmnet1 is known to
    exist, before the smb/nmb services are run. The only thing I have done
    at present is put this in /etc/init.d/vmware:

    # X-Start-Before: smb nmb

    which ensures that the symlinks in /etc/init.d/rcN.d cause vmware to
    start before smb and nmb, but this does NOT guarantee that smb and nmb
    start after the vmnet1 interface appears. To reiterate: I believe the
    problem is that the vmnet1 interface doesn't appear in the kernel world
    for samba to bind to, until some time after the vmware script has
    already completed. Thus, smb/nmb run before this interface exists
    despite the vmware script having run before smb/nmb, so smb/nmb fail.

    BTW, I have my smb.conf set up to only allow samba to bind to vmnet1
    (see file below).

    What I think is the solution is to write another service script called
    "vmware-smb" for instance, which will poll ifconfig vmnet1 for a limited
    time (like 10-60 seconds) and when it sees vmnet1 appear, then run smb
    and nmb.

    But my Bash scripting skills are not up to this task. Can anyone tell
    me how to do this?


    Thanks for input.

    ---------------------------------------------------

    # Samba config file created using SWAT
    # from 127.0.0.1 (127.0.0.1)
    # Date: 2008/08/22 17:49:21

    [global]
    workgroup = VMWARE
    interfaces = lo, 192.168.230.1/255.255.255.0
    bind interfaces only = Yes
    printcap name = cups
    add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody
    -s /bin/false %m$
    logon path = \\%L\profiles\.msprofile
    logon drive = P:
    logon home = \\%L\%U\.9xprofile
    domain master = No
    ldap ssl = no
    usershare allow guests = Yes
    printing = cups
    cups options = raw
    print command =
    lpq command = %p
    lprm command =
    include = /etc/samba/dhcp.conf

    [homes]
    read only = No
    inherit acls = Yes


    --
    _____________________
    CRC
    crobc@REMOVE-THIS.sbcglobal.net
    SuSE 10.3 Linux 2.6.22.17

  2. Re: Samba still won't start because of vmware

    CRC wrote:
    > Hi:
    >
    > openSuse 10.3, VMwarePlayer-2.0.4, samba-3.0.26a
    >
    > I have the problem that even if the /etc/init.d/vmware service runs
    > before the smb and nmb services, smb fails because the vmnet1
    > (192.168.230.1) interface created by vmware fails to appear before samba
    > tries to bind to it.


    You don't BIND the local samba to the vmnet address. You bind
    the local host samba to your local host's IP address.

    Now... if you're wanting a samba server inside of the GUEST, then you
    would bind to the virtual NIC interface of the guest.

    Change your interfaces line in your local host's smb.conf
    to bind to YOUR local machines IP address NOT the one
    from vmnet. If you have somehow managed to make both
    the same, then you have a bigger problem.
    ....
    interfaces = HOST_IP_HERE/255.255.255.0

  3. Re: Samba still won't start because of vmware

    Chris Cox wrote:
    > CRC wrote:
    >> Hi:
    >>
    >> openSuse 10.3, VMwarePlayer-2.0.4, samba-3.0.26a
    >>
    >> I have the problem that even if the /etc/init.d/vmware service runs
    >> before the smb and nmb services, smb fails because the vmnet1
    >> (192.168.230.1) interface created by vmware fails to appear before samba
    >> tries to bind to it.

    >
    > You don't BIND the local samba to the vmnet address. You bind
    > the local host samba to your local host's IP address.
    >
    > Now... if you're wanting a samba server inside of the GUEST, then you
    > would bind to the virtual NIC interface of the guest.
    >
    > Change your interfaces line in your local host's smb.conf
    > to bind to YOUR local machines IP address NOT the one
    > from vmnet. If you have somehow managed to make both
    > the same, then you have a bigger problem.
    > ...
    > interfaces = HOST_IP_HERE/255.255.255.0


    Thanks for the reply.

    I will explain what all my interfaces are (see ifconfig output below):

    eth0 is the interface to the LAN. My Linux host has IP 192.168.1.14
    lo is self-explanatory
    vmnet1 at 192.168.230.1 is the host-only interface for VMware. Thus,
    this is the virtual NIC on the Linux-host side of the virtual host-only
    network "cable" connected to the guest VM.
    vmnet8 is the NAT network for the VMware guest's internet access.

    My objective is to have the Samba server only serve to the host-only
    network. Thus, the line in smb.conf which is:

    interfaces = lo, 192.168.230.1/255.255.255.0

    This will make samba unavailable to the LAN, the NAT network, and only
    to the host-only network. This all works Ok. The problem is getting
    Samba to start. If I wait until the system is booted and then do it
    manually, it works fine. If I start it as part of the service scripts
    executed while bringing up a runlevel during boot, it fails.

    You stated to "Change your interfaces line in your local host's smb.conf
    to bind to YOUR local machines IP address NOT the one
    from vmnet." While this does work (then the guest actually accesses
    samba via it's NAT network, not the host-only interface), this does not
    accomplish my objective of having samba only accessible to the host-only
    network. This isn't a big deal on my home network, but at work I am
    trying to accomplish something equivalent, and there I need to keep
    samba bottled up within the host-only virtual network only.



    > /sbin/ifconfig

    eth0 Link encap:Ethernet HWaddr 00:1D:7D:00:92:8C
    inet addr:192.168.1.14 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:3039 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1442 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1402481 (1.3 Mb) TX bytes:238674 (233.0 Kb)
    Interrupt:17 Base address:0xe000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:212 errors:0 dropped:0 overruns:0 frame:0
    TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:18425 (17.9 Kb) TX bytes:18425 (17.9 Kb)

    vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
    inet addr:192.168.230.1 Bcast:192.168.230.255
    Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
    inet addr:192.168.231.1 Bcast:192.168.231.255
    Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


    --
    _____________________
    CRC
    crobc@REMOVE-THIS.sbcglobal.net
    SuSE 10.3 Linux 2.6.22.17

  4. Re: Samba still won't start because of vmware

    On Tue, 16 Sep 2008 12:30:10 -0700, CRC wrote:

    > Chris Cox wrote:
    >> CRC wrote:
    >>> Hi:
    >>>
    >>> openSuse 10.3, VMwarePlayer-2.0.4, samba-3.0.26a
    >>>
    >>> I have the problem that even if the /etc/init.d/vmware service runs
    >>> before the smb and nmb services, smb fails because the vmnet1
    >>> (192.168.230.1) interface created by vmware fails to appear before samba
    >>> tries to bind to it.

    >>
    >> You don't BIND the local samba to the vmnet address. You bind
    >> the local host samba to your local host's IP address.
    >>
    >> Now... if you're wanting a samba server inside of the GUEST, then you
    >> would bind to the virtual NIC interface of the guest.
    >>
    >> Change your interfaces line in your local host's smb.conf
    >> to bind to YOUR local machines IP address NOT the one
    >> from vmnet. If you have somehow managed to make both
    >> the same, then you have a bigger problem.
    >> ...
    >> interfaces = HOST_IP_HERE/255.255.255.0

    >
    > Thanks for the reply.
    >
    > I will explain what all my interfaces are (see ifconfig output below):
    >
    > eth0 is the interface to the LAN. My Linux host has IP 192.168.1.14
    > lo is self-explanatory
    > vmnet1 at 192.168.230.1 is the host-only interface for VMware. Thus,
    > this is the virtual NIC on the Linux-host side of the virtual host-only
    > network "cable" connected to the guest VM.
    > vmnet8 is the NAT network for the VMware guest's internet access.
    >
    > My objective is to have the Samba server only serve to the host-only
    > network. Thus, the line in smb.conf which is:
    >
    > interfaces = lo, 192.168.230.1/255.255.255.0
    >


    IIRC, Samba can be picky about the network and netmask. Are you sure that
    you wouldn't use this line?

    interfaces = lo, 192.168.230.

    --
    Douglas Mayne

+ Reply to Thread