Thursday, October 22, 2009

Windows 7 Virtual Machine under VMware Fusion

I recently got a new MacBook Pro. I have used various flavors of VMware in the past (VMware workstation under Windows and Linux desktops; VMware Server and ESX 3.5 ; VSphere) - But never  Fusion.
It's pretty darn easy to install. However, the version of VMware fusion I have installed (2.0.6) does not have a virtual machine type for Windows 7  In the past It seems that you can use another VM type with an unsupported OS with good results.. In fact the VMware Team fusion blog recommends using Win 2008 server virtual machine.
Other salient points they suggest:
  • Disable 3D Acceleration
  • Disable Shared Folders
...Wah, my .iso file was corrupt. See you in 4 hours afer I get another copy. ...two weeks later
Well it turned out that the version of Windows 7 that I was entitled to was an "upgrade" version. And therefore crippled and not bootable. I could have  gone through a whole install of Windows XP, and then upgraded it. But what a waste. But how to make it bootable?

The most straighforward brain-dead way I found is to copy the .iso to a windows machine, and use a program microsoft provides which will make my .iso file into a bootable DVD or USB : .  However, this is an annoying and inelegant solution. All I  really want to do is to graft one little boot loader file into the .iso which is already on my disk. To accomplish this I have to burn my non-bootable iso to a dvd or otherwise copy it to a windows machine, and then burn it to a dvd or bootable usb stick there, and then bring it back.? Wah.

Yikes. I would much rather spend 5 hours learning about how to do this  smarter than spend 1 hour doing something dumb.

Hmm! Boot sectors and bootloaders and .isos oh my!

I got some inspiration from this post:
To look at mkisofs on OS X as the means to slam that boot sector into my existing .iso file.

  1. Download mkisofs, from helios:
  2. Open a terminal window ( and copy the executable into somewhere in your path (e.g. /usr/bin or /usr/local/bin )
  3. Find the existing .iso file in finder and double click it to mount it as a file system. 
  4. Use mkisofs to create the new .iso file by copying all the files from the mounted .iso file together with the new boot sector file:
mkisofs -v  -hfs-unlock  -N   -U -udf  -no-emul-boot   -no-hfs  -nolimit-pathtables  -ignore-changed-files  -b boot/ -c boot.catalog  --osx-hfs  -iso-level 4 -o /Users/yournamehere/yourshinynewisofile.iso  /Volumes/thenameofoldisofile

not sure that all flags are necessary (e.g. -ignore-changed-files, --osx-hfs, -nolimit-pathtables?). The key discovery was that is the boot image in /boot on the non-bootable iso, which is written to the boot sector (-b flag) by mkisofs.

And guess what it worked!

1 comment:

  1. Glad to hear my research and post helped you out. Finding a Mac OS only solution to problems like this saves so many hours and the loss of countless brain cells.

    I use VMWare Fusion at work but I've been running Vista, haven't found the downtime to upgrade to Windows 7 yet, although my VM is one of the last couple non-Windows-7 machines in the office.