www.vmwareadmins.com

how many VMs can you put in a box?

  • Increase font size
  • Default font size
  • Decrease font size
Welcome to VMwareAdmins.com!

**Indy VMUG Demo Days 3**

E-mail Print PDF

**Indy VMUG Demo Days 3**
FREE to all attendees, including parking!

Where: Indiana Convention Center
When: Tuesday, July 27th - 7am-6pm
Register at: http://demodays.info

-50 vendors in the exhibitors hall
-28 Breakout Sessions
-ThinApp hands on lab
-Cloud Lounge Room
-On-site Massages
-Whiteboard Sessions
-More to come...

 

If you get a chance to attend, I highly recommend it! It's a great event!

 

Bash script to fix grub on aligned linux VM's

E-mail Print PDF

I wrote a script to automate the grub correction after aligning Linux VM's that use the Grub  bootloader.

Assumptions:

  •  NFS datastore mounted to helper VM under /vmfs/volumes with same name 
  • vmware-mount utility located under /usr/bin

#!/bin/bash

DISKNAME=`echo $2 | sed 's/.*\///g' | sed 's/\.vmdk//g'`

mkdir "/mnt/$DISKNAME";
vmware-mount -f "/vmfs/volumes/$1/$2" "/mnt/$DISKNAME";
echo "(hd1) /mnt/$DISKNAME/flat" > "/tmp/$DISKNAME.map";
grub --batch --device-map="/tmp/$DISKNAME.map" <
root (hd1,0)
setup (hd1)
quit
EOF
vmware-mount -k "/vmfs/volumes/$1/$2";
rmdir "/mnt/$DISKNAME";
rm "/tmp/$DISKNAME.map";

Then use like:

/root/fixGrub.sh nfs_entprf01_linux_vol001 testvm/testvm.vmdk

Last Updated on Tuesday, 06 July 2010 09:49
 


Page 4 of 22

Follow Me On...

Facebook linkedin twitter youtube

Polls

What Version of vSphere are you purchasing?