[an error occurred while processing this directive] [an error occurred while processing this directive]
VMware

VMware Workstation 3.2

Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

FreeBSD as a Guest Operating System

FreeBSD as a Guest Operating System

Before installing the operating system, be sure that you have already created a directory for the new virtual machine and configured it using the VMware Workstation New Virtual Machine Wizard (on Windows hosts) or Configuration Wizard (on Linux hosts).

Various versions and distributions of FreeBSD have been tested with the current VMware Workstation distribution. The 3.x and 4.0 through 4.6 distributions of FreeBSD - specifically 3.1, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5 and 4.6 - are fully functional. Floppy, CD-ROM and network devices autoconfigure and work.

Installation of FreeBSD 4.6 may hang while probing devices. To work around this problem, power off the virtual machine and close the VMware Workstation window, then use a text editor to add the following line to the virtual machine's configuration (.vmx or .cfg) file:

cdrom.minVirtualTime=100

After you finish installing the guest operating system, remove this setting from the configuration file, as it may have a performance impact.

The issue addressed by this workaround has been resolved in FreeBSD 4.6.2. You do not need to take any special steps to install FreeBSD 4.6.2.

Versions of FreeBSD older than 4.4 do not boot if the operating system has been installed on a 2GB or larger SCSI virtual disk. To correct this issue, you need to set the disk geometry for the SCSI virtual disk.

Setting the Disk Geometry for a FreeBSD SCSI Virtual Disk

Setting the Disk Geometry for a FreeBSD SCSI Virtual Disk

If you are running a virtual machine with some versions of FreeBSD as the guest operating system on a 2GB or larger SCSI virtual disk, the guest operating system does not boot.

It fails to boot because the virtual disk geometry is not probed correctly by FreeBSD when you install the guest operating system. FreeBSD installs the boot loader in the wrong location on the virtual disk. When FreeBSD tries to boot, the FreeBSD boot loader asks the BIOS for important data that is now on a different section of the virtual disk, so FreeBSD cannot boot.

This problem has been fixed in FreeBSD 4.4. This and later versions correctly boot SCSI virtual disks of any size.

To use an older version of FreeBSD in your virtual machine, you can do one of two things:

  • Use an IDE virtual disk in your virtual machine. You may need to add the IDE virtual disk to the virtual machine with the Configuration Editor.
  • Set the disk geometry by hand when installing FreeBSD. These steps are outlined below.

To set the disk geometry manually, complete these steps.

  1. FreeBSD calculates an incorrect disk geometry before you arrive at the FDISK Partition Editor, as illustrated here.

  2. To set the disk geometry, press G to select the Set Drive Geometry option. A dialog box appears, containing numbers like 2055/64/32, representing the incorrect geometry in cylinders, heads and sectors per head.

  3. To calculate the correct geometry, find the total number of sectors by multiplying the number of cylinders, heads and sectors per head together, then dividing the number of sectors by the correct number of heads and sectors per head.

    In the above illustration, the virtual disk is a 2055MB disk with 2055 cylinders, 64 heads and 32 sectors per head (these numbers represent the incorrect geometry). The product of these three numbers (2055 x 64 x 32) equals 4,208,640 sectors.

    To determine the correct geometry for the BusLogic compatible virtual SCSI adapter used by VMware Workstation, calculate the number of cylinders, which is 4,208,640 sectors divided by the product of the actual number of heads and sectors per head (255 heads times 63 sectors per head). This results in a total of 261 actual cylinders (4208640/(255 * 63) = 261, rounded down).

  4. You can now enter the correct geometry of 261 cylinders, 255 heads and 63 sectors per head by typing 261/255/63 in the dialog box. Then click OK and continue installing FreeBSD.

<b>Other Issues with FreeBSD Guest Operating Systems</b>

Other Issues with FreeBSD Guest Operating Systems

  • FreeBSD 4.4 installs only from CD-ROM, and not from an ISO image.

    Note: With all versions of FreeBSD there is a problem probing for the CD-ROM device wdc1. FreeBSD sends an illegal ATAPI command to the IDE controller and ignores the error status reply. This results in a delay of approximately one-minute each time the system boots.

  • VMware has not tested sound support in FreeBSD.
  • The Linux emulation support in FreeBSD 3.1 is insufficient to run the X server provided by VMware for use on Linux systems running in a virtual machine. The VGA server distributed with FreeBSD works as expected.
  • The generic FreeBSD kernel works well. Users who want to configure a kernel specifically for use in a virtual machine can use a configuration file like the one below. Note that this file was created for FreeBSD 3.1.

    #

    # VMWARE -- Workstation virtual machine

    #

    # For more information read the handbook part System Administration ->

    # Configuring the FreeBSD Kernel -> The Configuration File.

    # The handbook is available in /usr/share/doc/handbook or online as

    # latest version from the FreeBSD World Wide Web server

    # <URL:http://www.FreeBSD.ORG/ >

    #

    # An exhaustive list of options and more detailed explanations of the

    # device lines is present in the ./LINT configuration file. If you are

    # in doubt as to the purpose or necessity of a line, check first in LINT.

    #

    machine "i386"

    cpu "I686_CPU"

    ident VMWARE

    maxusers 32

    options INET #InterNETworking

    options FFS #Berkeley Fast Filesystem

    options FFS_ROOT #FFS usable as root device [keep this!]

    options MFS #Memory Filesystem

    options MFS_ROOT #MFS usable as root device, "MFS" req'ed

    options NFS #Network Filesystem

    options NFS_ROOT #NFS usable as root device, "NFS" req'ed

    options MSDOSFS #MSDOS Filesystem

    options "CD9660" #ISO 9660 Filesystem

    options "CD9660_ROOT" #CD-ROM usable as root. "CD9660"req'ed

    options PROCFS #Process filesystem

    options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!]

    options UCONSOLE #Allow users to grab the console

    options FAILSAFE #Be conservative

    options USERCONFIG #boot -c editor

    options VISUAL_USERCONFIG #visual boot -c editor

    config kernel root on wd0

    # To make an SMP kernel, the next two are needed

    #options SMP # Symmetric MultiProcessor Kernel

    #options APIC_IO # Symmetric (APIC) I/O

    # Optionally these may need tweaked, (defaults shown):

    #options NCPU=2 # number of CPUs

    #options NBUS=4 # number of busses

    #options NAPIC=1 # number of IO APICs

    #options NINTR=24 # number of INTs

    controller isa0

    controller eisa0

    controller pci0

    controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2

    disk fd0 at fdc0 drive 0

    disk fd1 at fdc0 drive 1

    controller wdc0 at isa? port "IO_WD1" bio irq 14

    disk wd0 at wdc0 drive 0

    disk wd1 at wdc0 drive 1

    controller wdc1 at isa? port "IO_WD2" bio irq 15

    disk wd2 at wdc1 drive 0

    disk wd3 at wdc1 drive 1

    options ATAPI #Enable ATAPI support for IDE bus

    options ATAPI_STATIC #Don't do it as an LKM

    device acd0 #IDE CD-ROM

    device wfd0 #IDE Floppy (e.g. LS-120)

    device wt0 at isa? port 0x300 bio irq 5 drq 1

    # atkbdc0 controls both the keyboard and the PS/2 mouse

    controller atkbdc0 at isa? port IO_KBD tty

    device atkbd0 at isa? tty irq 1

    device psm0 at isa? tty irq 12

    device vga0 at isa? port ? conflicts

    # splash screen/screen saver

    pseudo-device splash

    # syscons is the default console driver, resembling an SCO console

    device sc0 at isa? tty

    # Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver

    #device vt0 at isa? tty

    #options XSERVER # support for X server

    #options FAT_CURSOR # start with block cursor

    device npx0 at isa? port IO_NPX irq 13

    #

    # Laptop support (see LINT for more options)

    #

    device apm0 at isa? disable flags 0x31 # Advanced Power Management

    device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4

    device sio1 at isa? port "IO_COM2" tty irq 3

    device sio2 at isa? disable port "IO_COM3" tty irq 5

    device sio3 at isa? disable port "IO_COM4" tty irq 9

    # Parallel port

    device ppc0 at isa? port? net irq 7

    controller ppbus0

    device nlpt0 at ppbus?

    device plip0 at ppbus?

    device ppi0 at ppbus?

    #controller vpo0 at ppbus?

    #device lnc0 at isa? port 0x1000 net irq 10 drq 0

    device lnc0 # probe on PCI

    pseudo-device loop

    pseudo-device ether

    pseudo-device sl 1

    pseudo-device ppp 1

    pseudo-device tun 1

    pseudo-device pty 16

    pseudo-device gzip # Exec gzipped a.out's

    # KTRACE enables the system-call tracing facility ktrace(2).

    # This adds 4 KB bloat to your kernel, and slightly increases

    # the costs of each syscall.

    options KTRACE #kernel tracing

    # This provides support for System V shared memory and message queues.

    #

    options SYSVSHM

    options SYSVMSG

    # The `bpfilter' pseudo-device enables the Berkeley Packet Filter. Be

    # aware of the legal and administrative consequences of enabling this

    # option. The number of devices determines the maximum number of

    # simultaneous BPF clients programs runnable.

    #pseudo-device bpfilter 4 #Berkeley packet filter

VMware Tools

VMware Tools

Be sure to install VMware Tools in your guest operating system. For details, see Installing VMware Tools.

Known Issues

Known Issues

On a Linux host with an XFree86 3.x X server, it is best not to run a screen saver in the guest operating system. Guest screen savers that demand a lot of processing power can cause the X server on the host to freeze.

previous Prev   Contents   Last   Next next