MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Archive for the ‘Mac’ Category

VMWare Fusion 2.0.1 & Ubuntu 8.10, oops …

with 3 comments

It seemed like a good day to test VMWare Fusion 2.0.1 on my Mac, but while it works well with Microsoft Windows XP VM, it doesn’t work as well with Ubuntu 8.04.1 or 8.10 VM. It wasn’t too surprising to see that VMWare Tools (VMwareTools-7.9.3-128865.tar.gz) don’t work with Ubuntu 8.04.1. There’s a mismatch between the gcc compiler and the kernel. You need gcc 4.2.3 to compile the kernel but gcc 4.2.4 to compile the modules for VMWare Tools.

You see it right away when the VMWare Tools script prompts you to compile the vmmemctl modules, like this:

None of the pre-built vmmemctl modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmmemctl module
for your system (you need to have a C compiler installed on your system)?
[yes] 
 
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
 
Your kernel was built with "gcc" version "4.2.3", while you are trying to use
"/usr/bin/gcc" version "4.2.4". This configuration is not recommended and
VMware Tools may crash if you'll continue. Please try to use exactly same
compiler as one used for building your kernel. Do you want to go with compiler
"/usr/bin/gcc" version "4.2.4" anyway? [no]

At this point, upgrading Ubuntu appears ideal. Upgrading was tedious, and resulted in two failures. The first failure requires you shut down the instance by using the VMWare Fusion menu – Virtual Machine, Shut Down Guest. Don’t expect it to work as fast as it did in 2.0.0, at least with Ubuntu.

The second failure is that vsock.o can’t be made due to missing header files. That’s really as good as it gets because a fresh install produces the same error. The failure shown is:

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vsock-only'
make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic'
  CC [M]  /tmp/vmware-config0/vsock-only/linuxaf_vsock.o
  CC [M]  /tmp/vmware-config0/vsock-only/driverLog.o
  CC [M]  /tmp/vmware-config0/vsock-only/util.o
/tmp/vmware-config0/vsock-only/linux/util.c: In function 'VSockVmciLogPkt':
/tmp/vmware-config0/vsock-only/linux/util.c:157: warning: format not a string literal and no format arguments
  CC [M]  /tmp/vmware-config0/vsock-only/linuxaf_vsock.o
  LD [M]  /tmp/vmware-config0/vsock-only/vsock.o
  MODPOST 1 modules
WARNING: "VMCIDatagram_CreateHnd" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIDatagram_DestroyHnd" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIEvent_Subscribe" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCI_DeviceGet" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIEvent_Subscribe" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIDevice_Get" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIMemcpyFromQueueV" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIQueuePair_Detach" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCI_GetConextID" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIDatagram_Send" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIQueuePair_Alloc" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIEvent_Unsubscribe" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
WARNING: "VMCIMemcpyToQueueV" [/tmp/vmware-config0/vsock-only/vsock.ko] undefinied!
  CC      /tmp/vmware-config0/vsock-only/vsock.mod.o
  LD [M]  /tmp/vmware-config0/vsock-only/vsock.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic'
cp -f vsock.ko ./../vsock.o
make: Leaving directory `/tmp/vmware-config0/vsock-only'
Unable to make a vsock module that can be loaded in the running kernel:
insmod: error inserting '/tmp/vmware-config0/vsock.o': -1 Unknown symbol in module
 
There is probably a slight difference in the kernel configuration beetween the
set of C header files you specified and your running kernel. You may want to
rebuild a kernel based on that directory, or specify another directory.
 
The VM communication interface socket family is used in conjunction with the VM
communication interface to provide a new communication path among guests and
host. The rest of this software provided by VMWare Tools is designed to work
independently of this feature. If you with to have the VSOCK feature you can
install the driver by running the vmware-config-tools.pl again after making sure
that gcc, binutils, make and the kernel sources for your running kernel are
installed on your machine. These packages are available on your distribution's
installation CD.
[ Press the Enter key to continue.]

Wouldn’t it be nice if they pointed to a specific file. It didn’t take much effort to find them, after all it’s Linux. I found that they’re defined in the vmci_queue_pair.h and vmciGuestKernelAPI.h files. Those files are found inside the vsock-only.tar file. You can find the vsock-only.tar file in the vmware-tools-distrib/lib/modules/source directory. You can read more about the Virtual Machine Communication Interface on VMWare’s web site.

The only pre-built VMWare Fusion 2.0.1 pre-built tool modules for Ubuntu are compatible with the listed kernels. Unfortunately, as noted above they don’t work because of a gcc difference.

bld-2.6.24-16-i386generic-Ubuntu8.04
bld-2.6.24-16-i386server-Ubuntu8.04
bld-2.6.24-16-i386virtual-Ubuntu8.04
bld-2.6.24-16-x86_64generic-Ubuntu8.04
bld-2.6.24-16-x86_64server-Ubuntu8.04
bld-2.6.24-19-i386generic-Ubuntu8.04.1
bld-2.6.24-19-i386server-Ubuntu8.04.1
bld-2.6.24-19-i386virtual-Ubuntu8.04.1
bld-2.6.24-19-x86_64generic-Ubuntu8.04.1
bld-2.6.24-19-x86_64server-Ubuntu8.04.1

The only question I’m left with is do I troubleshoot this or downgrade VMWare back to 2.0.0? I’m inclined to the latter given the lack of energy in the VMWare forum.

Ultimately, this was fixed with the next release of VMWare. They simply lag a bit in getting the libraries straight. In fact, I ran into a similar problem with Ubuntu 9.04 and the page.c file. I hacked it and got everything working but really, you should probably just use the last release of Ubuntu a little longer because VMWare looks to lag release by about 4 months.

Written by maclochlainn

November 23rd, 2008 at 12:02 am

Posted in Mac,Ubuntu,VMWare

Creating a custom virtual machine for Oracle 11g

without comments

Now that I’ve organized the blog a bit, I can start posting new information. VMWare Fusion is a great tool but I fat fingered a few installs before i mastered it. You need a customized set of settings to create an effective virtual machine to run Oracle 11g. You need to allocate enough memory and pre-allocate disk space before you do the install or it takes much longer. You may also fragment a base operating system unless you setup a separate mount point (true also for VMWare Workstation for Linux).

You’ll find the steps to create a customized virtual machine for a Red Hat AS 4 installation in the Configure Custom VM blog page. It’s more or less the same thing for Oracle 10g or the Oracle eBusiness suite, except you’ll need to pre-allocate more disk space.

Written by maclochlainn

November 16th, 2008 at 2:52 pm

No easy import into Excel 2008 for Mac

with 3 comments

I thought it would be nice to walk through the Excel 2008 configuration steps to query Oracle. I was quite surprised when navigating the path, this error dialog was thrown:

When you navigate to the Microsoft web site, you’ll find that you have a choice of an ODBC driver from Open Link or Actual Technologies. You might think that Oracle would have their own ODBC driver that you can use without paying for a 3rd party solution. Unfortunately, there isn’t one. The most recent kits are missing the libsqora.so shared library. The only ones that I could find are for the Mac OS X Tiger edition.

I may have missed something but you’ll find the Oracle documentation here. Feel free to comment with a solution. My solution is to use Code Weaver’s CrossOver Mac, and Microsoft Office 2007. How I regret the money wasted on Microsoft Office 2008.

A quick note, addendum, it looks like Actual Technologies is the best. Unfortunately, they charge for one copy for Oracle and another for MySQL and Postgre. What a discouraging note, but I may bite the bullet on the $60 bucks for both. I’ll defer the MySQL and Postgre until they release their 2.9 version. Don’t forget to also download Microsoft’s Query tool.

Written by maclochlainn

November 7th, 2008 at 10:50 pm

VMWare stuck on a memory heap

with one comment

I was doing yet another install of Red Hat AS 4 in VMWare Fusion and ran into a new error. It’s the following: The virtual machine is unable to reserve memory.

The only way I found to fix this involves opening a terminal and killing the process manually. Killing without prejudice (cleanly shutdown the process and dependents) didn’t work. I had to kill it with prejudice (shutdown the process notwithstanding anything), then click the Abort button. The next error message says the peer process is missing and allows you to exit VMWare Fusion. Then, you reboot the Mac OS X.

The steps for find the process and killing it are:

1. Open a Terminal and run the following command:

# ps -ef | grep vmware

It returns something like this:

    0    90     1   0   0:00.00 ??         0:00.00 /Library/Application Support/VMware Fusion/vmnet-dhcpd -cf /Library/Application Support/VMware Fusion/vmnet8/dhcpd.conf -lf /var/db/vmware/vmnet-dhcpd-vmnet8.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
    0    98     1   0   0:00.00 ??         0:00.00 /Library/Application Support/VMware Fusion/vmnet-dhcpd -cf /Library/Application Support/VMware Fusion/vmnet1/dhcpd.conf -lf /var/db/vmware/vmnet-dhcpd-vmnet1.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
  501   160   115   0   1:44.12 ??         3:15.87 /Applications/VMware Fusion.app/Contents/MacOS/vmware -psn_0_77843
    0   322     1   0   0:00.07 ??         0:00.29 /Library/Application Support/VMware Fusion/vmware-vmx -E en -D ZjTtGrJgANADRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -# product=1;name=VMware Fusion;version=2.0;buildnumber=116369;licensename=VMware Fusion for Mac OS;licenseversion=6.0 build-116369; -@ pipe=/var/folders/fi/fiepDOKbFJeE42RxGcDBgU+++TI/-Tmp-//vmware-mclaughlinm/vmxd9641b5487a98f78;readyEvent=24 /Volumes/Disk2/Red Hat Enterprise Linux 4 Oracle.vmwarevm/Red Hat Enterprise Linux 4 Oracle.vmx
  501   397   303   0   0:00.00 ttys000    0:00.00 grep vmware

2. Kill the VMWare Fusion process by using the following syntax:

# kill -9 322

3. Reboot the operating system.

Written by maclochlainn

November 6th, 2008 at 12:38 am

Migrating wasn’t too hard, and here we are …

with one comment

A number of friends wanted me to do things that weren’t possible while keeping my blog on WordPress.com’s web site. Things like code formatting, downloads for software, et cetera …

You can find the new blog at: http://blog.mclaughlinsoftware.com

So, I’ve migrated it to my own domain. I’m in the process of configuring the rest of the domain. I’ll update you through the blog as I complete the process.

I’ve got grand plans (lets hope there’s time). For example, I’m planning to migrate and update the TechTinker.com domain too. I’ll plan tutorials on Java, PL/SQL, and PHP initially as well as administration tips, techniques and walk through steps for my favorite platforms. As time allows, I’ve got some stuff comparing SQL across platforms – much beyond the trivial Oracle’s SPOOL is MySQL’s tee (not herbal tea).

While my perspective may change over time, I’m quite fond of Mac OS X, Ubuntu, and Red Hat. I won’t exclude Microsoft because we must live with it, but isn’t CrossOver sweet! I’d actually tried to get Oracle to run through it. I may yet, I’m still playing with it.

I’m trilled that Chris Jones and Justin Kestelyn got me blogg’n. I’ve always wanted to contribute more but the forums have mavens with much more time than I have to answer questions. The blog lets me share ideas and concepts as they travel with me on a daily basis.

Stats on the blog pages may not migrate but if time allows maybe I’ll write a plugin if I can’t find one. Generally, I don’t think anybody cares about the stats. It’s the information to solve problems, and I hope that’s what you find useful in my blog.

By the way, it wasn’t just the ability to have my blog pages look cool on my iPhone that drove the change, but it does look nice!!!

Written by maclochlainn

November 1st, 2008 at 4:09 pm

Posted in Mac,Oracle,PHP,Ubuntu

That old $TNS_ADMIN environment variable

without comments

Somebody reminded me that I should include the $TNS_ADMIN variable to avoid unnecessary file searches (minor expense) in the Mac configuration instructions. This eliminates additional searches when running sqlplus and tnsping executables. I’ve updated that blog page with those instructions. It’s not necessary to make it work but it does avoid a read to the local and /etc directories on your Mac OS X for a tns_names.ora file before reading it from the $ORACLE_HOME/network/admin directory.

Written by maclochlainn

November 1st, 2008 at 3:22 am

VMWare Fusion 2.x causes Ubuntu printing failure

with 3 comments

I’d already upgraded my Windows x86 instances to 2.x on my Mac Book Pro but hadn’t got around to Ubuntu until today. The upgrade went fine, and VMWare Tools compilation succeeded and kernel reports were normal. Unfortunately, CUPS (Common Unix Printing Service) fails to start correctly and there doesn’t appear to be any way to fix it without changing the VMWare Fusion libraries. It appears to be a bug introduced by VMWare Tools. I’ve updated my Ubuntu VMWare printer set up steps to note it. If you’ve got a fix for the problem, let me know.

Written by maclochlainn

October 27th, 2008 at 2:22 am

Posted in Mac,VMWare

Tagged with , , ,

Setting up a printer in VMWare Ubuntu instance

without comments

As I mentioned before, working in the virtual machine is a great solution when you need to work in multiple operating systems. Setting up printing is a step that goes with the operating system. It is very easy to configure in Ubuntu running in VMWare on a Mac OS X machine.

I found that the standard printer in the virtual machine wouldn’t work. I tried it in both VMWare 1.x and 2.x but without any luck. It did work ineffectively in VMWare 2.x but it embedded characters in simple documents that shouldn’t be there. Finally, I pursued this course. It has the benefit of working like you’d expect! It lets you print your native Ubuntu documents when you’ve configured the VMWare machine in NAT or bridged networking mode. The only difference is that a bridged network doesn’t require you to share the printer on the Mac OS because it directly accesses it.

The first step using a NAT network requires that you share you printer setup on the Mac OS. You do that by launching System Preferences, then click on Sharing. In Sharing, you enable print sharing by chosing the network printer …

After you’ve enabled sharing on the Mac OS, you can take the following steps in Ubuntu:

1. Click the System menu choice, choose Administration. and Printing, as shown in screen shot:

2. You’ll then see the following screen but not gray scaled. If you don’t, you’ll also see the following form. a gray scaled version indicates that you’ve run VMWare Tools before updating the Ubuntu OS CUPS service:

As mentioned, this means there’s a problem with a disabled service – typically cups (Common Unix Printing Service). You can click the Help, then Troubleshoot to further diagnose the problem. In the first screen click the Forward button to continue. In this screen, click the Not Listed (because it should be an empty list), and then click the Forward button to continue. You most likely will see the following dialog box, which tells you that the cups service is stopped (a general occurrence when you upgrade from VMWare Fusion 1.x to 2.x).

There’s a temptation to follow the instructions, and I yielded to it without a positive outcome. What you’ll find is that the cups (cupsys) service is enabled but if you use the VMWare Fusion menu, you’ll find that it isn’t, as shown:

If you stop here and check in a terminal session, you’ll see that life isn’t rosy after the upgrade. Even if you check it and restart the VM, the printing problem won’t resolve. This appears to be a part of the recompilation of cups by the VMWare Tools. It appears to happen when you opt to compile Ubuntu CUPS while running the VMWare Tools. You’re only prompted to compile these if you’re not on the most current CUPS release by Ubuntu.

You use the following command to check the status of the printer service:

# sudo /etc/init.d/cupsys status

You will most likely get something like this if you have a problem:

Status of Common Unix Printing System: cupsd is not running but /var/run/cups/cupsd.pid exists.

This is where it becomes obvious that the VMWare Fusion 2.x upgrade can introduce the problem. It is simple to avoid the problem by ensuring that the Ubuntu OS is patched to the most current CUPs version before running the VMWare Tools. I fixed the problem by reinstalling Ubuntu from scratch, and patching it to the current level. Then, you won’t have a failure of the CUPS process.

When you fix any errors from the upgrade or provided you’re on VMWare Fusion 2.x, you should click the Show printers shared by other systems check box, then click the Refresh button to display any network printers if they don’t refresh automatically.

3. You click on the desired network printer, which displays the following screen. Click the Make Default button after you click the Print Test Page button.

If you caught my post on doing this in a Microsoft Windows environment, isn’t it stuning how easy Ubuntu is compared to the “user-friendly” Windows interface (unless you’re upgrading). If you need the Windows instructions, you can find them here.

Is this the look of the new Mac Book Pro?

without comments

It’s amazing what my students discover on the Internet. Not wanting to spoil Apple’s Christmas next week, don’t click through to the full entry or you’ll see a photo and its source URL.

You can find where I found it here, and according to the web page this is what the new Mac Book Pro supposedly will look like:

Written by maclochlainn

October 10th, 2008 at 6:30 pm

Posted in Mac

Tagged with ,

Setting up a printer in VMWare Windows instance

with 2 comments

Sometimes there are products that run in Windows that don’t have a clone on the Mac, like Microsoft Visio. Working in the virtual machine is the solution but printing is tedious to setup when you’re using a NAT network model. The following instructions show you how to setup a networked printer inside a VMWare instance that uses NAT networking. You can also use it when configuring it in a bridged network configuration. It is more or less the ordinary way for the Windows XP platform.

I found that the standard printer in the virtual machine wouldn’t work. I tried it in both VMWare 1.x and 2.x but without any luck. It did work ineffectively in VMWare 2.x but it embedded characters in simple documents that shouldn’t be there. Finally, I pursued this course. It has the benefit of working like you’d expect! It lets you print your native Windows documents when you’ve configured the VMWare machine in NAT. The same steps work when you’re using a bridged networking. In a bridged network, you don’t have to share the printer on the Mac OS because it directly accesses it.

The first step requires that you share you printer setup on the Mac OS. You do that by launching System Preferences, then click on Sharing. In Sharing, you enable print sharing by chosing the network printer …

After you’ve enabled sharing on the Mac OS, you can take the following steps in Windows:

1. Click the Start button, then choose Printers and Faxes. You’ll get the following screen where you should click the link to Add a printer. It will launch the Add Print Wizard.

2. You should install the printer drivers if they’re not already installed before launching the Add Print Wizard. You click Next In the first screen.

3. The default radio button is for a locally attached printer. Click the network printer radio button before clicking the Next button.

4. Click the Next button because the default browses for a network connected printer.

5. You shuold see the Microsoft Windows Network, and the default workgroup. Click on the Workgroup to display the possible machine names. If your machine doesn’t show in the list, it’s most likely because your printer wasn’t known in when Windows XP was released. The solution here is to insert the HP disk when you’ve connected it to the virtual machine, and then you simply follow the prompts, as shown in this newer post.

6. Click the appropriate machine that represents the hosting Mac OS (your machine that’s running VMWare). After you click it, you’ll see the target printers that are available through the external Mac OS connectivity and sharing. Click the Next button to proceed.

7. The last activity triggers a warning error. It asks you to confirm that you can trust your Mac. Click the Yes button to proceed (it’s a boring message but click on it if you want to read it).

8. Choose the printer as a default printer by clicking the Yes button. You can choose the No button if you’ve got more than one network printer.

There are problems when you forget to install the hardware first, so make sure you get the hardware installed first.