Tuesday, September 1, 2009

VMware server 2.0 web console inaccessible

I recently couldn't access my own VMware server 2.0 web console.
The error message across different browsers was the typical web page isn't available default browser error message.
After much hair-pulling, I discovered that my Windows Vista hosts file has lost the IPv4 mapping to localhost, and restoring the localhost entry put things right again.
Hope this helps someone out there save the 60 mins I spent downloading, updating VMware server (a whopping 500+ mb download these days) before finding the true cause.

Saturday, July 4, 2009

Unknown ACPI Device on some Fujitsu Lifebooks

I've had this problem that I, for the longest time, never took the effort to deal with.
When my notebook boots up (a Fujitsu Lifebook S7010), Windows XP will activate the Add New Hardware wizard, but neither successfully adds the hardware automatically, nor offer any clue as to what the device might be, simple listing it as Unknown in the Wizard.
Today, I got around to allowing it to install without drivers, in order to look up further info. Lo and behold, when you view the unknown device's Properties in Device Manager, and in the Details tab, the Device Instance ID lists it as "ACPI/FUJ02B1/xxxxxxxxxx".
Googl'ing "FUJ02B1" took me to a Fujitsu Support and Download Page, which lists the device as an ACPI controller.
Downloaded the "acpi.exe" file, extracted the file contents (it's a self-extracting zip file), and used the Add New Hardware wizard to install the driver manually, and Viola!
Driver installed, Hibernation tab appears in Power Properties, and Windows no longer prompts to install a driver upon log-in.

Note added on 9 Sep 2009: This have apparently worked on a couple of other Fujitsu Lifebooks, including a C-6651.

Friday, July 3, 2009

Amazing utility for rotating the screen: iRotate

I've been using a variety of Fujitsu laptops, and one thing I cannot live without is dual-screen support.

And where dual-screen is concerned, my secondary monitor is a rotatable LCD, and the Fujitsu laptops somehow disable the rotate feature (I'm using the latest Intel drivers).

I've had to fiddle/experiment with various registry settings to enable screen rotation, and each different chipset seems to use a different registry key.

Anyway, the point being that, I've discovered an amazing utility that simplifies all that. iRotate.

It's amazing, cos it just works. Give it a whirl!

Sunday, March 8, 2009

Getting FreeBSD to shutdown gracefully in VMware

FreeBSD hasn't been officially supported as a Guest OS by VMware Server for some years. As of the official VMware Server User's Guide as of Nov 2008, it isn't listed in the "Supported Guest Operating Systems" section. Strangely, the same document does include instructions for installing VMware Tools for FreeBSD.

So it works. Sort of. Except that the FreeBSD guest cannot shut down gracefully (empirically tested on some combinations of FreeBSD 6.x/7.x with VMware Server 1.x and 2.x).

Let me elaborate. By that I mean that:
  • "Power Off" or "Reset Guest" from the host is equivalent to yanking the power cord cord. It works.
  • "Shut Down Guest" from Host, or "shutdown -h" from Guest will end will gracefully shutdown the FreeBSD process, but not power-off the machine.
The trick is to use "shutdown -p" instead.

However, this is just a partial solution. It means that everytime you want to shutdown a FreeBSD Guest gracefully, you need to fire up a VMware console (and we all know how slow that is) or ssh to the guest. I also set run my VMware Server shutdown default and the Virtual Machines Power Controls to "Shut Down Guests".

In order to make that work elegantly, you have to do a little bit of "vi" work, and edit vmware-guestd to use "shutdown -p" instead of "shutdown -h".

Important Notes:
  • This is a workaround, and unsupported by VMware (at least until whenever VMware fixes this problem)
  • Presumably ACPI needs to be enabled in the FreeBSD guest.
  • This needs to be done everytime you update VMware Tools.
1. Locate the vmware-guestd binary

# locate guestd | grep sbin | grep local
/usr/local/lib/vmware-tools/sbin32/vmware-guestd
/usr/local/lib/vmware-tools/sbin32/vmware-guestd-wrapper
/usr/local/lib/vmware-tools/sbin32-6/vmware-guestd
/usr/local/lib/vmware-tools/sbin32-6/vmware-guestd-wrapper
/usr/local/lib/vmware-tools/sbin64-6/vmware-guestd
/usr/local/lib/vmware-tools/sbin64-6/vmware-guestd-wrapper
/usr/local/sbin/vmware-guestd

# ls -l /usr/local/sbin/vmware-guestd
lrwxr-xr-x  1 root  wheel  58 Nov  9 00:53 /usr/local/sbin/vmware-guestd -> /usr/local/lib/vmware-tools/sbin32-6/vmware-guestd-wrapper

2. Back up the vmware-guestd binary

(Ok, this part is very important. You're working on vmware-guestd, and not vmware-guestd-wrapper, which is just a wrapper for the real 'vmware' binary to ensure that the binary will find all the shared libraries.)

# cp -p /usr/local/lib/vmware-tools/sbin32-6/vmware-guestd /root/vmware-guestd.bak

3. Kill the vmware-guestd process

# ps awxx | grep guestd
  866  ??  Ss     0:46.86 /usr/local/lib/vmware-tools/sbin32-6/vmware-guestd --background /var/run/vmware-guestd.pid
 2066  p0  S+     0:00.01 grep guestd

# kill 866

# ps awxx | grep guestd
 2092  p0  S+     0:00.01 grep guestd

4. Use "vi" to edit the vmware-guestd binary

# vi /usr/local/lib/vmware-tools/sbin32-6/vmware-guestd

5. Search for "shutdown -h" in the vmware-guestd binary

http://www.vmware.com/support/reference/common/info_tools.html.

^@^@^@^@Could not get path to Tools configuration file.
^@^@^@^@Could not get path to Tools installation.
^@^@/build/mts/release/bora-122956/bora-vmsoft/lib/conf/conf.c^@^@C
onf file out of date; reloading...
^@tools.conf^@%s%c%s^@/sbin/shutdown -p now^@/sbin/shutdown -r now^
@/hgfs^@mount-point^@poweron-vm-default^@poweroff-vm-default^@resum
e-vm-default^@suspend-vm-default^@512^@max.wiperfile.size^@640^@res
olution.min.width^@480^@resolution.min.height^@^@HgfsBd_Dispatch: R
pcOut_send returned failure
^@^@HgfsBd_GetChannel: Failed to allocate an RpcOut
^@^@^@^@HgfsBd_GetBuf: Failed to allocate a bd buffer
/shutdown -h

6. Replace "shutdown -h" with "shutdown -p" in the vmware-guestd binary

http://www.vmware.com/support/reference/common/info_tools.html.

^@^@^@^@Could not get path to Tools configuration file.
^@^@^@^@Could not get path to Tools installation.
^@^@/build/mts/release/bora-122956/bora-vmsoft/lib/conf/conf.c^@^@C
onf file out of date; reloading...
^@tools.conf^@%s%c%s^@/sbin/shutdown -p now^@/sbin/shutdown -r now^
@/hgfs^@mount-point^@poweron-vm-default^@poweroff-vm-default^@resum
e-vm-default^@suspend-vm-default^@512^@max.wiperfile.size^@640^@res
olution.min.width^@480^@resolution.min.height^@^@HgfsBd_Dispatch: R
pcOut_send returned failure
^@^@HgfsBd_GetChannel: Failed to allocate an RpcOut
^@^@^@^@HgfsBd_GetBuf: Failed to allocate a bd buffer

7. Save and quit "vi"

http://www.vmware.com/support/reference/common/info_tools.html.

^@^@^@^@Could not get path to Tools configuration file.
^@^@^@^@Could not get path to Tools installation.
^@^@/build/mts/release/bora-122956/bora-vmsoft/lib/conf/conf.c^@^@C
onf file out of date; reloading...
^@tools.conf^@%s%c%s^@/sbin/shutdown -p now^@/sbin/shutdown -r now^
@/hgfs^@mount-point^@poweron-vm-default^@poweroff-vm-default^@resum
e-vm-default^@suspend-vm-default^@512^@max.wiperfile.size^@640^@res
olution.min.width^@480^@resolution.min.height^@^@HgfsBd_Dispatch: R
pcOut_send returned failure
^@^@HgfsBd_GetChannel: Failed to allocate an RpcOut
^@^@^@^@HgfsBd_GetBuf: Failed to allocate a bd buffer
:wq!

8. Restart FreeBSD

# shutdown -r now



Please do leave comments if I was inaccurate in any way, and let me know how I can make this post clearer and more helpful.