Thursday, March 31, 2011

Vmware vSphere Client for iPad

Last year I wrote about a vSphere client App for iPad which vmware was developing.

Well, it’s finally available and you can download from free form Apple app store, iTunes.
That’s it, for free !!! is not that cool ?

With the iPad fever and the new iPad 2 it’s a tool that you should not miss.

This App will cover the majority of common tasks you might want to perform on your environment, but it does not cover all single feature of the full client and that’s by design.

If you have iPad, lucky you, go test it and let me know, until I don’t have one my own.

Here’s VMWARE’s web site about it, where you can find more details about the configuration….. yeah you need to configure your environment with vCMA first.

Wednesday, March 23, 2011

ESX Scripted Install – part 4/4

Finally we reached the last part of this series.

Let’s review what we learned so far.

1 – How to get started
2 – Working with %pre section
3 – Working with %post section

Now it’s time to wrap up your installation.

I believe by now you have finished you installation script, if you do not rename the ks.cfg file so far that’s your opportunity and have it called something more intuitive.

Then you need to incorporate that file within ESX installation along with the custom files and RPM you want to be available (if you have one, check %post section).

But, there’s a trick in here, be aware when changing an ISO file, the hash check sum will be changed and the installation will failure. Use a program that can change a ISO file and keep the hash check sum. I use MagicISO to change ISO files.

Now you can burn your CD/DVD.

Insert the CD into the server and power on.
The Installation Choice screen will appear:



Choose the option “ESX Scripted Install using USB ks.cfg” and press F2

The boot option line will show, as bellow



replace just the word usb to cdrom:/inst.cfg



The line must be just like above. Attention, my script is called inst.cfg, replace it by yours.

Press Enter to start the installation.

Easy right ?!?!

Fell free to let a comment if it works for you.

See you next

Thursday, March 17, 2011

ESX Scripted Install – part 3/4

Last post we worked on how to pass parameters to the installer.

Now it’s time for the customization you can make after the Operational System is installed.

The %post section will carry on all the commands you want to execute after your ESX has been installed, that means the ESX is loaded and all the ESX’s commands are available too you.

The installation sequence is something like:
1 – installer loads
2 - %pre section loads and you input your parameters
3 – installation occurs based on the %pre section information.
4 – installer executes the commands on %post section
5 – Server reboots

Did you realized the power of this section ?!!?!

You can run all the commands you normally do when configuring your host after installing it, like
esxcfg-firewall command to open/close ports
esxcfg-auth command for the authentication settings

Anything you normally do on a host session. The command syntax is just the same.

So, how to use the %post section ?

Start with the following line after all the %pre section commands
%post --interpreter=bash

Then just place the commands, one per line.

But the trick I can show you, is that you can also copy files to the host, may be the sshd_config file, with your already configured SSH options or even coping rpm packages for agents installations.

How does it work ?

- first you will need to create a folder with all the required files and packages you want to use.
- Then burn a CD with the ESX installation and your new files (we will cover this process on the next post)

Now that your CD is ready with the files you need, let’s configure the %post section

First you will need to mount the cd-rom on the system
mount /dev/cdrom /mnt/cdrom

them you can just copy the files from the cd to the system, like
cp /mnt/cdrom/Custom/sshd_config /etc/ssh/sshd_config

or installing the RPMs on your system, like
rpm –ivh /mnt/cdrom/Custom/agent.rpm

Here’s just a sample of a script to help you start your own

************************************************

%post --interpreter=bash

#mount CDROM
mount /dev/cdrom /mnt/cdrom

#enabling ssh on firewall
esxcfg-firewall -e sshClient

#configuring ssh
mv /etc/ssh/sshd_config /etc/ssh/sshd_config.old
cp /mnt/cdrom/Custom/sshd_config /etc/ssh/sshd_config
chmod 600 /etc/ssh/sshd_config

#unmont cdrom
umount /mnt/cdrom

************************************************


I bet your are anxious to get it working ; )

Friday, March 11, 2011

ESX Scripted Install – part 2/4

Now, that we learned how to get started with ESX Scripted Installation.
It’s time to starting customizing your script.

I would not go into details about every setting on the script because you can check them on ESX Installation Guide.

But, one thing I wanted to pointed it out is that I needed to make one adjustment on the disk section to be able to install it on next hosts.

I commented the line with specifies what disk to use and uncomment the line to use the first disk detected.
See example bellow:

#part '/boot' --fstype=ext3 --size=1100 --ondisk=mpx.vmhba0:C0:T0:L0
# Uncomment to use first detected disk:
part '/boot' --fstype=ext3 --size=1100 --onfirstdisk
#part 'none' --fstype=vmkcore --size=110 --ondisk=mpx.vmhba0:C0:T0:L0
# Uncomment to use first detected disk:
part 'none' --fstype=vmkcore --size=110 --onfirstdisk

But what now ?!?!

You probably don’t want to install all your hosts with the same name and same IP configuration, right ?

You can find several blogs to teach you how to use input files or websites with required information, but I personal believe, just and input prompt during install would works better.

There’s a special entrance called %pre, where you can specify everything you want before start your installation. So, how to get it working ?

After the last line on the script you add the %pre section. See my example bellow with comments:



Now…how to get the installation read my /tmp/networking file with the information I just typed in ?!?!

Look for the network section above, should be near the timezone section, comment it (add # at the start of the line)

Then add the line bellow:
%include /tmp/networkconfig
It’s done!!
The installation will starts, jump to the %pre section where you can enter the information to be used by the installer.

Now that you learned how to use the %pre section you can use the same concept to gather all kind of information you want , like time zone, license, keyboard, etc..

See you next.

Thursday, March 3, 2011

ESX Scripted Install – part 1/4

Eventually you reach a point when you want/need your ESX installations to be consistent across your environment.
That’s when scripted installations get on board.

It would help you saving some man hour costs solving software conflicts and installation issues just creating a more in-depth automation process for repeatability and predictability installation results

But how to get started ?

If you search the web, you will find several posts and lot of fancy scripts, but you are just a rookie on this new world and probably these result will just confuse you even more.

You probably can start with ESX Installation Guide, there’s a section just for scripted installation. But you will realize there are some pitfalls you would need to overcome.

So in this series of 4 posts I will show you how I conquered this task and how can you too.

The easiest way to start is doing a normal ESX installation through the ESX Graphical mode.
That’s your best opportunity to set up your disk layout , root password , time zone, etc…




Once your installation is done, there’ll be a file called ks.cfg at the root folder of your system,
This file will be the bases of your scripted installation. Copy it to a place where you can store and make changes. (do not use Windows text editor to make changes on it)

When editing ks.cfg then you will see all the choices you did during the installation:
As root password (remember it will be encrypted on the file).

Also you can see all the sections and compare with the ESX Installation Guide to understand what they do and how to use them.

During the next post we will cover more about customizing it.

On this journey together you will see that we can start simple and make just the changes we want for our environment

ESX Scripted Install – part 2/4 coming soon on a laptop near you ; )

Who am I

My photo
I’m and IT specialist with over 15 years of experience, working from IT infraestructure to management products, troubleshooting and project management skills from medium to large environments. Nowadays I'm working for VMware as a Senior Consultant, helping customers to embrace the Cloud Era and make them succefully on this journay. Despite the fact I'm a VMware employee these postings reflect my own opnion and do not represents VMware's position, strategies or opinios.

Most Viewed Posts

Blog Archive