VMware Cloud Community
jcwuerfl
Hot Shot
Hot Shot

udev & scsi_id with rhel guests

I was looking at creating some udev devices on rhel5.5 in a guest VM on ESXi 4.1 update 1 and was noticing when I run :

scsi_id -g -u -s /block/sdc

Nothing is coming back at all.  I tried:

scsi_id -g -u -x -a -s /block/sdc

ID_VENDOR=VMware

ID_MODEL=Virtual_disk

ID_REVISION=1.0

ID_SERIAL=

ID_TYPE=disk

ID_BUS=scsi

But nothing else, and can't get a UUID at all.    Has anybody been able to create a udev devices using a GUIDs? or etc?  I want to create a persistant udev and raw device so that when I reboot the VM and if I change/add a device on 0:2 or whatever that the /dev/sd* names that are mapped to /raw/raw* devices don't get moved around automatically.

Thanks

0 Kudos
1 Reply
jcwuerfl
Hot Shot
Hot Shot

Do I get points if I answer my own question?


Use the following procedure to enable the disk UUID:

   1. Start the vSphere Client, and log in to a vCenter Server.
   2. Select Virtual Machines and Templates and click the Virtual Machines tab.
   3. Right-click the virtual machine for which you are enabling the disk UUID attribute, and select Power > Power Off.
      The virtual machine powers off.
   4. Right-click the virtual machine, and click Edit Settings.
   5. Click the Options tab, and select the General entry in the settings column.
   6. Click Configuration Parameters.
      The Configuration Paramters window appears.
   7. Click Add Row.
   8. In the Name column, enter disk.EnableUUID.
   9. In the Value column, enter TRUE.
  10. Click OK and click Save.
  11. Power on the virtual machine.

2) Edit /etc/scsi_id.config

# options=-b
add
options=-g                                <---  Allows you to see the UUID


-b:  The default behaviour - treat the device as black listed, and do nothing unless a white listed device is found in the scsi_id config-file.
-g:  Treat the device as white listed. The -g option must be specified on the command line or in the scsi_id configuration file for scsi_id to generate any output.         

Should now be able to do :

scsi_id -g -u -s /block/sdc

0 Kudos