VMware Cloud Community
chriswhiting
Contributor
Contributor

scripted install "Did not get an IP Address from DHCP server"

NOTICE: These IP's are in a test network

I am PXE booting ESXi 4.1 using Ubuntu as the DHCP, TFTP and HTTP server (192.168.110.69).

When I boot the server it picks up a DHCP address and loads the installation files:

     vmkboot.gz

     vmkernel.gz

     sys.vgz

     sys.vgz

     cim.vgz

     ienviron.vgz

     install.vgz

When I get to the "Reading Installation Script (1/1)" the progress bar stalls.

After about 20 second the installation displays the following message:

     Error (see log for more info):

     Error connecting to the network

     Did not get an IP Address from DHCP server


The closest explanation I can find is: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=102230...

I believe the problem is that the installation is not reading the ks.cfg file but I'm unsure why. I can enter http://192.168.110.69/ks.cfg in my browser and the file loads fine. The firewall on the PXE server is shut off so as not to interfere.

At this point I ALT-F12 to view the install log and this is what I see:

     ..

     ..

     INFO Got boot cmdline "vmware'esx4.1/vmkboot.gz ks=http://192.168.1...

     INFO Weasel skipped boot command line token (vmware/esx4.1/vmkboot...

     DEBUG Setting network options for media downloads

     DEBUG     nic options from boot command line -- {}

     DEBUG     net options from boot command line -- {}

     DEBUG command line options: [('-s', 'http://192.168.110.69/ks.cfg')

     WARNING User has not chosen a Weasel run mode.

     INFO Weasel run mode defaulting to Scripted.

     ..

     ..

     DEBUG Progress happened on a task that has not started

     INFO Network choices not specified, Using DHCP

     WARNING Still waiting for an IP address from DHCP

     DEBUG Progress happened on a task that has not started

     WARNING Still waiting for an IP address from DHCP

     DEBUG Progress happened on a task that has not started

     WARNING Still waiting for an IP address from DHCP

     DEBUG Progress happened on a task that has not started

     WARNING Still waiting for an IP address from DHCP

     ..

     ..

     ERROR A network connection could not be made to fetch http://192.168.110.69/ks.cfg

     ..

     "HostIPAddr" = "192.168.110.206" Old value: "192.168.110.205" (Status:0x0)

     "ManagementAddr" = "192.168.110.206" Old value: "192.168.110.205" (Status: 0x0)

     ..

     ..

     "HostIPAddr" = "192.168.110.207" Old value: "192.168.110.206" (Status:0x0)

     "ManagementAddr" = "192.168.110.207" Old value: "192.168.110.206" (Status: 0x0)

     ..

     ..

     "HostIPAddr" = "192.168.110.208" Old value: "192.168.110.207" (Status:0x0)

     "ManagementAddr" = "192.168.110.208" Old value: "192.168.110.207" (Status: 0x0)

     ..

     ..

     "HostIPAddr" = "192.168.110.209" Old value: "192.168.110.208" (Status:0x0)

     "ManagementAddr" = "192.168.110.209" Old value: "192.168.110.208" (Status: 0x0)

     ..

     ..

     "HostIPAddr" = "192.168.110.210" Old value: "192.168.110.209" (Status:0x0)

     "ManagementAddr" = "192.168.110.210" Old value: "192.168.110.209" (Status: 0x0)

     ..

     ..


    

Any ideas or suggestions would be apprecitated. Thank you.

The configuration files are below.

##########################

/dhcpd.conf

--------------------------

subnet 192.168.110.0 netmask 255.255.255.0 {

     range 192.168.110.201 192.168.110.222;

     filename "pxelinux.0";

     option subnet-mask 255.255.255.0;

     option broadcast-address 192.168.110.255;

     option routers 192.168.110.1

}



##########################

/var/lib/tftpdboot/pxelinux.cfg/default

--------------------------

default menu.c32

menu title PXE Boot VMware

timeout 100


label ESXI_install

menu label Boot VMware ESXi

kernel vmware/esx4.1/mboot.c32

append vmware/esx4.1/vmkboot.gz ks=http://192.168.110.69/ks.cfg --- vmware/esx4.1/vmkernel.gz --- vmware/esx4.1/sys.vgz --- vmware/esx4.1/sys.vgz --- vmware/esx4.1/cim.vgz --- vmware/esx4.1/ienviron.vgz --- vmware/esx4.1/install.vgz


##########################

ks.cfg

--------------------------

install url http://192.168.110.69/vmware

network --bootproto=static --ip=192.168.110.210 --netmask=255.255.255.0 --gateway=192.168.110.1

accepteula

autopart --firstdisk=local --overwritevmfs


Reply
0 Kudos
10 Replies
JimPeluso
Enthusiast
Enthusiast

Oddly enough I'm having this same exact issue. Did you find a resolution for your issue?

Jim

"The only thing that interferes with my learning is my education." If you found this information useful, please consider awarding points for "Correct" or "Helpful"
Reply
0 Kudos
chriswhiting
Contributor
Contributor

Jim,

It has been awhile but here's what I believe was the issue.

The ESXi server I was PXE booting was a VM on another ESXi server.

If my memory serves me I remember feeling a bit stupid because at first I wasn't reserving enough memory and then I didn't allocate enough hard drive space for the ESXi VM.

http://www.vmware.com/pdf/vsphere4/r41/vsp_41_esxi_i_get_start.pdf

The memory minimums are 2GB but no clearly defined minimum for Hard Drive Space. ( that I could find )

I incorrectly assumed that if I PXE booted, everything would run in RAM and that I could simply configure VM storage on the SAN.

NOPE - I had a hard time finding it before and I'm unable to put my finger on it at the moment but I believe I found my answer somewhere on Duncan Epping's site Yellowbricks.com after Googling every which way from Sunday.

I want to say the H/D minimum is 5GB+/-

Found it!

http://www.yellow-bricks.com/2010/10/27/esxi-disk-size-requirement/

http://www.vmware.com/pdf/vsphere4/r41/vsp_41_esxi_i_vc_setup_guide.pdf (Pg 24) - Thanks Duncan

After giving the VM hard drive allocation appropriate for minimum install everything slid in like butter.

Good Luck.

Reply
0 Kudos
JimPeluso
Enthusiast
Enthusiast

Thanks Chris,

I'm actually PXE booting an HP Blade. I think I have an issue with the nic configuration. The Blade also was a windows box at one point so I'm going to wipe the drives.

Thanks again for the advice and I'm glad you have fixed your issue Smiley Happy

Jim

"The only thing that interferes with my learning is my education." If you found this information useful, please consider awarding points for "Correct" or "Helpful"
Reply
0 Kudos
Darren201110141
Contributor
Contributor

Hi Chris

I am having the same issue as you have discribed here. The only difference being I used UDA 2.0 as my deployment server.

I have spent several days trawling through forums etc trying to find a way round this issue.

From inspecting the my http log files it seems that the booting server does not requesting the ks file.

the error regarding the DHCP server not being available doesn't make sense as the server pxe booted and has been able to load files up until the moment it attempts to load the ks file.

I have tried the pxe boot but leaving out the ks part and everything works as expected.

I have had a look at the weasel log and it seems to be very similar to what yours.

50:05,043 WARNING User has not chosen a Weasel run mode.

50:05,043 INFO Weasel run mode defaulting to Scripted.

50:05,915 DEBUG Querying disks

50:05,916 DEBUG lun —— naa.50060160c46044c650060160c46044c6

50:05,916 WARNING Lun at /vmfs/devices,’disks/naa .50060160c46044c650060160c46044c

50:05,916 DEBUG lun —— mpx.vmhba32:C0:T0:L0

50:05,916 DEBUG Trying /vmfs/devices/disks/mpx.vmhba32 :C0:T0:L0

50:05,92? WARNING Parted cou ldn’ t open device /vmfs/devices/disks/mpx.vmhba32 :C0

50:05,92? DEBUG lun —— naa.603456?0123456?0136421130?3536d5

50:05,92? DEBUG Trying /vmfsdevices/disks.’naa .603456?0123456?0136421130?3536d

50:06,095 INFO Discovered lun —— naa.603456701234567013642113073536d5 console /vmfs/devices/disks/naa.603456701234567013642113073536d550:06,095 DEBUG lun —— mpx.vmhba34:C0:T0:L0

50:06,095 DEBUG Trying /vmfs,’devices/disks/mpx.vmhba34 :C0:T0:L0

50:06,106 WARNING Parted cou ldn’ t open device /vmfs/devices/disks/mpx.vmhba34 :C0

50:06,123 DEBUG Progress happened on a task that has not started

50:06,123 INFO Network choices not specified. Using DHCP.

50:06,163 WARNING Still waiting for an IP address from DHCP

50:09,164 DEBUG Progress happened on a task that has not started

— weasel.log 2,63 3v.

I'm not sure if it matters but i'm trying to rebuild a host that has ESX4.0 on it

I would really appreicate if you could help me out

Thanks

Darren

Reply
0 Kudos
Yperman
Contributor
Contributor

Hi,

I have the exact same problem. In the console I did the following test:

1. ping the tftp server that contains the install files and the kickstart didn't work

2. esxcfg-vswitch -l gives me two port groups: VM Network and Management Network (VLAN ID 0 and Uplink vmnic0)

3. esxcfg-vmknic -l  gives me an 169.254.0.1 ip address and not the one in the kickstart script

4. so I need to change the ip address of the Management Network, but the following command fails, so I replaced Management Network with VM Network

5. esxcfg-vmknic -a -i 10.16.95.45 -n 255.255.255.0 -p "VM Network"

6. now my ip address is 10.16.95.45 and I can ping the tfpt server

7. when I do a wget, wget ftp://anonymous:vmware@10.20.91.12/esx/esxinstall/dc1-dmz1.cfg -O ./dc1-dmz1.cfg I can download the kickstart

so there is nothing wrong with my network I assume? the only difference with my other blades is that this one has two extra NIC (vmknic2 and vmknic3)

are these port groups always present during the installation? what is the problem?

the size of the local hard disk is 40GB and I have 16Gb memory. I want to install ESXi 4.1

Kind regards,

Wouter

Reply
0 Kudos
Yperman
Contributor
Contributor

Hello,

I solved it. I had to add vlanid=95 after the kickstart file. Strange.

ankitfsl
Contributor
Contributor

Hi Yperman,

Can you please let me know in which file you added the vlanid parameter as i am facing the same issue.

Regards

Ankit

Reply
0 Kudos
Yperman
Contributor
Contributor

Hello,

This is the content of the first used file (PXE - before using the cfg script)

default esx/esxi41u1/menu.c32
menu title VMware VMvisor Boot Menu
timeout 80

label ESXi Installer
menu label ^ESXi Installer
kernel esx/esxi41u1/mboot.c32
append esx/esxi41u1/vmkboot.gz ks=ftp://anonymous:vmware@<IP>/esx/esxinstall/kickstart.cfg vlanid=95 --- esx/esxi41u1/vmkernel.gz --- esx/esxi41u1/sys.vgz --- esx/esxi41u1/cim.vgz --- esx/esxi41u1/ienviron.vgz --- esx/esxi41u1/install.vgz

label ^Boot from local disk
menu label ^Boot from local disk
localboot 0x80

Kind regards,

Wouter

Jan Yperman

a1k
Contributor
Contributor

Hopefully my experience might be helpful to somebody.  I ran into "Did not get an IP Address from DHCP server" with scripted install on HP's BL660c Gen 8 blade with Flex-10.  The resolution was to use netdevice=vmnic8 in menu.cfg's Append command (your vmnic # might be different).  For some reason ESXi identified primary NIC as #8 (these systems have total of 16 -- which makes total mess out of the experience) but PXE had no issue correctly identifying or using it. 

Reply
0 Kudos
Matt_B1
Enthusiast
Enthusiast

This sounds more like the issue I am having. My main issue is that we cable the 10GB ports only which are vmnic4 and vmnic5.

Where is menu.cfg located? I tried adding it to my boot.cfg file of the ESXi image but that resulted in the ESXi install not even loading.

kernelopt=ks=http://<kickstart server>/esxi6.0/ks.cfg netdevice=vmnic4

The error was "No NIC found with name "vmnic4". I went into the console of the ESXi server and verified vmnic4 is one of the 6 NICs listed. Without the vmnic4 line, everything works up into when it tries to get an IP and then load the kickstart file.