ESX – How to Power off an unresponsive VM

It happened to me the other day, the vm was stuck because another process was locked (a snapshot in my case).

I found out that the best way is this:

1. Log in to ESX console and determine the WorldID with the command:

# vm-support -x

2. Determine the master world ID with the command:

# less -S /proc/vmware/vm/****/cpu/status

or on Vsphere

less -S /proc/vmware/vm/****/names

3. Scroll to the right with the arrow keys until you see the group field. It appears similar to:

Group
vm.****

4. Run the following command to shut the virtual machine down with the group ID:

# /usr/lib/vmware/bin/vmkload_app -k 9 ****

If the preceding steps fail, perform the following steps for an ESX 4.x host:

1. List all running virtual machines to find the vmxCartelID of the affected virtual machine with the command:

# /usr/lib/vmware/bin/vmdumper -l

2. Scroll through the list until you see your virtual machine’s name. The output appears similar to:

vmid=5151       pid=-1  cfgFile=”/vmfs/volumes/4a16a48a-d807aa7e-e674-001e4ffc52e9/mdineeen_test/vm_test.vmx”  uuid=”56 4d a6 db 0a e2 e5 3e-a9 2b 31 4b 69 29 15 19″  displayName=”vm_test”  vmxCartelID=####

3. Run the following command to shut the virtual machine down with the vmxCartelID:

# /usr/lib/vmware/bin/vmkload_app -k 9 ####

,

No Comments

Choice

Microsoft finally comes to its senses (obliged by the law, of course).

browser-choice

,

No Comments

Basterds, Inglorious

I’m a declared fan of Tarantino. His last released movie, Inglorious Basterds, is a masterpiece, in my opinion. Although, I wasn’t very excited about the nazi-ww2 theme, Tarantino’s perspective is quite unique. His ability, to transform matters serious, tough, violent even, in fun stuff is great. Watch this part, is hillarious, Brad is great with his redneck accent, even though the context of the situation was serious (assassination of Hitler).  Watch this movie, and after that…watch it again, surely you missed something.


,

No Comments

How to resize LVM (extend or reduce)

Logical Volume Manager is great, you can manage your disks and partitions in volumes. The most common task is to extend a volume or reduce one.

You can extend a volume while the system is running, which is preaty great. Here’s how:

1. Let say your physical disk is /dev/sda, you already have two partitions (/dev/sda1 and /dev/sda2) and want to extend the rest of the free space. fdisk /dev/sda and create a new partition /dev/sda3

2.  pvcreate /dev/sda3

3.   vgextend VolGroup00 /dev/sda3

4.   lvextend /dev/VolGroup00/LogVol00 /dev/sda3

5.   resize2fs /dev/VolGroup00/LogVol00

Now, asume that we want to reduce. This is a little bit tricky, you can not do it on the fly. You have to boot with a rescue cd (can be CentOS cd1 and type linux rescue at prompt).

1. lvm vgchange -a y

2. e2fsck -f /dev/VolGroup00/LogVol00

3. resize2fs -f /dev/VolGroup00/LogVol00 20G

4. lvm lvreduce -L10G /dev/VolGroup00/LogVol00

Happy resizing !

No Comments

Hello world!

Why? To forward information about things that I’m interested.  I myself use the  experiences and informations of other people,  so it’s my time to give back from my knowledge gained.

About what? Information technology mostly (my professional domain), but also about music, movies, some photografy and not least, thoughts that wander in my head and needs to let loose.

Here we go…

No Comments