Twitter: langonej

Additional Info

User login

News, Solutions

How to mount a virtual cd-rom via IBM Bladecenter for VMware ESX/VI3

To mount up a virtual cd-rom to the cdrom device of your VMware ESX/VI3 server:

1. Mount your .iso/cdrom device via the Remote Control applet.
2. type mount /dev/cdrom1 /mnt/cdrom
3. Enjoy the contents of your virtual media, ls /mnt/cdrom

- Jason

Free ISO Creation Utility

I have been in desperate need of a free ISO creation utility for awhile. I've never had any luck with the XP Powertoy, despite reading the FAQ multiple times. Today I came across CDBurner XP Pro(CD Burner XP Pro) and it worked perfectly.

- Jason Langone

VMware VI3 - Sample ks.cfg for Deployed Installations

# Default Kickstart file for
# VMware ESX Server 3.01
# Jason M. Langone
# Veni, Vidi, Vici

# Hp storage device will be detected

# Installation Method
url --url ftp://anonymous:rdp@172.21.133.152/dslib/osdist/vmesx300/

# root password
# The MD5 encrypted string below is not for "password"
rootpw --iscrypted $1$yIJAh2dl$PcanBdoSOuvNeaBhV33Rt.

# Authconfig
auth --enableshadow --enablemd5

# Bootloader (GRUB or LILO)
bootloader --location=mbr

# Timezone
timezone US/Eastern

# X Windowing System
skipx

# Install or Upgrade
install

# Text mode

VMWare VI3 - Sample Script to Configure VM Switches and VMotion

#!/bin/sh
# VI3 Server Customization v1.0
# Jason M. Langone
# Veni, vidi, vici
# read var1 var2
# echo var1 = $var1 and var2 = $var2
# Remove default network configuration
#
# Ask if internal or DMZ?
#
#--=-=-=-=-=-=-=-=-=-=-= INTERNAL BLADE VERSION =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
echo ----------------------- VMotion & vSwitch Configuration -------------------
echo Enter VMotion IP Address:
read vi3vmip
echo Enter VMotion Subnet Mask:
read vi3vmsm
echo Enter VMotion Default Gateway:
read vi3vmdg
echo -------------------------------------------------------

VMWare VI3 - Sample Script to Configure the Console

#!/bin/sh
# VI3 Server Customization v1.0
# Jason M. Langone
# Veni, vidi, vici
# Remove default network configuration
#
# Ask if internal or DMZ?
#--=-=-=-=-=-=-=-=-=-=-= INTERNAL BLADE VERSION =-=-=-mkdir /root/PostInstall
echo "Deleting current network configuration" >> /root/PostInstall/PostInstall.log
echo ----------------------- Service Console Configuration -----------echo Deleting current network configuration
echo ......................................
esxcfg-vswitch vSwitch0 -D "VM Network"
esxcfg-vswif -D
esxcfg-vswif -d vswif0

VMWare VI3 - How to Configure Active Directory Authentication at the Console

It's important to have a unique admin account for your administrators. Not only is it part of the mysterious SOX legislation (that was never really meant for an IT application) but it's important to have unique names in the event log to see who is wreaking havoc on your enviornment.

Prerequisites
1) Working DNS Resolution.
2) Working NTP.

Setting up AD Authentication
Domain = Thira.Greece.Net
Domain Controller = ThiraDC2

How to find the PID of a Virtual Machine and then Kill It

Sometimes a Virtual Machine is hung in a funky state. To find the PID run:
grep -ir vmx /proc/vmware*

Find the PID, then run:

kill -9 PID#

_Updated for VI3:_

ps -ef | grep _virtualmachinename_
kill -9 PID#

- Jason Langone

How to Shrink a Virtual Machine's .vmdk

In my previous post I explained the art of extending VMDKs and RAW LUNs in the ESX world. Today I will cover shrinking a .vmdk. It is important to resize the volume with a partition tool before you forcefully resize the .vmdk. If you fail to heed this advice you will have a nonfunctional volume whose partitions need to be reformatted.

1) Make sure you have a valid backup of the partition(s) in question.
2) Download SystemRescueCD
3) Power off your VM and mount the CD.
4) Boot up and marvel as the VM boots into Linux.
5) Hit enter to Boot (default).

The Art of ESX/VI3 Disk Expansion

Two of the most common scenarios of disk expension are 1) A .vmdk needs to be extended to allow for more space within a virtual machine or 2) a virtual machine using RAW Physical access of a LUN needs more room. First, power off the virtual machine.

1) Extending a .vmdk

SSH into the appropriate ESX server and use the following command to extend (or potential shrink) a .vmdk file:
vmkfstools –X totalspaceG pathtodisk:diskname.vmdk

Example 1
Current disk is 5GB and you want to make it 15GB.
vmkfstools –X 15G vmhba1:0:59:1:SERVERA_2.vmdk

Example 2

VMWare ESX: Fix: "Insufficient Memory Resources" - Unable to Poweron VM

This issue affects ESX servers only.

Cause:
Server was built incorrectly and did not have sufficient swap file space allocated.

Fix:
Create and activate a second swap file.

Action:
SSH into the troubled ESX server. Verify how much free space you have on the LOCAL vmfs partition.

vdf –h

vmkfstools –k 12G /vmfs/vmfslocal/SWAP2.vsp

Now it’s time to activate:

vmfstools –w /vmfs/vmfslocal/SWAP2.vswp

You should now be able to power on your Virtual Machines.

- Jason Langone

HP RDP Deployed Install: VMWare VI3 + Proliant Support Pack

3.01 VI3
Includes:
Altiris RDP Agent
HP Proliant Support Pack
Post Installation Configuration Scripts

Download Here.

- Jason Langone

VMWare VI3 - "Download a File" Script

I use this as an HP Rapid Deployment Pack package to download scripts, config files, et al, en masse for a large VMWare environment. Substitue file and IP accordingly.

rm /etc/resolv.conf
ftp -n < open 19.21.2.39
user anonymous rdp
ascii
lcd /etc
cd /dslib/cs_confs
get resolv.conf
exit
EOF2

- Jason

VMWare VI3 - Manually Updating the VPXAgent

For some reason, I've had VMWare VI3 servers not successfully update their VPX Agent after a Virtual Center upgrade. Here's the contents of an HP Rapid Deployment Pack package I wrote to handle the upgrade. The IP address is of your FTP repository.


service vpxa stop
ftp -n < open 29.12.31.29
user anonymous rdp
ascii
lcd /tmp
cd /dslib/vpxupdates
prompt
mget *
exit
EOF2
cd /tmp
sh ./vpx-uninstall-esx-5-linux-40644
sh ./vpx-upgrade-esx-5-linux-40644
rpm -qa | grep vpxa > /tmp/vpxaver.txt

- Jason Langone

Add Local Admins for VMWare VI3

It's best practice to leave root disabled for SSH access and instead force admins to use their own account for such actions.

Here's an example of a quick way to create a local account which can easily be copied into an HP Rapid Deployment Pack package.


groupadd VIAdmins
useradd -g VIAdmins admin1 -p gVROitKfak39s
cp /etc/sudoers /etc/sudoers.bak
echo "admin1 ALL=(ALL) ALL" >> /etc/sudoers

- Jason Langone

2007 VMWare Virtual Vanguard Award - Best Disaster Recovery Solution

Wish me luck as I’ve been asked to submit an entry for a Virtual Vanguard Award. Entries are due by Friday so it’s crunch time to put a polished submission together. Winners receive a free pass to VMWorld 2007 in San Fran.

- Jason Langone

Accolades






Video

"Green IT" - Leveraging VMware to provide a green datacenter.

Preview of the upcoming VMware View iPad App with PCoIP support.

Ubertechnik 350Z at VIR.

Latest from Disqus

Consulting Gigs

CURRENT GIGS for 1099 VCP's

  • * VMware Site Recovery Manager Consultant.

    Status: FILLED.


    Duration: 3 Weeks

    Location: Reston, VA

    Clearance: None

  • * Senior Solaris Consultant.

    Duration: 3+ Weeks

    Location: Reston, VA

    Clearance: TS SCI

Note: All 1099 consultants must be a current VCP.