ESX archives - The ranting of an IT Professional

The ranting of an IT Professional:

ESX

Aug 14 2009   8:55PM GMT

Setting up Websense on a Virtual machine



Posted by: Jason Tramer
websense, ESX, vmware, VM, virtual machine, port mirroring, port spanning, vSwitch, promiscous

Ok so I was setting up a Websense VM in standalone mode and there are a few things that you need to do to make this work.

So, part of a Websense implementation includes setting up port spanning/mirroring on a port that connects to you monitor NIC so that it recieves all the traffic from your firewall. In ESX you will need to create a vSwitch for the Websense monitor network and allocate one of your physical NIC’s to to it which will plug into your mirror port on the switch.

The important step in creating this vSwitch is to go into the properties and enable it to act in promiscous mode, if you do not do this then your monitor vNic will not see any traffic.

After that just configure the second virtual NIC on your Websense VM to be a part of your Websense monitor network and Bob’s your uncle.

Jul 20 2009   2:12PM GMT

Unable to power on a VM: Corrupt Redo log



Posted by: Jason Tramer
ESX, vmware, corrupt redo log, Error message: msg.hbacommon.corruptredo:

Here is a sample of the error that you will see.

Error message: msg.hbacommon.corruptredo:The redolog of dmz-obs-000002.vmdk has been detected to be corrupt. The virtual machine needs to be powered on. If the problem still persists, you need to discard the redolog.

You will not be able to power off or reset the VM. You need to kill it manually.

Here is how you do that:

Instructions on how to foracbly terminate a VM if it is unresponsive to the VI client.

In this you will be terminating the Master World and User Worlds for the VM which in turn will terminate the VM’s processes.

1. First list the running VMs to determine the VM ID for the affected VM:
#cat /proc/vmware/vm/*/names

vmid=1076 pid=-1 cfgFile=”/vmfs/volumes/50823edc-d9110dd9-8994-9ee0ad055a68/vc using sql/vc using sql.vmx” uuid=”50 28 4e 99 3d 2b 8d a0-a4 c0 87 c9 8a 60 d2 31″ displayName=”vc using sql-192.168.1.10″

vmid=1093 pid=-1 cfgFile=”/vmfs/volumes/50823edc-d9110dd9-8994-9ee0ad055a68/esx_template/esx_template.vmx” uuid=”50 11 7a fc bd ec 0f f4-cb 30 32 a5 c0 3a 01 09″ displayName=”esx_template”

The displayname will be the name of your VM as it appears in the GUI

For this example we will terminate the VM at vmid=’1605′

2. We need to find the Master World ID, do this type:
# less -S /proc/vmware/vm/1605/cpu/status

Replace the number in this command with your vmid from above.

Expand the terminal or scroll until you can see the right-most column. This is labelled ‘group’. Unterneath the column you will find: vm.1604

In this example ‘1604′ is the ID of the Master World.

3. Run this command to terminate the Master World and the VM running in it:

/usr/lib/vmware/bin/vmkload_app –kill 9 1604

4. This should kill all the VM’s User Worlds and also the VM’s processes.

If Successful you will see similar:

Warning: Jul 12 07:24:06.303: Sending signal ‘9′ to world 1604.

You should then be able to work with your VM again


Jun 24 2009   7:36PM GMT

Shutdown a frozen VM



Posted by: Jason Tramer
vmware, VM, ESX, cmd, forzen, frozen

I was assisting a peer of mine with this issue. He had a VM where the guest OS froze. He attempted to shut off the VM but that also froze at 95%. He was then unable to do anything with the VM. We did some searching and found a way to force the VM offline from the command line which allowed us to then power the VM back on and everythign was fine.

Here is the link:

 http://www.vmware.com/support/esx21/doc/…


Mar 14 2009   1:40PM GMT

VM Converter - FAILED: A general system error occurred: The file is too big for the filesystem



Posted by: Jason Tramer
VM Converter, FAILED: A general system error occurred: The file is too big for the filesystem, VMFS, vmware, ESX

I recently got this error while trying to P2V a server. The reason? On default settings when setting up a VMFS volume (block size 1) the maximum size of a virtual disk is 256 GB’s.

Now what can you do to fix this? Well sad answer is you can reformat you VMFS volume with a different block size.

Block size Max Virtual Disk size
1 256 GB
2 512 GB
4 1024 GB
8 2048 GB

If that isn’t something you care to do then keep in mind by default VM Converter will take the maximum size of each volume on your physical server (c,d,e, etc) and lump them all into one physical disks. You can however go into the settings and create a virtual disk for each volume (something I recommend doing regardless). You can also adjust the size of the target virtual disk to eliminate free space, IE if your D drive is 325 GB but has 80 GB free then by default it will try to create a 325 GB virtual disk (and fail) but you can adjust the virtual disk size down to 245 GB.

Hope this helps


Feb 3 2009   2:23PM GMT

Installing HP Insight Manager on a ESX box



Posted by: Jason Tramer
ESX, System Insight Manager, HP, HPSIM, vmware

I found this very useful blog entry on instaling the HP SIM on ESX. The HP site has the install files but no acutal instructions on how to do the install. This can be very useful because as a consultant we rely on the ability to remotely administer servers but this is useful for any administrator.  Check it out;

 http://discardme.com/blog/2009/01/22/ins…


Jan 13 2009   3:25PM GMT

Cloning a VM on a ESX server with using Virtual Center



Posted by: Jason Tramer
ESX, virtual center

Without Virtual Center it is possible to clone a VM though there are a few more steps.

First create the target folder in your datastore, log into the command line and use “SU -” to log in as root.

Use the command “vmkfstools -i \vmfs\volumes\”datastore name”\”source folder name”\”source file”.vmdk \vmfs\volumes\”datastore name”\”target folder name”\”target file”.vmdk

Once the clone is complete you can create your new VM, point the disk source as the new vmdk file and Bob is your uncle!