Home > Linux, VMware > ESX 4 CentOS Guest Showing Udev Unknown Key

ESX 4 CentOS Guest Showing Udev Unknown Key

After installing VMware Tools on a CentOS 5.3 guest hosted on ESX 4 I was receiving the following udev warnings during startup.

Starting udev: udevd[572]: add_to_rules: unknown key 'SUBSYSTEMS'
udevd[572]: add_to_rules: unknown key 'ATTRS{vendor}'
udevd[572]: add_to_rules: unknown key 'ATTRS{model}'
udevd[572]: add_to_rules: unknown key 'SUBSYSTEMS'
udevd[572]: add_to_rules: unknown key 'ATTRS{vendor}'
udevd[572]: add_to_rules: unknown key 'ATTRS{model}'

While they are harmless I personally find them annonying. The fix is to comment out the following udev rules for Debian and SuSE / Ubuntu in /etc/udev/rules.d/99-vmware-scsi-udev.rules. Your file should look like the following

# Redhat systems
ACTION=="add", BUS=="scsi", SYSFS{vendor}=="VMware, " , SYSFS{model}=="VMware Virtual S",   RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
 
# Debian systems
#ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware  " , ATTRS{model}=="Virtual disk    ",   RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
 
# SuSE / Ubuntu systems
#ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware, " , ATTRS{model}=="VMware Virtual S",   RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
Categories: Linux, VMware Tags: , , ,
  1. Rick
    July 20th, 2011 at 08:54 | #1

    In our case we are running Red Hat 5 and commented out Debian/Suse to eliminate the new ATTR error messages that show up during bootup, but we then discovered that the correct SCSI timeout is not set.

    Use this command to verify (top one works in Red Hat 4):
    for a in /sys/class/scsi_device/*/device/timeout; do echo -n “$a “; cat “$a” ; done;
    or
    for a in /sys/class/scsi_generic/*/device/timeout; do echo -n “$a “; cat “$a” ; done;
    You should see results of 180

    I was able to change the Red Hat line in 99-vmware-scsi-udev.rules to be:
    # Redhat systems
    ACTION==”add”, BUS==”scsi”, SYSFS{vendor}==”VMware” , SYSFS{model}==”Virtual disk”, RUN+=”/bin/sh -c ‘echo 180 >/sys$DEVPATH/device/timeout'”
    No trailing spaces allowed for vendor or model and it is case sensitive.
    And now it works for us with Debian/Suse commented out. Your mileage may vary, always reboot and test.

    Apparently, even if you are running Red Hat and didn’t touch the /etc/udev/rules.d/99-vmware-scsi-udev.rules file, that 180 would get set properly through one of the other rules still matching somehow. This problem only effects those of us that commented out the other lines to eliminate that boot screen error.
    Yes, if you ignore the boot messages you are fine, but this is still a bug. VMware is pattern matching on Debian or Suse for a Red Hat machine, that is just wrong (poor coding/testing). Of course a future update of vmware-tools will probably overwrite my changes to 99-vmware-scsi-udev.rules so I need to monitor that and also ask them to fix their script.

  1. No trackbacks yet.