The ESX Deployment Appliance (EDA) is a smart and free tool by Herco van Brug to automate ESX deployment. The EDA includes PXE Boot, a DHCP server and pre-written “script parts” which makes it pretty easy to create your own ESXi configuration scripts.
The EDA is available from the virtuall.eu website as an OVF image. After downloading the appliance you probably have to reset the network configuration the get the thing up and running, there’s some information about this available in this topic:
Hi all,
I’m using EDA 1.0 to deploy ESX 5.0, now i want to reinstall 20+ hosts with Vsphere 5.1. I downloaded EDA 1.05 and started it.
I cannot configure network, it resets after few seconds, and giving me the error:
vmsvc[737]: [ Warning ] [guestinfo] failed to get nic info
vmsvc[737]: [ Warning ] [guestinfo] RecordRoutingInfo: Unable to collect IPv4 routing table.
I’ve read the post above, and tried to upgrade hardware to version 8 (did not help) I’ve removed nic, rebooted, and readded nic (rebooted) did not help. I don’t know how to login as root, because i can’t get a login prompt. so I can’t Does anybody have a working version? or has a solution for my problem?
Herco’s answer:
If you remove the NIC, you may also want to remove the persistent rules files. if you dont you’ll end up with eth1, eth2 etc and all EDA scripts are built for eth0. you can go either to alt-F2 and log in with root/root or go to the patch menu in eda and type ‘rm /etc/udev/rules.d/*.rules’ from the ‘exec’ box.
A short manual to do a basic configuration of the EDA is available here.
Adding iSCSI support
By default the EDA doesn’t include options, or scripts parts as they are called, to configure iSCSI. So let’s add some functionality here:).
Use the “Manage script parts” option to add scripts parts (or building blocks) to the EDA. Manage script parts lists the available scripts on the EDA and gives the option to add new scripts through the New Entry option.
When adding a new entry you have to configure the following fields:
- ESX Version (use 5.0 also for 5.1)
- Description – Just a description which will appear in the pull down list.
- Command – The actual esxcli command.
- XXXXX, YYYYY, ZZZZZ – You actually have three fields you can configure afterwards, at the time you’re inserting the actual script part.
To configure iSCSI I’ve added the following script parts:
Determine iSCSI IP Addresses
We have to deploy a little trick here. The EDA doesn’t allow you to add extra fields, so we have to derive the iSCSI IP configuration from existing management or vMotion IP addresses. This unfortunately a limitation on the setup; see my additional explanation on this below.
The script code is:
myiSCSI01=$(echo ${myVM} | awk -F "." '{print "XXXXX"$4}') myiSCSI02=$(echo ${myVM} | awk -F "." '{print "YYYYY"$4}')
XXXXX = First iSCSI vmk IP address subnet
YYYYY = Second iSCSI vmk IP address subnet, this can be the same as XXXXX.
The values are derived (in this case) from the last octet of the vMotion IP address (myVM). myVM is the field that contains the vMotion address. If both iSCSI initiator addresses run in the same subnet you have to be carefull and your options are bit limited. You can do the following trick:
- 192.168.1.11 is the vMotion IP address (for example)
- XXXXX = 172.16.1.1 –> which makes 172.16.1.111 the IP address for the first iSCSI vmkernel port
- YYYYY = 172.16.1.2 –> Which makes 172.16.1.211 the IP address for the second iSCSI vmkernel port
iSCSI Enable and Set IQN
Enable iSCSI and set the IQN for the host. Notice that in this case the iSCSI software adapter is vmhba33, this adapter name can differ.
esxcli iscsi software set --enabled=true esxcli iscsi adapter set -A vmhba33 --name=XXXXX:(hostname -s)
XXXXX = The iqn, probably something like iqn.1998-01.com.vmware
The hostname of the ESXi host will be added after the colon.
iSCSI VMK NIC Configuration
This script part is used to configure VMkernel interfaces. Note that your network configuration on vSwitch level should already be in place, this is not covered in this article.
esxcli network ip interface ipv4 set --interface-name XXXXX --ipv4 ${myiSCSI01} --netmask ZZZZZ --type static esxcli network ip interface ipv4 set --interface-name YYYYY --ipv4 ${myiSCSI02} --netmask ZZZZZ --type static esxcli iscsi networkportal add -A vmhba33 -n XXXXX esxcli iscsi networkportal add -A vmhba33 -n YYYYY
XXXXX = First VMkernel interface used for iSCSI
YYYYY = Second VMkernel inteface used for iSCSI
ZZZZZ = Netmask for iSCSI
Configure iSCSI Target & Rescan
Now add you iSCSI target for dynamic discovery.
esxcli iscsi adapter discovery sendtarget add -A vmhba33 -a XXXXX esxcli storage core adapter rescan --adapter vmhba33
We’ re all set now, the eda should look like this:
And the EDA main screen now includes iSCSI script parts:
Jumbo Frames
As a bonus, if you want to use Jumbo frames you have to configure it on both the vSwitch and the VMkernel interface (and the rest of your physical network components, not included here).
Configure vSwitch for Jumbo Frames
esxcli network vswitch standard set -m 9000 -v XXXXX
XXXXX = vSwitch to be configured
Configure VMkernel (vmk) interface for Jumbo Frames
esxcli network ip interface set -m 9000 -i XXXXX
XXXXX = VMkernel interface number (vmk#)
That’s all, happy scripting!
1 Comments
jimmy
Hoi Viktor, Goeie blog!
Ik heb alles direct in de KS5.php verwerkt en ook de cr.php aangepast om meerdere variabelen te kunnen gebruiken.