VMware on Linux over NX from OS X

Posted by Hans Fugal Wed, 08 Aug 2007 16:23:54 GMT

I was a beta tester for VMware Fusion. Fusion is a quality product, as I've come to expect from VMware. Unfortunately, the beta is over and a dialog box popped up when I tried to run it the other day. "The long wait is over!" Yeah, I've been waiting with bated breath for my beta to stop working until I fork over $40. You read my mind!

$60 ($40 after the current promotion) is the most affordable virtualization option for OS X right now, and in my opinion the most technically superior to boot. But I'm still a cheapskate, so I decided to use VMware Server on Linux over NX instead. NX is indistinguishable from magic. It works great, with one problem: the keyboard mapping in the virtual machine is completely skewampus.

In googling for the answer, I found a few people who had trouble with a key here or a key there. No, I had a completely unusable keyboard. e was the backspace key, backspace was a comma, escape was a letter, and everything else in between was equally unreasonable.

So I tried it over ssh (btw, it works a lot faster if you use ssh -Y instead of ssh -X), and it worked fine. So the gauntlet was down.

After some stabbing in the dark, reading, more stabbing in the dark, more reading, finally understanding, and one last stab in the dark, I got it to work. The theory is in this article. In short, VMware tries to map key codes to emulated PC scan codes (v-codes). If it can't do that, it maps keysym codes to v-codes. The former is apparently foolproof but isn't always an option. The problem here is that VMware thinks it will work, but it won't (probably because Apple's X11 isn't XFree86). So we simply need to put this in ~/.vmware/config:

xkeymap.nokeycodeMap = true

Comments

  1. Clint Savage said about 2 hours later:

    skewampus - I wondered how you spelled that anyway.

    I like this article. I like the use of VMWare, but am curious if there isn't really a better alternative out there. Must be because Mac only has a few options. I know of parallels, busybox, KVM, Xen and others. Do none of these work on a Mac?

    Cheers,

    Clint

  2. Scott Lowe said about 2 hours later:

    As far as Mac virtualization goes, there aren't too many players in town right now. Parallels (with Parallels Desktop) was the first in the game, and now VMware has Fusion. VirtualBox (which I understand is based on QEMU) has an OS X version available as well. Parallels and Fusion work only on Intel-based Macs; I don't know about VirtualBox but I suspect it's the same.

    There's also a native port of QEMU called Q, which runs on both Intel-based Macs as well as PPC-based Macs. However, I believe that it is still not fully virtualizing the CPU and therefore takes a performance hit as a result. PPC-based Macs can also still use VirtualPC for the Mac, from Microsoft.

    Hope this helps!

  3. chucky said 5 months later:

    Thanks a lot for this article!

    greetings from Germany

  4. Alex said 8 months later:

    Great! Saved me a lot of time...thank you very much.

  5. Jim Blackler said 8 months later:

    Excellent, this appears to have solved my garbled keyboard (NX on OSX -> Ubuntu) problem.

    One thing, I didn't have a ~/.vmware/config file, so I modded the ~/.vmware/preferences file instead.

(leave url/email »)

   Comment Markup Help Preview comment

Tags

asterisk audio bash bread cs diy fat food health life linux mac music osx review ruby sourdough src typo voip