Saturday, June 6, 2009

A new mile stone:Automated ESX deployment using virtual appliance EDA/UDA

I had been struggling to find out way to automate my ESX build and found two appliance using which you can automate ESX deployment. Well this not only the way you can deploy but there are folks who have many way to deploy scripted ESX . Like ADS to deploy ESX but that’s not the goal of this document. I want to share my challenge while setting up this appliance. I know the folks who are Champions of these appliance like Carl Thijssen/Mike Laverick/ Brugh have explained many steps on their blogs and forum.

Environment preparation before setting up PXE appliance for ESX deployment:

1. Dedicated VLAN just for ESX deployment so that you won’t disturb any of your production environments.

2. When you create DHCP scope for this VLAN make sure that you have reserve IP address as you are going to use few IP for PXE /ESX/Appliance.

3. This VLAN will be Native VLAN.

4. One ESX host create a separate vSwitch and dedicate NIC for this appliance alone. Assuming that your appliance going to run out of ESX host. Set this NIC to 100MB half. The same setting you need to do on switch side of that port

              switchport trunk native vlan xxx

              switchport mode trunk

          speed 100 duplex half

          spanning-tree portfast trunk

After appliance has setup on ESX HOST:

5. After you install appliance follow the instruction on their respective site for configuring appliance. If you are not using DHCP from appliance then make sure that you have stopped it. If you have not stopped then also you land of on different issue. It is better to use windows DHCP. If you have setup your appliance on same VLAN as ESX host to be build then you don’t have to do any changes on DHCP server as someone has already explained. On ESX build VLAN just add IP Helper address for appliance. Yes this has worked for me.

6. Also do clearly specify DNS /Gateway IP while configuring appliance. If you miss any of these setting then also you may land up in problem while deploying appliance. I thought since it is testing so these are not required but I was wrong as I landed up in trouble latter.

7. There is also challenge to decide on Kick start (KS) nic. Normally your kickstart device should be your onboard NIC. Try some permutation and combination to decide on NIC. In my example if I had 10 NIC amongst which we have two onboard NIC then my onboard NIC device becomes eth8/eth9. Yeah it is quite surprising and will update when I found. But for now what I do is try permutation combination to decide on Board NIC.

8. Very Very important YOUR ESX host IP in KS script should be in the same IP range of appliance .

Some of the error message you will come across like

1. It will keep asking for keyboard type and various other question . This means you have not specify correct kick start device in your script. Please do specify correct KS device as I explained above.

My VMTM thread about it http://communities.vmware.com/message/1230094#1230094

clip_image001

2. PXE does not support 802.1q.

3. Also you can debug this appliance using ALT+F3 and ALT+F4. These you need to perform on ESX host which you are building. What I have learned that these are anaconda logs which help you to troubleshoot the appliance. You need to press ALT+F3 and ALT+F4 as soon as GUI method of install start.

4. Some of the error like

ALT+F3 :

Trying to mount device HDA

No network drivers for doing kickstart

Assert: No network device in chooseNetworkInterface

ALT+F4

cdrom:open failed

Such error message suggest that you have not selected correct KS device for your PXE.

5. If you are using EDA then make sure that you associates the ISO using CD ROM ISO. Which means you copy the ISO to some NFS or shares to connect to VM appliance. I tried connecting ISO using ISO connect ICON and it was keep failing. If you are using UDA then it is advisable to create separate disk of 20 to 40GB of drives and copy ISO over there.

6. If your ESX build stuck at the screen shown below and ALT+F3 shows “ *transferring http://10.0.0.104//esx/esx301//VMware/base/netstg2.img to a fd” .

“unable to retrive http://<ip of UDA>//esx/esx301/vmware/base/netstg2.img”

clip_image003

This means your UDA/EDA appliance are not in the same range of IP as of your ESX host getting build. You need to modify the KS script and ensure that your IP subnet is same as your ESX host getting build. That is the reason I suggested above to have IP reservation of your DHCP server

Some more ALT+F3 and ALT +F4 screen

clip_image005

clip_image007

For any further troubleshooting check the VMTM forum/Appliance website and their forum

For UDA http://communities.vmware.com/thread/43958?tstart=0 http://www.ultimatedeployment.org/forum http://www.ultimatedeployment.org/index.html

Person to contact _the_dude_ or Mike Laverick for any help on VMTM thread

For EDA http://communities.vmware.com/thread/139465?tstart=0 http://virtualappliances.eu/

Person to contact burgh on VMTM thread.

2 comments:

sentania said...

Vikash - do you have other VLANS trunked to the port or just the single VLAN?

We've been trying to get the native VLAN thing working to ease the building of hosts since we trunked the SC VLAN + VMotion VLAN together for redundancy.

Just wondering if you got this working.

Vikash Kumar Roy said...

There is only one VLAN trunked on . We call it as a build VLAN for ESX. We have MDT/WDS envoirnment as well for windows build. PXE get confused with two envoirnment so to make it simple I have created seperate VLAN for ESX build. Since I have to change IP address for my post build activities ,I make all the changes at that time.
Hope this help