Using VMware Fusion

From linsec.ca

Jump to: navigation, search

The most recent addition to the VMware family of products is VMware Fusion, virtualization software for Intel-based OS X systems. While not as feature-rich and robust as the venerable VMware Workstation product, Fusion is a worthy product in it's own right. If you're not afraid to get your hands dirty tinkering with configuration files and hidden settings that have no GUI frontend, you can tweak Fusion quite a bit. The current 1.0 version lacks a number of features that many think are important (namely support for mulitple snapshots), but despite it's (small) short-comings, it is a strong product.

Contents


Configuration Files

The configuration files for Linux guests may need some tweaking to work properly. While the VMware tools take care of most of the heavy lifting, it looks as though some (rather critical) pieces are missing. This section addresses these areas.

Xorg Settings

The VMware tools package, for some reason, doesn't seem to properly configure the Xorg server completely and certain steps may need to be taken to increase Xorg server performance as well as allow for the use of simple things like a functioning scroll wheel.

A working /etc/X11/xorg.conf file on Mandriva Linux 2007.1 is as follows:

# File generated by XFdrake (rev 142098)

# **********************************************************************
# Refer to the xorg.conf man page for details about the format of
# this file.
# **********************************************************************

Section "Files"
    # font server independent of the X server to render fonts.
    FontPath "unix/:-1"
    
    # minimal fonts to allow X to run without xfs
    FontPath "/usr/share/fonts/misc:unscaled"
EndSection

Section "Extensions"
    Option "Composite"
EndSection

Section "ServerFlags"
    #DontZap # disable <Crtl><Alt><BS> (server abort)
    #DontZoom # disable <Crtl><Alt><KP_+>/<KP_-> (resolution switching)
    AllowMouseOpenFail # allows the server to start up even if the mouse does not work
EndSection

Section "Module"
    Load "dbe" # Double-Buffering Extension
    Load "v4l" # Video for Linux
    Load "extmod"
    Load "type1"
    Load "freetype"
    Load "glx" # 3D layer
EndSection

Section "InputDevice"
    Identifier "Keyboard1"
    Driver "kbd"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    Option "XkbOptions" "compose:rwin"
EndSection

Section "InputDevice"
    Identifier "Mouse1"
    Driver "vmmouse"
    Option "CorePointer"
    Option "Protocol" "ps/2"
    Option "Device" "/dev/mouse"
    Option "ZAxisMapping" "4 5"
    Option "Emulate3Buttons" "true"
EndSection

Section "Device"
    Identifier  "VMware SVGA"
    Driver      "vmware"
EndSection

Section "Screen"
    Identifier "screen1"
    Device      "VMware SVGA"
    Monitor     "vmware"
    # Don't specify DefaultColorDepth unless you know what you're
    # doing. It will override the driver's preferences which can
    # cause the X server not to run if the host doesn't support the
    # depth.
    Subsection "Display"
        # VGA mode: better left untouched
        Depth       4
        Modes       "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       8
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier "layout1"
    InputDevice "Keyboard1" "CoreKeyboard"
    InputDevice "XWorkAround"
    InputDevice "Mouse1" "CorePointer"
    Screen "screen1"
        InputDevice     "XWorkAround"
        InputDevice     "XWorkAround"
EndSection


Section "InputDevice"
    Identifier "XWorkAround"
    Driver "void"
EndSection

Section "InputDevice"
        Identifier  "XWorkAround"
        Driver      "void"
EndSection

Section "Monitor"
    Identifier      "vmware"
    VendorName      "VMware, Inc"
    HorizSync       1-10000
    VertRefresh     1-10000
EndSection

Section "InputDevice"
        Identifier  "XWorkAround"
        Driver      "void"
EndSection

modprobe.conf settings

Another problematic area has been sound. Upgrading/recompiling the VMware tools consistently resets the sound alias in /etc/modprobe.conf, so when upgrading VMware tools or your kernel (and recompiling the drivers), you may need to make changes to /etc/modprobe.conf. I believe this may be dependant upon kernel versions and/or distributions, but on Mandriva Linux at least, what VMware wants to use ("alias sound es1371" instead of "alias sound snd-ens1371").

The following is a working Mandriva Linux 2007.1-based /etc/modprobe.conf:

install scsi_hostadapter /sbin/modprobe ata_piix; /sbin/modprobe ahci; /sbin/modprobe mptspi; /bin/true
alias eth0 vmnics
alias sound snd-ens1371
install usb-interface /sbin/modprobe uhci-hcd; /sbin/modprobe ehci-hcd; /bin/true
remove snd-ens1371 /sbin/modprobe -r snd-pcm-oss; /sbin/modprobe --first-time -r --ignore-remove snd-ens1371
install snd-ens1371 /sbin/modprobe --first-time --ignore-install snd-ens1371 && { /sbin/modprobe snd-pcm-oss; /bin/true; }
# Added by VMware Tools
install pcnet32 /sbin/modprobe -q --ignore-install vmxnet;/sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS;/bin/true

Configuring Fusion Network Settings

Dave Parsons wrote a whitepaper on Fusion network settings that he made available via the VMTN forums. His website also has some interesting VMware-related information as well. The information provided is largely based on what Dave has dug up, and his work is very much appreciated.

Configuration Tweaks

A number of Fusion configuration items are not exposed to the GUI configuration system. While many of these things can be configured in the VM properties with VMware Workstation, Fusion lacks the same level of configuration and control. Having said that, however, Fusion uses the same configuration files as Workstation, which means that using a text editor you can implement these little tweaks. It's manual, yes, but it works.

The global configuration file for Fusion is ~/Library/Preferences/VMware Fusion/preferences.

Visual Tweaks

Implement stretch-guest-to-fill screen

There is no option to allow Fusion to stretch the guest in order to fill the screen. This is similar to fullscreen without actually entering fullscreen mode. This can be enabled by adding the following to the preferences file:

pref.autoFitFullScreen = "fitHostToGuest"

Keyboard Tweaks

Swapping the Alt and Command Key

When using a Windows guest, it may feel like the "Windows" and Alt keys are swapped, depending on the keyboard you are using on your Mac. Typically, the Alt key should send the Alt keystroke and the Command key should send the "Windows" keystroke, but it may be inverted (again, depending on the keyboard you are using). You can swap the keys allowing it to feel more natural to your fingers by adding the following to your preferences file, however keep in mind that this will not work in Unity mode, only in Windowed/fullscreen modes:

mks.keyboard.swapAlt = TRUE
Personal tools
Toolbox