Jan 13

This is the easiest esxi thumb install yet. Just download the iso file, grab a thumbdrive and dd a single file onto the drive. Assuming that your thumbdrive is /dev/sdd, just run the following.

mount -t iso9660 -o loop VMware-VMvisor-Installer-4.1.0-260247.x86_64.iso /mnt/cdrom/
bzip2 -d /mnt/cdrom/imagedd.bz2 -c | dd of=/dev/sdd

Done, boot it up!

Jan 9

I’m not going to say that this is a really embarrassing bug, but a whole bunch of other people will. If you are using openfiler 2.3 64 bit and select a network’s access to a share to be read only, samba will panic and create a core every time you try to access that share. The bug does appear to be upstream, not openfiler specific, but damn man! The fix is to revert back to an older version of samba and stay there. To revert back, ssh into your openfiler and run the following.

conary update samba=3.2.6-0.0.1-1
conary update samba-client=3.2.6-0.0.1-1
conary update samba-server=3.2.6-0.0.1-1
/etc/init.d/smb restart

That should take care of it.

Jan 8

I have recently moved us from having two boxes, the ESXi server and a file server, down to just the ESXi host. This is a great thing because what used to be 14 servers in a rack in the basement, all with howling fans and clunking harddrives, has been reduced to a single quad core chassis sitting lonely in a 7 foot rack. Where I’m not as comfortable though is with running a vm as my file server and having all of my data tied up in vmdks without a solid, enterprise storage array behind it.  If something goes wrong I want the peace of mind of being able to rip the drives out of my server, pop them into another box and be back on my feet in a matter of minutes. I’m not certain I can do that if I have all of my data spread across 9 or 10 vmdk files on 3 drives, but I know I can pop a linux based, 3 disk RAID-5 set into any old linux machine and be online. My solution is to create a linux file server in vmware, but give it raw access to some attached SATA drives so the drives end up looking and working just like they had come out of a physical machine. No vmware vmdk or other info anywhere in sight. VMWare will allow you to setup raw disk maps to storage that is located on a SAN using the VI client, but not to local SATA storage. Fortunately it’s a very simple process to hack and works like a charm.

You’ll need ssh access to your esxi host, a vmfs that you are not doing raw access to in order to store a mapping file and drives to map.

First, ssh into your esxi server and run fdisk -l to get a listing of all of the drives that you esxi host sees. The format will look something like this

~ # fdisk -l

Disk /dev/disks/t10.ATA_____ST32000542AS________________________________________5XW205BS: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

The key being “/disks/t10.ATA_____ST32000542AS________________________________________5XW205BS” . That is how ESXi uniquely identifies your drive. I believe it breaks down to something along the lines of /disks/controler.interface_Drive-model_Drive-serial-number, but I’m mostly making that up as I go.

Now that we have the drive identified, we need to take that information and create a drive map file. cd over to a datastore that is NOT a raw mapping (i.e. I have a 500 gig drive in my box that hosts most of my vms called SATA-500 in /vmfs/volumes/SATA-500, so I would cd into there) and run the following, replacing with your own information as needed. Note that I use buslogic adapters on my VMs, if you use lsilogic, replace buslogic with lsilogic. The name “RAW-2TB.vmdk” is free form, but I would try to make it descriptive and it must be a .vmdk extension.

vmkfstools -z /vmfs/devices/disks/t10.ATA_____ST32000542AS________________________________________5XW205BS RAW-2TB.vmdk -a buslogic

Two files get created after you run that command. The RAW-2TB.vmdk file that we specified and a RAW-2TB-rdmp.vmdk . You can cat the RAW-2TB.vmdk file to get a look at how vmware saw your drive and what kind of information it’s passing back to the hypervisor on how to use it, but I would not mess with that rdmp file. Think of it as the actual disk, doing a cat on that file is going to give you nothing but a messy terminal if the console will allow you to do it at all.

At this point, switch into your vcenter client and go to the VM that you want to assign these drives to. Go into Edit Settings, Add a Hard Disk, Use an Existing Virtual Disk and browse to the RAW-2TB.vmdk file that was just created. When you select that file, ESXi reads all of the information in it and grants that VM access to that drive without any additional vmware specific info ever getting written to the disk. You can pop that disk into a physical machine and it would read it just as if it came out of a physical machine.

Oct 20

The cacls command lets you edit permissions from the command line on windows

E:\>cacls Folder

outputs

E:\Folder BUILTIN\Administrators:F
BUILTIN\Administrators:(OI)(CI)F
NT AUTHORITY\SYSTEM:(OI)(CI)F
CREATOR OWNER:(OI)(CI)(IO)F
BUILTIN\Users:(CI)(special access:)

adds full control of Folder to my user
E:\> Cacls Folder /E /G cyborg:F

removes full control of Folder from my user
E:\> Cacls Folder /E /R cyborg:F

Oct 15

I’m a regular user of the logger command on linux boxes and I’ve found the equivalent in windows. The command is called eventcreate.exe and seems to be present from windows XP forward. To create an informational event in the application log with a message subject of “Test message”, an arbitrary message id of 13 and a message text of “This is a test” you would just run the following


eventcreate /t information /l application /so "Test message" /id 13 /d "This is a test"

More info on eventcreate.exe can be found at microsoft

« Previous Entries Next Entries »