Category Archives: VMware

VMware – Virtual Machines MAC address range assigned to VMware from IEEE..

IEEE has assigned specific range to VMWare for assigning MAC address to their virtual machines.

The vNIC MAC addresses include the OUI ( Organization Unique Identifiers) assigned by IEEE to Vmware.

The range may be use my VMware are –

1-     00-56-50-xx-xx-xx
2-     00-0c-29-xx-xx-xx

Note – Click on VM running on ESX/ESXi and check their MAC address. mostly it should be 00-56-50-xx-xx-xx

 

Advertisements

Compilation of busybox-1.18.3 in order to support additional POSIX command to Vsphere5

 Note –  This is unsupported features of VMware – Please use at own risks.
VMware is currently using BusyBox v1.9.1-VMware-visor-6030 on Vsphere5

Steps for compilation of busybox

Note– I am using CentOS 5.x for compiling BusyBox.

1 –  Download busybox on /usr/src/redhat/BUILD

[root@linux10 ~]# wget http://busybox.net/downloads/busybox-1.18.3.tar.bz2
–23:15:09–  http://busybox.net/downloads/busybox-1.18.3.tar.bz2
Resolving busybox.net… 140.211.167.224
Connecting to busybox.net|140.211.167.224|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 2119251 (2.0M) [application/x-bzip2]
Saving to: `busybox-1.18.3.tar.bz2′

100%[=====================================================================>] 2,119,251   35.4K/s   in 82s

23:16:32 (25.4 KB/s) – `busybox-1.18.3.tar.bz2′ saved [2119251/2119251]

You have new mail in /var/spool/mail/root
[root@linux10 ~]#

========================================================================

2 – Checking/Extracting the busybox

[root@linux10 BUILD]# ls -tlr
total 2076
-rw-r–r– 1 root root 2119251 Feb  9  2011 busybox-1.18.3.tar.bz2
[root@linux10 BUILD]# tar -xf busybox-1.18.3.tar.bz2
[root@linux10 BUILD]# cd busybox-1.18.3
[root@linux10 busybox-1.18.3]# ls
applets    console-tools  editors    INSTALL     mailutils        miscutils   README   sysklogd              TODO
arch       coreutils      examples   libbb       Makefile         modutils    runit    TEST_config_nommu     TODO_unicode
archival   debianutils    findutils  libpwdgrp   Makefile.custom  networking  scripts  TEST_config_noprintf  util-linux
AUTHORS    docs           include    LICENSE     Makefile.flags   printutils  selinux  TEST_config_rh9
Config.in  e2fsprogs      init       loginutils  Makefile.help    procps      shell    testsuite
[root@linux10 busybox-1.18.3]#

======================================================================================
3 – compiling busybox to largest generic configuration with defconfig

[root@linux10 busybox-1.18.3]# make defconfig
[root@linux10 busybox-1.18.3]# make

Last fews lines –

CC      util-linux/volume_id/volume_id.o
CC      util-linux/volume_id/xfs.o
AR      util-linux/volume_id/lib.a
LINK    busybox_unstripped
Trying libraries: crypt m
Library crypt is not needed, excluding it
Library m is needed, can’t exclude it (yet)
Final link with: m
DOC     busybox.pod
DOC     BusyBox.txt
DOC     busybox.1
DOC     BusyBox.html
[root@linux10 busybox-1.18.3]#

=====================================================================

4 –  If compilation went well it will create  “busybox” binary file inside the current directory

[root@linux10 busybox-1.18.3]# ls -trl busybox
-rwxr-xr-x 1 root root 744680 Nov  5 23:20 busybox

[root@linux10 busybox-1.18.3]# file busybox
busybox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped

[root@linux10 busybox-1.18.3]# ./busybox
BusyBox v1.18.3 (2011-11-05 23:18:53 IST) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]…
or: busybox –list[-full]
or: function [arguments]…

BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable.  Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.

Currently defined functions:
[, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash, awk, base64, basename, beep, blkid, blockdev, bootchartd,
brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear,
cmp, comm, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df,
dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir,
envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs,
flock, fold, free, freeramdisk, fsck, fsck.minix, fsync, ftpd, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, halt, hd,
hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd, ifup, inetd, init, insmod,
install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5,
klogd, last, length, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq,
lpr, ls, lsattr, lsmod, lspci, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom, mkdir,
mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount,
mountpoint, mpstat, mt, mv, nameif, nbd-client, nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od, openvt, passwd, patch, pgrep,
pidof, ping, ping6, pipe_progress, pivot_root, pkill, pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pwd,
raidautorun, rdate, rdev, readahead, readlink, readprofile, realpath, reboot, reformime, remove-shell, renice, reset, resize, rev,
rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script, scriptreplay, sed, sendmail, seq,
setarch, setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum, sha256sum, sha512sum, showkey, slattach,
sleep, smemcap, softlimit, sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff, swapon,
switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr,
traceroute, traceroute6, true, tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand, uniq, unix2dos, unlzma, unlzop,
unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog, wc, wget, which, who, whoami,
xargs, xz, xzcat, yes, zcat, zcip

[root@linux10 busybox-1.18.3]#

=============================================================================
5 – Edit the “Makefile” to modified the EXTRAVERSION like this
EXTRAVERSION = “-SatyendraSingh”

Note– You can use any meaningful name whatever you like

==========================================================================
6 – Now need to re run “make” command to write the modified EXTRAVERSION information on “busybox” binary

[root@linux10 busybox-1.18.3]# make

Few lines

LINK    busybox_unstripped
Trying libraries: crypt m
Library crypt is not needed, excluding it
Library m is needed, can’t exclude it (yet)
Final link with: m
You have new mail in /var/spool/mail/root
[root@linux10 busybox-1.18.3]#

=====================================================================

7 – Run the “busybox” on current directory to check what changes you made on “EXTRAVERSION”
[root@linux10 busybox-1.18.3]# ./busybox
BusyBox v1.18.3-SatyendraSingh (2011-11-05 23:18:53 IST) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]…
or: busybox –list[-full]
or: function [arguments]…

BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable.  Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.

Currently defined functions:
[, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash, awk, base64, basename, beep, blkid, blockdev, bootchartd,
brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear,
cmp, comm, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df,
dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir,
envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs,
flock, fold, free, freeramdisk, fsck, fsck.minix, fsync, ftpd, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, halt, hd,
hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd, ifup, inetd, init, insmod,
install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5,
klogd, last, length, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq,
lpr, ls, lsattr, lsmod, lspci, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom, mkdir,
mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount,
mountpoint, mpstat, mt, mv, nameif, nbd-client, nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od, openvt, passwd, patch, pgrep,
pidof, ping, ping6, pipe_progress, pivot_root, pkill, pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pwd,
raidautorun, rdate, rdev, readahead, readlink, readprofile, realpath, reboot, reformime, remove-shell, renice, reset, resize, rev,
rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script, scriptreplay, sed, sendmail, seq,
setarch, setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum, sha256sum, sha512sum, showkey, slattach,
sleep, smemcap, softlimit, sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff, swapon,
switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr,
traceroute, traceroute6, true, tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand, uniq, unix2dos, unlzma, unlzop,
unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog, wc, wget, which, who, whoami,
xargs, xz, xzcat, yes, zcat, zcip

[root@linux10 busybox-1.18.3]#

Note- Check the following line under IInd line of point “5” for EXTRAVERSION changes you made.

BusyBox v1.18.3-SatyendraSingh (2011-11-05 23:18:53 IST) multi-call binary.
=========================================================================

8 – Renaming the “buxybox” binary to meaningful name in order to avoid any conflict with “busybox” binary if exist.

[root@linux10 busybox-1.18.3]# cp busybox busybox-satya
cp: overwrite `busybox-satya’? y

[root@linux10 busybox-1.18.3]# ./busybox-satya

BusyBox v1.18.3-SatyendraSingh (2011-11-05 23:18:53 IST) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

==========================================================================

9 – copy the “busybox-satya” to vsphere5 and use as per the requirement but make sure some of the applet of busy box may/may not work

Let’s take an example

1 – If I want to see what is ifconfig output on vsphere5, I am not able to find it from command prompt

~ # ifconfig
-sh: ifconfig: not found
~ # busybox ifconfig
ifconfig: applet not found

But if I run with my own compiled busybox-satya, it gives me the same output as Unix does.

~ # /tmp/busybox-satya ifconfig
ifconfig: /proc/net/dev: No such file or directory
lo0       Link encap:Ethernet  HWaddr 00:00:08:00:10:08
inet addr:127.0.0.1  Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST  MTU:16384  Metric:1

vmk0      Link encap:Ethernet  HWaddr 00:0C:29:E3:38:76
inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

2 – If I want to see what is crontab setting. I need to check the following way around –
~ # cat /var/spool/cron/crontabs/root
#min hour day mon dow command
1    1    *   *   *   /sbin/tmpwatch.py
1    *    *   *   *   /sbin/auto-backup.sh
0    *    *   *   *   /usr/lib/vmware/vmksummary/log-heartbeat.py

I tried to run the following commands as well but did not get the output

~ # busybox crontab -l
crontab: applet not found
~ #

But If I run with own compiled busybox-satya, It gives me the same output as Unix does. even I am able to edit/list the cron
~ # /tmp/busybox-satya crontab -l
#min hour day mon dow command
1    1    *   *   *   /sbin/tmpwatch.py
1    *    *   *   *   /sbin/auto-backup.sh
0    *    *   *   *   /usr/lib/vmware/vmksummary/log-heartbeat.py
~ # /tmp/busybox-satya crontab -e

~ # /tmp/busybox-satya crontab -l
#min hour day mon dow command
1    1    *   *   *   /sbin/tmpwatch.py
1    *    *   *   *   /sbin/auto-backup.sh
0    *    *   *   *   /usr/lib/vmware/vmksummary/log-heartbeat.py
#Satya here -5th Nov 2011

Note – I have added “#Satya here -5th Nov 2011” for example Purpose.
==============================================================================

VMware – Vsphere5 unattended installation step by step with PXE boot

>


Let me brief about the PXE environment I have setup on my home lab. I have installed CentOS 5.x and configuring TFTP, DHCP, APACHE for step by step vsphere5 unattended installation with PXE boot.
1 –  tftp-server installation/configuration  step by step if not already installed.
[root@linux10 xinetd.d]# yum install tftp-server
localrepo                 100% |=========================|  951 B    00:00    
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package tftp-server.i386 0:0.42-3.1.el5.centos set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 tftp-server             i386       0.42-3.1.el5.centos  localrepo          27 k
Transaction Summary
=====================================================Install      1 Package(s)        
Update       0 Package(s)        
Remove       0 Package(s)        
Total download size: 27 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: tftp-server                  ######################### [1/1]
Installed: tftp-server.i386 0:0.42-3.1.el5.centos
Complete!
[root@linux10 xinetd.d]# vi /etc/xinetd.d/tftp
Note – make disable = no inside the tftp file
[root@linux10 xinetd.d]# /etc/init.d/xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
2- dhcp installation/configuration step by step if not installed already.
[root@linux10 tftpboot]# yum install dhcp
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package dhcp.i386 12:3.0.5-13.el5 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 dhcp                    i386       12:3.0.5-13.el5  localrepo         874 k
Transaction Summary
=============================================================================
Install      1 Package(s)        
Update       0 Package(s)        
Remove       0 Package(s)        
Total download size: 874 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: dhcp                         ######################### [1/1]
Installed: dhcp.i386 12:3.0.5-13.el5
Complete!
 [root@linux10 tftpboot]# vi /etc/dhcpd.conf
[root@linux10 tftpboot]#
[root@linux10 tmp]# cat /etc/dhcpd.conf
#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample 
###############################################################
# Note – This block is specifix to single host installation with match hardware address -00-0C-29-8D-FD-A0
    ddns-update-style ad-hoc;
    allow booting;
    allow bootp;
    #gPXE options
    option space gpxe;
    option gpxe-encap-opts code 175 = encapsulate gpxe;
    option gpxe.bus-id code 177 = string;
subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.200 192.168.1.254;
        default-lease-time 3600;
        max-lease-time 4800;
        option routers 192.168.1.1;
        option domain-name-servers 192.168.1.1;
        option subnet-mask 255.255.255.0;
        option ntp-servers 192.168.1.1;
}
#and the host block.
host esxi5first {
        hardware ethernet 00:0C:29:8D:FD:A0;
        fixed-address 192.168.1.210;
        option host-name “esxifirst”;
        filename “pxelinux.0”;
        next-server 192.168.1.101;
}
########################################################################
#Note – you want to deploy this over an entire subnet, it’d be a tedious task to create host blocks for every computer. Likewise, the following is perfectly valid. 
#######################################################################
 #   ddns-update-style ad-hoc;
 #   allow booting;
#    allow bootp;
###    #gPXE options
  #  option space gpxe;
 #   option gpxe-encap-opts code 175 = encapsulate gpxe;
 #   option gpxe.bus-id code 177 = string;
#subnet 192.168.1.0 netmask 255.255.255.0 {
 #       range 192.168.1.200 192.168.1.254;
 #       default-lease-time 3600;
 #       max-lease-time 4800;
 #       option routers 192.168.1.1;
 #       option domain-name-servers 192.168.1.1;
 #       option subnet-mask 255.255.255.0;
 #       option time-offset -7;
 #       option ntp-servers 192.168.1.1;
 #       option netbios-name-servers 192.168.1.1;
  #      filename “pxelinux.0”;
#        next-server 192.168.1.101;
#}
########################################################################
[root@linux10 ~]# /
Note
1 –  In /etc/dhcpd.conf file , please specify correct subnet/netmask/range/next-server IP etc.
2 – next-server IP is the DHCPD IP address where TFTPD is running for pxelinux.o client.
3 – This installation is based on  one box installation that is the reason I have mapped client machine hardware address inside /etc/dhcpd.conf file and specify the client  machine hostname as esxifirst.
However this gives you the opportunity to install whole subnet installation by uncomment the following from /etc/dhcpd.conf
#subnet 192.168.1.0 netmask 255.255.255.0 {
 #       range 192.168.1.200 192.168.1.254;
 #       default-lease-time 3600;
 #       max-lease-time 4800;
 #       option routers 192.168.1.1;
 #       option domain-name-servers 192.168.1.1;
 #       option subnet-mask 255.255.255.0;
 #       option time-offset -7;
 #       option ntp-servers 192.168.1.1;
 #       option netbios-name-servers 192.168.1.1;
  #      filename “pxelinux.0”;
#        next-server 192.168.1.101;
#}
And commenting
subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.200 192.168.1.254;
        default-lease-time 3600;
        max-lease-time 4800;
        option routers 192.168.1.1;
        option domain-name-servers 192.168.1.1;
        option subnet-mask 255.255.255.0;
        option ntp-servers 192.168.1.1;
}
#and the host block.
host esxi5first {
        hardware ethernet 00:0C:29:8D:FD:A0;
        fixed-address 192.168.1.210;
        option host-name “esxifirst”;
        filename “pxelinux.0”;
        next-server 192.168.1.101;
}
3 – Mounting the VMware-ESXi ISO image on Linux system in order to copy the entire files/folder on local system.
[root@linux10 ~]# mount -t iso9660 -o loop VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso /mnt/
[root@linux10 ~]# cd /mnt/
4 – Create a folder named esxi5 inside /tftpboot directory and copy the ESXi5 content from /mnt to /tftpboot/esxi5/
[root@linux10 mnt]# mkdir –p  /tftpboot/esxi5/
[root@linux10 mnt]# cp -r * /tftpboot/esxi5/
[root@linux10 mnt]#
5 – Configuring and Copying PXELINUX.O file in order to get PXE boot.
Note – Please make sure syslinux version should be or greater than 3.86.x .
You can download it from here –
[root@linux10 xinetd.d]#cd /tmp
[root@linux10 xinetd.d]# gunzip syslinux-3.86.tar.gz
[root@linux10 xinetd.d]#tar xvf syslinux-3.86.tar
[root@linux10 xinetd.d]#cp /tmp/syslinux-3.86/core/pxelinux.0 /tftpboot/
[root@linux10 xinetd.d]# cd /tftpboot/
Note – Create pxelinux.cfg directory inside to /tftpboot to hold a boot file for vsphere5 installation along with kickstart location.
[root@linux10 tftpboot]# mkdir pxelinux.cfg
 [root@linux10 tftpboot]# ls
esxi5  pxelinux.0  pxelinux.cfg
[root@linux10 tftpboot]#
pxelinux is the utility that enables the PXE functionality. As mentioned before, pxelinux.0 is an executable that the server downloads. The executable provides functionality to parse a menu system, load kernels, options, customizations, modules, etc, and boot the server. Since PXE can be used by multiple physical servers for multiple images, we need to configure pxelinux for this specific image.
pxelinux.0 looks for configuration files in the TFTP:/pxelinux.cfg directory.
pxelinux looks for a large number of configuration files… specific to a default/generic value. This allows server administrators to define a file based on a complete MAC address, partial MAC address, or none at all to determine which image to boot from.
The installation media contains a file called isolinux.cfg. We can use this as the basis for our file called ‘default. Copy it from the installation media and start customizations:
[root@linux10 tftpboot]# cd pxelinux.cfg/
[root@linux10 pxelinux.cfg]# cp /tftpboot/esxi5/isolinux.cfg default
Notedefault is just a name .
Note – Edit the contents of default file as per requirement
[root@linux10 pxelinux.cfg]# cat default
prompt 1
timeout 10
label ESXi 5 install scripted
default /esxi5/menu.c32
menu label ^ESXi5-01 Scripted install
kernel /esxi5/mboot.c32
append -c /esxi5/boot.cfg ks=http://192.168.1.101/ks/esxi5.txt
[root@linux10 pxelinux.cfg]#
6 – Preparing Kickstart file –
Kick start address –   http://192.168.1.101/ks/esxi5.cfg
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and Tech Support Mode
rootpw password
# Install on the first local disk available on machine
install –firstdisk –overwritevmfs
# Set the network to DHCP on the first network adapater, use the specified hostname and donot create a portgroup for the VMs
network –bootproto=dhcp –device=vmnic0
Note – You can prepare as per your standard.
7 – Configure the installation files
The CD/ISO installation media for ESXi 5.0 assumes a single installation point. Thus, all the files are placed at the root of the image. However, since we want to actually organize our installation root, we added the ‘/tftpboot/esxi5/ ‘ directory and copied the files into it. We need to adjust the installation files in /tftpboot/esxi5/ to reflect the change.
   [root@linux10 esxi5]#  cd /tftpboot/esxi5
   [root@linux10 esxi5]#  cp  boot.cfg boot.cfg.orig
  [root@linux10 esxi5]#  vi boot.cfg
Note – Add the prefix=/esxi5/ inside boot.cfg file  and remove all of the slashes (/) from the boot.cfg file so relative paths can be use
For example – it should be like useropts.gz not /useropts.gz ( by default this takes path as a /useropts.gz)
[root@linux10 esxi5]# cat boot.cfg
bootstate=0
title=Loading ESXi installer
prefix=/esxi5/
kernel=tboot.b00
#kernelopt=runweasel
modules=b.b00 — useropts.gz — k.b00 — a.b00 — ata-pata.v00 — ata-pata.v01 — ata-pata.v02 — ata-pata.v03 — ata-pata.v04 — ata-pata.v05 — ata-pata.v06 — ata-pata.v07 — block-cc.v00 — ehci-ehc.v00 — s.v00 — weaselin.i00 — ima-qla4.v00 — ipmi-ipm.v00 — ipmi-ipm.v01 — ipmi-ipm.v02 — misc-cni.v00 — misc-dri.v00 — net-be2n.v00 — net-bnx2.v00 — net-bnx2.v01 — net-cnic.v00 — net-e100.v00 — net-e100.v01 — net-enic.v00 — net-forc.v00 — net-igb.v00 — net-ixgb.v00 — net-nx-n.v00 — net-r816.v00 — net-r816.v01 — net-s2io.v00 — net-sky2.v00 — net-tg3.v00 — ohci-usb.v00 — sata-ahc.v00 — sata-ata.v00 — sata-sat.v00 — sata-sat.v01 — sata-sat.v02 — sata-sat.v03 — scsi-aac.v00 — scsi-adp.v00 — scsi-aic.v00 — scsi-bnx.v00 — scsi-fni.v00 — scsi-hps.v00 — scsi-ips.v00 — scsi-lpf.v00 — scsi-meg.v00 — scsi-meg.v01 — scsi-meg.v02 — scsi-mpt.v00 — scsi-mpt.v01 — scsi-mpt.v02 — scsi-qla.v00 — scsi-qla.v01 — uhci-usb.v00 — tools.t00 — imgdb.tgz — imgpayld.tgz
build=
updated=0
[root@linux10 esxi5]#
NoteI have commented kernelopts in boot.cfg
Note
 Boot the client machine, have a cup of coffee, installation will take place automatically.

New vSphere 5 licensing model

>VMware vSphere®5: The Best Platform for Cloud Infrastructures – is launched on July 12, 2011. The download is still not available yet but you can register on vmware.com and when the download for the same is available, they will update you via an email .

New vSphere 5 licensing model is totally different as it was vSphere 4.

The VMware vSphere 4 the licensing model was per physical processor based on the number of cores per CPU and the physical memory.

The VMware vSphere 5 license model is based per physical processor and the allocated memory (vRAM) across the entire vSphere environment for a particular vSphere 5 edition (pool).

VMware has released a video which explains the new vSphere 5 licensing model.

http://download3.vmware.com/media/vsphere/licensing/vs5_licensing_pricing.html

Videolink for VMware 3.5 upgrade to VMware Vsphere 4.

>

The VM runing under VMware Workstations cretaing .DMP file and crashed

>Hi All,

Any virtual machine in resume state ( suspended ) under vmware workstation is giving problem while starting and creating .DMP file in virtual machine location.

Simply remove the .nvram file from virtual machine’s directory and start the VM again. First it will display a dialog box asking for ‘Peserve’ or ‘Discard’, select discard and start the virtual machine.

I have faced this issue yesterday 🙂

Server Consolidation and Virtualization

These are the just outlined discussion regarding Server Consolidation and Virtualization steps.

1 -Existing Environment Understanding like what is current environment and setup in terms of servers like Linux & windows.
2 -Assess Existing Environment with Virtual Capacity Planner for collecting and analysis data based on Processor speed/CPU frequency/CPU utilization, RAM for highest used/lowest used and hard disk capacity based on IO operation like read/write/TPS etc and compare with industry driven standard.
3 -Calculate Power and cooling cost for existing environment hardware in term of WATTS/AMP/BTU and once the no. of ESX serer determined compare this with the virtualized environment.
4 -Prepare ESX server list to host the no of physical server to be consolidate and virtualized like 12 esx server required for 134 physical server along with HA {N+1 Approach} ,DRA and VMotion etc if we have proper license for the same.
5 – This configuring is purely based on HA N+1 approach, we can go for N+2 approach as well but it all depends on budget and planning
Subsequently this HA N+1 ( Failover apporach) is based on HA SLOT configuration like if we know how many vm we can run on one esx server then what happened if one of esx server goes down in cluster, will the remaining esx servers can host the existing vm on themselves without compromising the performance.
6 – Slot is just a combination of whole CPU +RAM on the cluster. Pick the esx host which has the least amount of RAM in my case this is 24GB and find out the highest usage of RAM of physical server { you can get it with the virtual capacity planner result } that is plan for virtualization like 2GB. Divide the least amount of ESX RAM/ highest RAM of VM i.e 24/2 = 12Slot
7 – So the total ESX server required to host the no of VM is = Total no of VM (total physical hosts that needs to be virtualized) / no of Slot

For example –

Total physical hosts that need to be virtualized          = 134VM
Highest usage of RAM of physical server                  = 2GB
Planned ESX server RAM size                                   = 24GB

Slot required to maintain the HA                               = 24GB/2GB = 12

Total ESX servers required to handle this                  = 134/12 = 11.16 (Round figure 11)

Note – This is without N+1 architecture , this configuration require 11 ESX servers but we would like to have one more esx server to support incase one esx server goes down
Total ESX server with N+1 Architecture is         = 12

8 – After working on N+1 architecture, we can setup the Cluster as per the plan but I loved the following way of doing the things to identify the VM based on Critical and Non-Critical for Performance issue.
(a) – Identify the Critical VMs and plan HA+DRS cluster for the same.
(b) – Identify the Non-Critical VMs and plan DRS cluster for the same.

Why I am saying is that  for Planned maintenance, Vmotion work fine but for unplanned the HA only support 🙂

9 -LUNS architectural Approach for shared storage for the VMs.

 

Total no. of VMs per ESX                             =       11.16 (Round 11)
Avg. size of VMDK disk                                 =       40GB
Total Storage required/Host                      =       440GB
Total no. of VMs                                               =       134
Total Storage required                                  =       5360GB
Total no of ESX servers                                 =       12

No. of form required                                     =       1 (Due to less than 16 ESX host – Being conservative)
No. of Servers /cluster                                 =       12
Total VMs/Cluster                                         =       134
Total LUNS for disk-intesive                     =       134/32 = 4.1875
Total no of LUNs required                         =       4
Size per LUNS (with + 10% Growth)      =       1474GB (1.5T)

There is other way around to configure storage is by the following formula

((Avg. size of VMDK disk * Total no. of VMs) * (LUNS + 10% Growth))

Note

– Its upto you what growth rate you want as I took 10% growth per annual
10 -Rest is Environment specific.

I have tried to cover few things; I know there are a lot of things to keep in mind before planning and implantation.