2008/03/20

virtual runabout

To move a vm (on vmare 5.5.5) from

kernel 2.6.18-gentoo-r6 (old tools from the iso image)

to

kernel 2.6.24-gentoo-r3 and open-vm-tools (keyworded in portage)

  1. the kernel LSI scsi driver is borked - resulting in the kernel panicing when it can't find the root device. Fix that by hand applying this patch.
  2. the pcnet32 driver loads, but its interrupt is immediately disabled and no interface is created- so switch to the e1000 driver and be happy.
The vmx incantation to get an e1000 is:

ethernet0.virtualDev = "e1000"

And an updated patch:

--- mptbase.c_orig 2008-03-20 21:15:32.000000000 +0000
+++ mptbase.c 2008-03-20 21:17:46.000000000 +0000
@@ -2844,6 +2844,18 @@
pfacts->IOCStatus = le16_to_cpu(pfacts->IOCStatus);
pfacts->IOCLogInfo = le32_to_cpu(pfacts->IOCLogInfo);
pfacts->MaxDevices = le16_to_cpu(pfacts->MaxDevices);
+
+ /*
+ * VMware emulation is broken, its PortFact's MaxDevices reports value
+ * programmed by IOC Init, so if you program IOC Init to 256 (which is 0,
+ * as that field is only 8 bit), it reports back 0 in port facts, instead
+ * of 256... And unfortunately using 256 triggers another bug in the
+ * code (parallel SCSI can have only 16 devices).
+ */
+ if (pfacts->MaxDevices == 0) {
+ pfacts->MaxDevices = 16;
+ }
+
pfacts->PortSCSIID = le16_to_cpu(pfacts->PortSCSIID);
pfacts->ProtocolFlags = le16_to_cpu(pfacts->ProtocolFlags);
pfacts->MaxPostedCmdBuffers = le16_to_cpu(pfacts->MaxPostedCmdBuffers);


Switching to the buslogic driver (especially for new systems) would seem to be a better medium term solution.

The e1000 needs to be blacklisted to allow vmxnet grab the virtual ethernet dev - but a job for another day.