Thursday, March 5, 2009

USB In VMware Server 1.0 on Linux

Tonight I was trying to access a USB flash drive on my Windows XP Professional VM that I have running on my openSuSE Linux 10.3 VM host, running VMware Server 1.0.4. However, I could not get it recognized in the VMware Server Console, and thus not in the VM either.




After a bit of Googling, I discovered the problem is with the USBFS implementation on openSuSE 10. (Link) The fix is VERY simple, just enter the following command with root priviledge:

mount -t usbfs /dev/bus/usb /proc/bus/usb


You will need to power cycle the VM, then the USB device list should be populated.




To prevent having to load this command every time I reboot my VM host machine, I added it as the last line in the vmware startup script in /etc/init.d/vmware

Hope this helps!

Monday, July 28, 2008

Change the Service Console IP Address on ESX 3.x

I recently had to change the IP address on the primary Service Console of a couple of VMware ESX 3.5 servers that I had deployed for work, due to an IP subnet change. Although not terribly complicated, I had to do some digging for a complete solution.

NOTE: You must be logged in as root for this process!

Initially, I removed the existing Service Console, from the KVM DIRECTLY ATTACHED to the server! If you SSH into your box to do this, you will lose connectivity immediately after the first command is issued!

First, remove the existing Service Console. Then recreate it with the desired, new, IP address. Then you will need to change your default gateway, and then change the IP address in two other config files. Here are the commands I used:



[root@esx01 /]#esxcfg-vswif -d

[root@esx01 /]#esxcfg-vswif -a vswif0 -p Service\ Console -i 192.168.1.100 -n 255.255.255.0 -b 192.168.1.255

[root@esx01 /]#vi /etc/sysconfig/network
(Change the GATEWAY= to the correct default gateway for the server.)

[root@esx01 /]#vi /etc/vmware/esx.conf
(Change the /adv/Misc/HostIPAddr to the correct NEW IP address of the server.)

[root@esx01 /]#vi /etc/hosts
(Change the IP address for the server.)

Thursday, May 8, 2008

Windows XP Tricks

I recently ran across an article by a fellow blogger listing "20 Things the Average User Doesn't Know About Windows XP". Typically, these lists offer little more than stuff we true geeks have known since the release date. However, this post actually contained a few interesting tidbits with which I was previously unfamiliar.

http://windowsxptricksforu.blogspot.com/2007/04/20-things-that-average-person-doesnt.html

1. It boasts how long it can stay up. Go to the Command Prompt in the Accessories menu from the All Programs start button option, and then type ’systeminfo’. The computer will produce a lot of useful info, including the uptime. If you want to keep these, type ’systeminfo > info.txt’. This creates a file called info.txt you can look at later with Notepad. (Professional Edition only).
This is useful for troubleshooting purposes. All of this info can be gathered via WMI, but this is a quick-and-dirty method if you're just trying to find out about the machine you're sitting at.

5. For those skilled in the art of DOS batch files, XP has a number of interesting new commands. These include ‘eventcreate’ and ‘eventtriggers’ for creating and watching system events, ‘typeperf’ for monitoring performance of various subsystems, and ’schtasks’ for handling scheduled tasks. As usual, typing the command name followed by /? will give a list of options.
I write and schedule tasks for a lot of batch files and VBScripts. Previously, I had to write my own log files, but not anymore! Now I can simply toss my status info over to the Windows System Logs (or Security, or Application), and let Windows stroe and manage them!

7. You can at last get rid of tasks on the computer from the command line by using ‘taskkill /pid’ and the task number, or just ‘tskill’ and the process number. Find that out by typing ‘tasklist’, which will also tell you a lot about what’s going on in your system.
This is something that NO Linux Admin can live without. Previously, I was using TLIST.EXE and KILL.EXE from the Windows NT4 (or was it 2000?) Resource Kit. NO LONGER! Now, apparently, XP/2003 has this functionality built-in.

Again, there's nothing ground-breaking here, but these little tips will definitely prove useful in my day-to-day life as a Systems Engineer when I have to hit a Windows box. (which is coming to be more and more often...)

Monday, February 11, 2008

Mount DOS Partitions as NetWare Volumes

OK, I'll admit it: We still use Novell NetWare at work.

In fact, we use A LOT of Novell NetWare at work. It's a good NOS, stable, not too difficult, and eDirectory is VERY nice. We have hundreds of Novell NetWare 5.1 servers left, and these are the boxes I typically have to deal with.

(On an unrelated note, I have RECENTLY had to virtualize a server running NetWare 4.11 and Oracle. Now THAT was fun... Perhaps I'll do a write-up on that...)
The steps in this document should work on
Anyway, I have a coworker that is responsible for a server that doesn't seem to be working quite right. In fact, she needs to copy the server.exe file from one server to another, but how?

A quick search on the WONDERFUL Novell Support Site yielded the answer.

On the server console, enter the command:
NETWARE_SERVER:LOAD DOSFAT.NSS
At this point you MAY get the following warning message:
NETWARE_SERVER:LOAD DOSFAT.NSS
WARNING: The "Auto Restart After Abend" settable parameter has a value of 1.
When the server abends, it writes detailed information into the ABEND.LOG file
located on the DOS bootable drive. This write will bypass the internal DOSFAT
LSS cache buffers, and there is a chance that it may cause corruption on the
DOS drive's FAT tables. In order to avoid this from happening, you should
either not load DOSFAT.NSS or set "Auto Restart After Abend" = 0.

Are you sure you want to load DOSFAT.NSS (y/n)?Y
Go ahead and hit Y and the module should continue to load.
This is a serious warning, but hopefully we'll only have DOSFAT loaded long enough to copy the file(s) we need, then we'll immediately unload it again.

At this point, the DOS drive (most likely C:) should be mounted to DOSFAT_C (or replace the C with the DOS drive letter used)

Entering the volumes command on the server console should now reflect the newly mounted DOSFAT_C volume.
NETWARE_SERVER:volumes
Mounted Volumes Name Spaces Flags
SYS DOS, LONG Cp Sa
VOL1 OS, LONG Cp Sa
NSS_ADMIN DOS, MAC, NFS, LONG NSS P
DOSFAT_C DOS, LONG NSS P

4 volumes mounted
NETWARE_SERVER:
You should now be able to access the DOS partition in any way you would normally access a NetWare server volume. For example, on a Windows client machine, enter:
C:\>map T:=NETWARE5_SERVER\DOSFAT_C:

Drive T: = STOMOUES_INS1\DOSFAT_C: \

C:\>
When you're done with your DOS partition, I HIGHLY recommend unload the DOSFAT module, to avoid any possible corruption to your DOS boot partition:
NETWARE_SERVER:unload DOSFAT.NSS
Dismounting Volume DOSFAT_C
Volume DOSFAT_C has been dismounted.
...
Module DOSFAT.NSS unloaded
NETWARE_SERVER:
That's it! You've successfully loaded the DOSFAT.NSS module, mounted the DOS boot partition, and unloaded the module.

Wednesday, January 30, 2008

Simple UNIX/DOS Newline Conversion

I LOVE the command-line! I'm a keyboard & command-line kind of guy. Even in Windows, I'll use as many keyboard shortcuts as possible.

I'm currently working on an older Oracle 10g server that's not working. Despite the fact that it's running on a Windows 2000 Server, Oracle's log files are formatted with Unix newlines instead of Windows/DOS CR+LF.

Some quick Google magic yielded a page from Wikipedia, and the following command:

UNIX to DOS (Run on a DOS/Windows Machine):
TYPE unix_file | FIND "" /V > dos_file

DOS to UNIX (Run on a Unix/Linux Machine):
tr -d '\r' < dos_file > unix_file
or
tr '\r' '\n' < dos_file > unix_file

NOTE:
MOST *nix systems have the dos2unix and unix2dos utilities, but the above commands should work on 99% of *nix systems without any additional packages.

NOTE:
The first *nix command works if dos_file uses the standard CR+LF, the second works if dos_file uses only CRs.

Just replace unix_file and dos_file with the appropriate filenames.

The best part: This command should work on ANY Microsoft OS, from DOS to Server 2003, without any special software or utilities.

I hope you find it as useful as I have already!

Monday, November 26, 2007

Jonesie Makes The AJC!

I HATE shopping - with a passion, in fact. However, Friday morning I was initiated into the Black Friday experience by one of my best friends. It all began at Michelle's Grandmother's house, where Travis and I decided we would tackle the crowds. It's an annual tradition for Travis, Sean, and their cousins. Brave the crowds for ridiculous deals? Sure, why not.

I got a few items - and literally lucked out by finding the last of a couple of different items lying around the store. I'm glad my good deeds are finally paying off! Thanks Karma!

Well, I spent WAY more than I needed (or meant) to, but my quote in the Atlanta Journal-Constitution on Saturday, November 24, 2007 sums it up:


"David Jones of Snellville last slept Wednesday night. He started chugging caffeine about 8 p.m. Thursday to stay awake for Friday’s shopping. His quest was to find “geek stuff for cheap.” He and two friends searched for hard drives, flash drives and digital photo frames. By about 7:30 a.m. Friday, the group was getting ready to walk into Fry’s electronics in Duluth. They already hit Circuit City, Staples and OfficeMax. Jones said he already spent $357, including $50 worth of gifts for others. Jones reasoned that because he’s young, single and has no kids he can afford to splurge on himself. “If that means I have to go without eating for a month I can handle it,” Jones joked. — Laura Diamond

http://www.ajc.com/fashion/content/shared-blogs/ajc/fashion/entries/2007/11/23/black_friday_a.html


Seriously, I can live on Cliff Bars and ramen noodles until I get paid again, if it means I get a good deal on geek...