Friday, October 16, 2009

VMware vs. VirtualBox on Windows

I've been using VMware Workstation 6.5.3 under Windows XP for a while primarily running Ubuntu 9.04. While it works well, I've chafed at the 2 processor (core) limit and the lack of 3D support (for compiz).

Sun's VirtualBox 3.0.8 supports more cores and has 3D support. The clincher was that it could use the same virtual disk format as VMware so I didn't have to start from scratch! I got the VirtualBox machine pointing to the VMware disk image and installed the guest additions. I then enabled compiz from the System-->Appearance menu.

Compiz worked well but there were repaint problems whenever a pop-up from VirtualBox or Windows appeared. Alt-tab refreshed the screen well though. Shared folders and USB support were different as well but workable.

Some limits that were more annoying were:
  • I couldn't set the memory to allocate for Ubuntu to anything more that 1500 MB even though my machine has 3.x Gig usable.
  • Full screen mode (no window boarders) only supports a single monitor.
    • I could stretch the normal non-full-screen client to span both monitors but then I lost a lot of vertical space to menu bars, etc.
The clincher for me was that I couldn't shut down VirtualBox and use the modified virtual disk under VMware again. VMware would start to boot Ubuntu but GRUB stage 1.5 would fail with an "Error 18".

Thank god for backups...

Saturday, July 4, 2009

Windows 7 Performance on Mac

I recently bought a Mac mini and wondered how it's NVidia GeForce 9400M graphics would stack up against an older PC with an NVidia GeForce 8600 GT. The Mac uses 256 MB of memory that it shares with OS-X. The PC has 256 MB of dedicated memory on the graphics card.

Windows 7 RC (build 7100) has a built-in system benchmark that includes graphics tests. I installed it on the Mac in a boot-camp partition using boot-camp version 2.1 drivers.


Mac Mini Dell GX-280
Processor 5.4 3.8
Memory (RAM) 5.5 4.9
Graphics 5.2 5.7
Gaming graphics 4.4 4.9
Primary hard disk 4.9 5.3



Base score 4.4 3.8

The processor and RAM show the difference a few years make but the Mac mini graphics can't keep up with a decent dedicated card. The laptop drive in the mini is slower than the desktop drive in the PC.

I'd love to see how the MacBook Pro with the optional NVIDIA GeForce 9600M GT discrete graphics processor does. It'd be great to see how the Solid-State drive does too.



Sunday, June 14, 2009

Virtual machine, physical disk

I've been a big fan of using virtual machines with products like VMware, Parallels and Sun's free VirtualBox. I recently had an old linux server die with a bad power supply but I still needed some of its data and services.

I removed the server disk and connected it to a ATA-USB converter. I could have just connected it to a linux virtual machine if I just needed the data but I wanted to boot from it.

VirtualBox makes it possible to connect a virtual machine to the physical disk. I plugged the USB converter into my Mac running OS-X and told the Mac to ignore the foreign file systems. Running diskutil in Terminal.app gave me the device assignment:

~/: diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *111.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS Macintosh HD 111.3 Gi disk0s2
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *38.2 Gi disk
1: Linux 101.9 Mi disk2s1
2: Linux 18.6 Gi disk2s
3: Linux 19.3 Gi disk2s3
4: Linux_Swap 188.2 Mi disk2s5


Virtual box has a command line tool to create a mapping from a virtual to a physical device:

~/: VBoxManage internalcommands createrawvmdk -filename `pwd`/linux.vmdk -rawdisk /dev/disk2
VirtualBox Command Line Management Interface Version 2.2.
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

RAW host disk access VMDK file /Users/verket/Library/VirtualBox/HardDisks/linux.vmdk created successfully.

I then used the VirtualBox GUI to define the IDE Primary Master as linux.vmdk. Booting my virtual machine accessed my physical drive through the USB converter giving me my server back but in virtual form.

Monday, May 25, 2009

MacBook Pro disk burner failure

I upgraded OS-X from 10.5.6 to 10.5.7 and suddenly my DVD burner wouldn't burn disks. It would create them but fail in the verification step. Trying the resulting disk in another machine confirmed that it was bad. I initially thought this was due to the update as I was also having other troubles now. Then I read through a discussion entry on the Apple site that pointed out that a number of people had dirty drives that didn't manifest themselves until the update.

Just to be sure, I put a 10.5.6 machine in target disk mode and booted my machine from it. The disk burner still failed.

I looked over a tear down video from MacSales to see what it'd take to get to the internal DVD drive. I also looked at the cover removal of the drive itself at http://muzso.hu/2008/08/17/how-to-clean-the-lens-of-a-slot-loading-optical-drive-a-macbook-pros-superdrive. Great stuff but too much work. The muzso.hu article had great pictures like this one:


The author circled the disk head in red -- note that it's not in the center but at the lower left. Getting out my compressed air, I inserted the straw through the slot on the left and gently blew it out with short bursts. That did the trick and the drive works again.

Nov. 11, 2015 update: The slot is at the bottom. As noted in the muss.hu link above, one can also use a moistened lens cleaning cloth wrapped around a thin card to reach the lens. Works quickly and well!

Sunday, April 26, 2009

APC UPS Beeper Silencing

After loosing a disk drive to a power failure, I finally broke down and bought a UPS for my Mac mini running OS-X server. The UPS works well but has a loud beep to warn you when it's lost power. That's great for an office setting but not for my home.

I initially used the built in support in Leopard server (10.5.6) with the APC Back-UPS ES 450 to perform a system shutdown when the battery gets drained. I tried installing the APC PowerChute Personal Edition (1.3.4) but it didn't appear to have any more functionality than what's built into the O/S!?

I then tried the Windows version (2.0) in a virtual machine. It had just what I wanted:

Unplugging from the VM, the UPS retained the setting. Outstanding questions:
  • Was there an easier, preferably Mac native, way?
  • There is a time-based option for silence. Is this implemented in the host O/S (Windows) or on board the UPS?