VMWare and slow clocks – take 2

2009/01/09

The centos 4.x we are using as platform for the VMWare VMs (yes, I know there is version 5, but we need to be compliant with RHEL 4.x because of the ATG requirements) installs by default the NTP client.

Here is sequence of steps that needs to be performed to enable automatic synchronization of the clocks.
1) make sure the DNS works
cat /etc/resolv.conf

sudo vi /etc/resolv.conf

– check that nameservers point to something meaningfull, e.g.
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 192.168.16.1

2) check that you have ntpd installed

cat /etc/ntp.conf

– inspect the content of the file, it is quite well documented

3) make it work in runlevels 2345

/sbin/chkconfig –list | grep ntpd

– this will most likely show “off” for all runlevels

sudo /sbin/chkconfig –level 2345 ntpd on

4) Initial sync

sudo /usr/sbin/ntpdate pool.ntp.org

– do this twice, on second you should get very small difference

5) Start service / restart service

sudo /sbin/service ntpd start

Making this a blog post so that next time I need to do it I can easily find it :-). Maybe somebody else will find it useful as well.


Phaser 6120N rocks !

2007/11/23

Today I picked the printer I have mentioned yesterday – Xerox Phaser 6120N. It is somehow more bulky than the ML-4500, but boy, does it work !! From all available connection options (parallel port, USB, ethernet) I have of course chosen ethernet. Printer after switch on spent about 5 minutes doing strange and weird noises, initializing itself and then spit out a page with its DHCP-acquired network address.

To assign different IP address (so that it does not change) was very easy: go to http://192.168.x.x/ – whatever is printed on the status page and follow the Web instructions under ‘Network’. Set new IP, disable the automatic IP settings, wait for printer reset (and new status page) and you can go on setting the clients.

Windows installation is very smooth – drivers are on the CD – and does not even need a reboot. As a nice surprise, the CD also contained PPD files so that now I have the printer accessible from CUPS on Linux as well. And as usual, Mac installation was pretty non-existent. The printer does not support Bonjour, but somehow both Mac’s found it using AppleTalk – yet another thing I know not enough about and need to look up. So finally, all computers around my house can print reliably, in color without going through the hoops. Hooray !

The most amazing surprise was when I tried to print a photo. I have done it before and generally, laser printer comes nowhere even close to what you can get out of the photo inkjet – especially with proper paper. Now here I could not believe how good was the result: on plain paper, without any special calibration or color magic, the picture looked very close to an inkjet output – only waterproof.

This source is certainly not impartial, but anyway shows difference in fine details of output. I am no expert, but the printouts look certainly very good to me!

Disadvantages ? Beside the size, the printer is a bit noisier than ML-4500 when it prints. Other than that, none other issues found yet.


Little pains of switching

2007/11/22

I have been running the Unix only workstations for over a week now. During this week, I have managed to clean up and convert two Windows boxes to VMWARE virtual machines, but actually had to resort to use the VM’s only in two cases. Everything else worked just fine.

The first case was requirement to review an non-trivial Excel file. Normally, Numbers does very decent job when it comes to loading Excel files and for the most the remaining cases, the OpenOffice (in it’s more polished Cocoa version NeoOffice) works just fine. Well – as long as you do not open spreadsheet with pivot tables. In my case, the spreadsheet contained pivot tables and charts based on these tables. Numbers warned during import that this feature is not supported and the converted spreadsheet was very good looking – nicer that in Excel, but not quite so functional :-). Strangely enough, the charts were imported OK but lost the drill-down capabilities. After trying out the NeoOffice, the imported spreadsheet had retained some pivot capabilities of the original, but lost charts completely. The only resort was falling back to Office 2003 in virtual machine and using Excel. Fortunately one of the two VM’s created from old hardware had Office 2003 installed, so that worked out OK.

The other case of “works only with Windows” was the Active X control used by our VPN to get access to internal network. There is no alternative, so to get to our internal Wiki, JIRA or timesheet system, I have to start Windows in VM.

The last issue encountered has not really anything to do with platform change, but it was triggered by this, so here it goes. Back in 2002 I purchased very small and handy laser printer Samsung ML-4500. It worked well for all those years, happily attached to my Windows desktop machine which (being always on) shared it for everybody in home network. Of course, up to the point when that desktop machine was decommissioned. Because ML-4500 is parallel port only printer, has no USB, first issue was to find a machine that actually still has a parallel port (most of new machines do not). By lucky coincidence, my NAS Linux system had parallel port – so I dived into new adventure of configuring CUPS printing system under Linux and sharing the printer via Samba. Which was much easier that it may seem – hats off to Linux hackers. The ML-4500 was part of the CUPS printer’s database and was recognized right away. Only small hickup was disabled parallel port in BIOS – but after this got corrected, things worked OK (thanks to Peter for the hint).

So now I can print from Linux, can even share the printer but still cannot print from Windows or Mac. Why so ? If you try to attach the printer from Windows machine, Windows wants to install driver. The ML-4500 is not in the default driver database. I still have the original CD from Samsung, but attempt to install driver fails with completely useless error message. Updated driver is nowhere to be found. I do not remember how I did install the driver back in 2002, but nevertheless, the machine is gone. Even if I do have the driver inside VM, I do not have VMWARE installed on Linux (and do not plan to do so). So for now, only way how to print from Windows notebooks (or Macs) is to create a PDF file on the client, save it to server and then use CUPS to print it out from Linux. What a pain …

How I see it, the days of ML-4500 are counted … especially when my favorite hardware supplier has very nice color laser network printer for a great price :-).


Ragioni per fare il grande salto

2007/11/09

During the vacation, we stopped in small bookstore in Verona which was selling computer software as well. At the entrance, there was a poster showing smiling Finder’s face, Apple logo and announcing reasons why you would want to make the big jump – il grande salto – to Mac platform. That is to explain the title 🙂

Grande Salto is exactly what I did. Without too much preparation or notice. Since Tuesday evening I am happy owner of the beautiful piece of hardware (17 inch 2.4 GHz Core 2 Duo Macbook Pro with 250 GB HDD and 4 GB of RAM) that is greatly complemented by the amazing software collection (OS X 10.5, iLife 08, iWork 08 and many others) running on it. I spent Wednesday playing with it and between ‘Wows’ and ‘Ahhs’ managed to setup the core applications I need for work: several configurations of Eclipse (with and without MyEclipseIDE), Netbeans with Ruby, couple of gems and of course THE editor. Then transferred the sources, installed Ant, Spring, Tomcat and couple of opensource packages (e.g. Jakarta Commons). And on Thursday, I jumped right into the field, to the client continuing in development of my current Java project in the place where I left it on Monday with Fujitsu N5100 running XP-ProSP2. As a plan B, I had my old notebook also with me – but did not have to resort to using it.

The switch was not easy and for few hours I had to fight old habits and muscle memory. As many years TotalCommander addict, I had created really fast and efficient workflows and habits how to move around. None of them was of course applicable. It is really hard to overcome these unconscious finger movements burned deep into your brain: F3 is File View, F4 is File Edit, F7 is create directory – when you have been using them for over 20 years since MS-DOS and Norton Commander. But eventually, I learned to appreciate and enjoy the New Ways. New Finder is really good and in combination with Spaces and Quicksilver allows at least as efficient ways – sometimes even better – how to accomplish things.

As I was expecting, using bash instead of pretty lame windows command shell is a big relief. I have forgotten 90% of my old shell script and command line edit keystroke skills, but it is still so much better. The file system operations are considerably faster and common tasks can be automated with minimal effort just by using symbolic links, simple scripts and shell variables. What is much better under Leopard is network connectivity – the way how it does browse and connect to Windows machines …

Working in Eclipse is same as under Windows – only it looks better and is faster – but (to make it fair comparison) it MUST run faster on 2.4 GHz Core2 Duo 4GB than on 3.4 GHz P-IV with 1 GB. Ability to use two finger scrolls, quick desktop switches and great screen resolution (1920×1200) makes the Macbook Pro close to perfect developer workstation.

I have still not found replacement for all features and tools I was using in Windows – but I am working on it. Most of them come from 3rd party software, not from OS. Right now, what I miss is (from TotalCommander):

– convenient directory comparison and synchronization with good GUI (with embedded on-demand file diff)

– transparent processing of the packed archives – TC makes them look and behave as directory sub-trees

– opening shell in directory / creating file in directory – aka “I am in the Project/demo/src directory now, please create the empty README.txt file here”. Mac works the other way – open editor with the new file and save the file to Project/demo/src/README.txt. Which is not necessarily worse, but just (still) against my instincts. I was used to get to directory first and press Shift-F4 (bound to start of Notepad++, prompting for name), or to click on TotalCommader toolbar icon “Open command prompt in current directory”

After working two full days, I have not found any real issues and was extremly pleased with the Leopard user experience. It is hard to explain – the differences are subtle but in whole it feels so much better than any other OS. I have been using OS-X for over a year now, but only at home and for mostly hobby-projects or after hour hacks. This is an attempt to make Mac the foundation for work environment as well, and use Windows for .NET development only, running it inside virtual machine. And it is very different experience – in two days I have learned a lot and found out about many more things to discover.

To make the grande salto even more complete (and potentially devastating in case of bad landing ;-)), I have also during last week wiped out my desktop at Thinknostic and instead XP-Pro installed Fedora Linux with KDE desktop. With the Mac available and working mostly out of office I do not get so much time to spend on desktop – but it is good to have same platform on both places. I have already configured first few VMWARE virtual machines – with both Linux and Windows as guest OS. The Vmware player works great under Linux, I cannot wait until final version of the Fusion 1.1 is out to test on on the Mac.


Installing ATG on Fedora Core

2007/11/08

Trying to install ATG on the Linux platform turned out to be not completely hickup-free. The default installer died with the following message:

$ ./ATG2007.1.bin
Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

Fortunately, the fix was easy after I found out what went wrong: incorrect assumption about kernel version. To make it work, this “hack” helped:

$ mv ATG2007.1.bin ATG2007.1.bin.orig
$ cat ATG2007.1.bin.orig | sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" >ATG2007-1.bin

None of this of course happens on Windows – oh, yes – the joys of not swimming with the crowd :-). You will encounter issues otherwise unknown – but also learn something in the process.


Going (mostly) virtual

2007/11/01

With my new Macbook Pro on the way from China, I have started the big consolidation of hardware and software platforms. The goal is to improve the change management of software development environments, increase mobility and increase stability of the environments.

The way how I am going to do that is moving all “fragile” environments to virtual machines. My most fragile environment is Windows XP (I am still resisting Vista). What I mean “fragile” is well known “software rot” of the developers machine, caused by frequent installs and uninstalls (or upgrades) of components, tools, etc. After some time (which varies by the kind and frequency of installs), the machine becomes more and more sluggish, registry bloated and occurrence of weird things more frequent – up to the point that developer decides to blow off the Windows install and start from scratch.

This operating system “cancer” can be slowed down a lot in virtual machine by using several baselines: clean install, clean install with Visual Studio, etc. Whenever you need to roll back an install (or test a new Beta version of Visual Studio, many of which were notoriously known to be uninstallable) you just throw away latest VM status. It takes some discipline to keep things documented and to keep the images up to date with all the patches and updates – which may be a challenge ;-).

As host platform I will be using OS X (for the notebook) and Linux (for the desktop). I could use Windows as host on desktop, but the latest series of BSOD I have experienced on my barely one year old desktop machine made me to rethink that. It is time again after few years, to make another try of Linux – for three main reasons. First is to find out whether there is indeed some hardware problem with the machine (the memory tests were showing no issues) or whether it is (as usual) some bug in third-party driver. It is so annoying that any unknown sloppy programming job of some never-heard-of company can shut down XP completely – thanks to Microsoft’s decision to put pretty much everything into kernel space :-(. If Linux works OK, the point is proven – it WAS a software problem.

The second reason for Linux is that several of our clients are using Linux and virtualization and we want to recreate comparable environment in the lab for evaluation and testing purposes. We had lot of fun finding out why did the Oracle Advanced Queueing stop communicating with ATG Dynamo service components recently and I am sure this is not the only scenario where moving physical server into virtualized subtly changes environment up to the point of breaking it 🙂

And the third reason for Linux as a host is convenience having same kind of OS as host on notebook and workstation and power of that OS. Shared availability of tools such as bash and Unix file tools can make administration and automatization much simpler.

I have not made final decision whether to stay with Parallels (which is available for all three platforms or switch to VMWARE. Right now, I am leaning more towards VMWARE – I have tested it out on Linux and Windows and found it working very well – at least the free player version. The VMWARE Server’s UI performance on Windows host was not very impressive – but I guess that was not what it was written for. The reviews of performance I have read favorize VMWARE on Mac and very important factor is availability of ready-made pre-built images – software appliances from Marketplace. Neither have I selected the Linux Distro – albeit it will be one of the major ones.

As the guest OS I will be using XP – the only way how to do the .NET development. As well as Linux, which can be useful to overcome the lack of Java 6 on Mac (until resolved) as also to contain various database environments into their own appliance (MySQL, Oracle, PostgreSQL). I want also compare user experience when doing Java development on Linux and Mac with respect to on Windows – in recent discussions on Javalobby so many people were claiming superiority of Linux for developer’s workstation that I cannot resist the temptation :-).

I am really curious how this will work when implemented. The only scenario where the above described setup would not work is the kind of project we did last year: depending on hardware devices physically attached to the PC by Firewire or even custom board (such as biometric camera with face recognition software or secure document scanner). Right now, we have the the luxury of not needing anything like this – which is great time to try it out …


Like Netmeeting – only much better

2007/10/03

My current client is multi-national company, headquartered in Ottawa with offices in USA and Europe. With teams all over the globe, the conference calls and network meetings are part of the game. This usually means Microsoft Netmeeting to share the screen and teleconference bridge for voice. Netmeeting usually works quite OK – except when it does not – for no obvious reason :-).

Thanks to Yugma, there is now better alternative. Yugma is Sanskrit word meaning “the state of being in unified collaboration” and also a name of a startup, offering teleconferencing product that aspires to unify colaboration between platforms. And they mean it, because their product runs on Windows, Linux and Mac and integrates with Skype to take care of the voice portion.

The free version of the product offers teleconference up to 10 people (albeit it is unclear how that works with Skype which allows teleconference only up to 5 people), desktop sharing, desktop anotations and changing presenter during the session. The paid version in addition to accommodating larger teams (30, 50, 100 or 500 people) also allows keyboard and mouse remote access, session recording and replay, webcasts, filesharing and webinars (for the 500 version). The price of the premium service is very reasonable – the 30 user package costs about $30/month.

With products like this, I have every day less and less reasons not to switch to OS-X as main and only platform – running Windows XP and Linux in virtual machines to cover .NET and LAMP/NAMP stacks. It is coming 🙂