Subject: Re: vmware 2.04 and raw disks
To: None <current-users@netbsd.org>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: current-users
Date: 11/18/2002 16:43:26
OK, I've got vmware running on NetBSD now. Although I am currently using it
on 1.6I, this upgrade was probably not necessary... I wrote a small summary
of what was needed to get this going:


- Raw disks don't work!

This means that if you are in a situation that you want/need a dual boot
system you'll need a plainDisk. Since vmware sometimes chokes on a disk
that contains a NetBSD disklabel, the best way to setup a Plaindisk
configuration is to configure a virtual disk in the configuration wizard.
The size does not matter since you can remove the virtual disk afterwards.
When the wizard is finished, change the deviceType of the disk in the .cfg
file to 'plainDisk'. Now you have to correctly fill in the geometry of the
plainDisk. The filename is the 'fileName' field in the disk description
(usually: ide0:0.fileName). The contents of that file should look something
like this:
    DRIVETYPE      ide
    CYLINDERS    16384
    HEADS           16
    SECTORS         63

    ACCESS "/root/vmware/win2000/disk.mbr" 0 63
    ACCESS "/dev/rwd0e" 63 8193087
    ACCESS "/dev/rwd0f" 8193213 4176837

The disk.mbr is a copy of the master boot record. You can create it by:
   dd if=/dev/rwd0d of=disk.mbr count=63

Now that the mbr is a fake anyway, it is best to rip out all partitions that
vmware should not know about. They sometimes give you mysterious crashes. The
easiest way to accomplish this is:
    vnconfig vnd0 disk.mbr 512/63/1/1
    fdisk -u vnd0

You might also like the '-a' and '-i' options of fdisk, boot selectors are
annoying when there is only one actual choice left...

To determine the other components of the plain disk, you'll need fdisk too.
The first nummeric field is the offset, the second one the size. You can
directly take them from the fdisk table.

- Hardware profiles
Check out the vmware documentation on Setting Up Hardware Profiles in
Virtual Machines
(http://www.vmware.com/support/ws2/doc/hardwareprofiles_ws_linux.html).
This might save you some work in re-installing drivers for the real hardware
afterwards. It's not fatal, just very annoying.

- Vmware segfaults or other mysterious errors
For w2000 and XP, check out the part on ACPI:
  http://www.vmware.com/support/ws3/doc/ws32_disks8.html#1009931
You will get lots of weird crashes (including vmware/sig11) when this is
wrong.