Tuesday, August 26, 2014
yes. you need to think about this from time to time.
Static WINS Entries Adding static entries to your Samba WINS server is actually fairly easy. All you have to do is add a line to wins.dat, typically located in /usr/local/samba/var/locks or /var/run/samba. Entries in wins.dat take the form of: "NAME#TYPE" TTL ADDRESS+ FLAGS where NAME is the NetBIOS name, TYPE is the NetBIOS type, TTL is the time-to-live as an absolute time in seconds, ADDRESS+ is one or more addresses corresponding to the registration, and FLAGS are the NetBIOS flags for the registration. A change that has been made to the wins.dat will not take effect until nmbd has been restarted. It should be noted that since the wins.dat file changes dynamically, nmbd should be stopped before editing this file. Do not forget to restart nmbd when this file has been edited. A typical dynamic entry looks like this: "MADMAN#03" 1155298378 192.168.1.2 66R To make a NetBIOS name static (permanent), simply set the TTL to 0, like this: "MADMAN#03" 0 192.168.1.2 66R The NetBIOS flags may be interpreted as additive hexadecimal values: 00 - Broadcast node registration 20 - Peer node registration 40 - Meta node registration 60 - Hybrid node registration 02 - Permanent name 04 - Active name 80 - Group name. The 'R' indicates this is a registration record. Thus 66R means: Hybrid node active and permanent NetBIOS name. These values may be found in the nameserv.h header file from the Samba source code repository. These are the values for the NB flags. nameserv.h 92 /* The wins flags. Looks like the nbflags ! */ 93 #define WINS_UNIQUE 0x00 /* Unique record */ 94 #define WINS_NGROUP 0x01 /* Normal Group eg: 1B */ 95 #define WINS_SGROUP 0x02 /* Special Group eg: 1C */ 96 #define WINS_MHOMED 0x03 /* MultiHomed */ 97 98 #define WINS_ACTIVE 0x00 /* active record */ 99 #define WINS_RELEASED 0x04 /* released record */ 100 #define WINS_TOMBSTONED 0x08 /* tombstoned record */ 101 #define WINS_DELETED 0x0C /* deleted record */ 102 103 #define WINS_STATE_MASK 0x0C 104 105 #define WINS_LOCAL 0x00 /* local record */ 106 #define WINS_REMOTE 0x10 /* remote record */ 107 108 #define WINS_BNODE 0x00 /* Broadcast node */ 109 #define WINS_PNODE 0x20 /* PtP node */ 110 #define WINS_MNODE 0x40 /* Mixed node */ 111 #define WINS_HNODE 0x60 /* Hybrid node */ 112 113 #define WINS_NONSTATIC 0x00 /* dynamic record */ 114 #define WINS_STATIC 0x80 /* static record */
Friday, August 22, 2014
what happens when templates and parent directories haven't consistent names or reside in directories that share the same name, and of course, are all over the place? you sigh. then you "open the book". and when i say "open the book" i mean it the way the portuguese mean it. think sailor talk, only worse. vmware isn't very nice in that via vsphere you can't figure out where your "assets" reside. that's *okay*. gui fail. various powershell cli scripts are losers, too. what you need to do is actually query the sql db that the vcenter uses. so, off i go to vmware's support site; and i find this: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004139 COOL. install more junk on my system. since this is running sql server 2008 express, i get this: http://www.microsoft.com/en-us/download/details.aspx?id=7593 flock. i go through the totally non-intuitive install for sql server 2008 studio express. just install "a new instance". you're not really installing sql server 2008. i cancelled when i saw that under installation. i read up. and the i went for it. no worries. and then you run the tool. of course you've kept the name of your db and passwords handy, right? well, if you went with the vmware defaults, just to a network browse, connect to your local sql server express db. it should look like: YOUR_VCENTER\VIM_SQLEXP and do local auth. it is okay. you run this query that vmware support gave you: select VPX_ENTITY.NAME as "VM Name", VPX_VM.FILE_NAME as "File Name / Path" From VPX_VM inner join VPX_Entity where VPX_VM.FILE_NAME LIKE '%VMNAME%' on vpx_vm.ID = vpx_entity.ID order by VPX_entity.name; it barfs. holy heck. re-write the query and get expected results: use VIM_VCDB; select VPX_ENTITY.NAME as "VM Name", VPX_VM.FILE_NAME as "File Name / Path" From VPX_VM inner join VPX_Entity on vpx_vm.ID = vpx_entity.ID order by VPX_entity.name; and there you go. of course the datastores are completely unfriendly, but you can ssh into your client boxes and figure it out pretty quick. of course you can. go get some coffee. you're awesome.
Tuesday, August 12, 2014
Adding a Linux domain member machine configure the smb.conf file with all happiness. Include workgroup, authentication via domain, etc. check if config is nifty fine: % testparm to check if ldap auth via nsswitch is okay, execute: %getent passwd %getent group join the domain: % net rpc testjoin -S 'PDC' -U Administrator%yesyes % net rpc join -U Administrator%oreilly if errors abound, may need in smb.conf: client schannel = no or... just do it again. afterwards, check if all is fine: % smbclient -L localhostname it should show something like: Anonymous login successful Domain=[ONTHEPHONE] OS=[Unix] Server=[Samba 3.0.22] Sharename Type Comment --------- ---- ------- ADMIN$ IPC IPC Service (bollocks server (Samba 3.0.22)) IPC$ IPC IPC Service (bollocks server (Samba 3.0.22)) localtest Disk testing in /usr/local Anonymous login successful Domain=[ONTHEPHONE] OS=[Unix] Server=[Samba 3.0.22] Server Comment --------- ------- FARMINGTON bollocks server (Samba 3.0.22) PDC onthephone server (Samba 3.0.11) Workgroup Master --------- ------- ONTHEPHONE PDC If the server is a BDC, do not forget to: % smbpasswd -w
Monday, August 11, 2014
yeah. fun stuff. so vmware, too lazy to update your isos? search through the archives for the correct async ones and unpack the archive and upload the thing called offline-bundle and then scp up to an esxi host - be sure to have ssh service running, is that what you're telling me to do? okay.
~ # esxcli software vib install -d /vmfs/volumes/yes-local/isos/igb-5.2.5-offline_bundle-1682588.zip Installation Result Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective. Reboot Required: true VIBs Installed: Intel_bootbank_net-igb_5.2.5-1OEM.5220.127.116.111820 VIBs Removed: VMware_bootbank_net-igb_18.104.22.168.1-1vmw.522.214.171.1243387
Wednesday, August 6, 2014
jaunty is my friend. it does unfs.
/etc/apt/sources.list deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted deb http://old-releases.ubuntu.com/ubuntu/ jaunty-updates main restricted deb http://old-releases.ubuntu.com/ubuntu/ jaunty universe deb http://old-releases.ubuntu.com/ubuntu/ jaunty-updates universe deb http://old-releases.ubuntu.com/ubuntu/ jaunty multiverse deb http://old-releases.ubuntu.com/ubuntu/ jaunty-updates multiverse deb http://old-releases.ubuntu.com/ubuntu/ jaunty-security main restricted deb http://old-releases.ubuntu.com/ubuntu/ jaunty-security universe deb http://old-releases.ubuntu.com/ubuntu/ jaunty-security multiverse
Friday, August 1, 2014
vmware esxi 5.5 says the nfs volume is not accessible. really?
esxcli storage list yep. not accessible. esxcli storage nfs remove -v nfs-store remove it. do whatever you do to fix the issue. then... re-add per below. esxcli storage nfs add -H 192.168.6.66 -s /data/dev/nfs-store -v nfs-store ^ ^ ^ | | | nfs server | | nfs export | local datastore name