Get VM guests MAC Address Script

Posted on October 15th, 2008 in Tips | 1 Comment »

This is just to share a simple script – “How to find out VM guest MAC address for each VMware ESX” server as below:

## Script START here

# Get VM Guest Mac Address –
# The script must run as root on VMware ESX server.
# This work is licensed under a Creative Commons License permitting non-commercial sharing with attribution
# Change Log:
# 15 Oct 2008 – version 0.1

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin

id_check() {

if [ `id -u` -ne 0 ]
echo “You must be root to run this script!”


for COUNT in $(vmware-cmd -l); do
echo `echo $COUNT|awk -F’/’ ‘{print $6}’`
echo ” “`echo $COUNT`
echo ” “`cat $COUNT|grep “displayName”`
#MAC Address may refer to “Address” instead of “generatedAddress”
echo ” “`cat $COUNT|grep “generatedAddress”`

## Script END here

Read more »

My Personal Experience about Citrix XenServer 5.0

Posted on October 8th, 2008 in Virtualization, Xen | 25 Comments »

Yesterday Craig mentioned about 8 VCPU per VM on Citrix XenServer 5 is really a good stuff from Citrix and I must admit that.

I did a quick test and I would like to share my personal review about Citrix XenServer 5.0:

Personally I think network speed is fast compare to VMware ESX. I have a physical 1Gbps NIC network speed and I can get 2Gbps network speed after install XenTools on Windows 2008 server but require 2 times reboot(SuSE Linux require 1 reboot). Anyway VM guest shutdown and reboot process is faster than VMware ESX.

Citrix XenServer

I was try to install SuSE Linux 10 using 4 ISO CD (both NFS or CIFS), the Citrix XenServer always give me an error “The VM rejected the attempt to detach the device xxxxx refusing to close” when switch ISO CD1 to ISO CD2. You have to extract 4 ISO CD into one single location to make it work or copy ISO to local storage(provider you have enough local disk space).

Citrix XenServer

The enterprise product should not have similar issue and this is not make sense at all.

Citrix XenServer

Anyway, you can try alternative way using “Install URL” instead of using ISO Image once you have extract ISO CD into single folder on your web server.

Install URL: http://xx.xx.xx.xx/inst/10/32/SP2/ALL
Advanced Boot OS Parameters:
console=ttyS0 xencons=ttyS hostip=xx.xx.xx.xx/24 gateway=xx.xx.xx.xx dnsserver=xx.xx.xx.xx

Please make sure your have correct IP, gateway and DNS setup properly else you will getting error during installation.

Read more »

Tips: Add new disk online

Posted on September 25th, 2008 in Operating Systems, Storage, Tips | 4 Comments »

The following article will share how to add new hard disk into SuSE Linux Enterprise Server without reboot.

Follow these steps:

  • Create a new LUN and assign to the ESX Server Storage Group on SAN.
  • Rescan Storage Adaptors on ESX Server Virtual Infrastructure Console.
  • Add new Hard Disk into VM by Edit Setting.
  • Open VM Console(SSH will work as well).
  • Detect new disk command #
  • Find new disk command # cat /proc/partitions
  • Create new partition on the disk command # fdisk /dev/sdx
  • Format new disk partition # mkfs.ext3 /dev/sdx1
  • Edit /etc/fstab to add in permanent mount point for new disk and partition.
  • Mount new disk # mount -a

Read more »

Running SuSE Linux Cluster on VMware

Posted on September 12th, 2008 in Operating Systems, Tips | 15 Comments »

What? Running SuSE Linux Cluster on VMware ESX? Basically if you have VMware HA and DRS enable, your virtual machine is running on cluster mode. Then, why running Linux cluster on VMware? Who care? It’s just for fun and for personal testing purpose only.

1st, create two SuSE Linux(I’m running SLES 10 SP2) on VMware running on same network said cluster1( and cluster2(

2nd, add new hard disk on VMware infrastructure client. Please remember to choose ‘Use an existing virtual disk‘.

Click here for bigger image.

3rd, install and configure Linux cluster heartbeat.

Make sure you have heartbeat RPM install
cluster1:~ # rpm -qa|grep heartbeat

cluster2:~ # rpm -qa|grep heartbeat

Install Linux cluster heartbeat RPM package if you haven’t install
cluster1:~ # rpm -ivh heartbeat-xxxxxx
cluster1:~ # rpm -ivh heartbeat-stonith-xxxxxx
and etc

Edit Authentication file (same for cluster1 and cluster2)
cluster1:~ #vi /etc/ha.d/authkeys
auth 2
2 sha1 MVM_CLUS2!

Read more »

Tips: VM Network Problem

Posted on September 10th, 2008 in Tips | No Comments »

For some reason, when you require to clone or deploy a new VM guest using a template from one ESX host to another ESX host that having different network setup, you may have network problem.

Said for example, I have a SuSE Linux VM template sitting on ESX 1 which is only using “VMNetwork1” network setting. Whenever I clone or deploy this template to ESX 2 which is only using “VMNetwork2” network setting, I’m sure you will getting annoying error when power on the virtual machine.

VM network
You can’t change using “Edit Settings”.

Read more »