Archive for the ‘Ubuntu’ Category
VMWare Fusion 2.0.1 & Ubuntu 8.10, oops …
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.
Migrating wasn’t too hard, and here we are …
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!!!
Setting up a printer in VMWare Ubuntu instance
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.