Link to home
Start Free TrialLog in
Avatar of itnifl
itniflFlag for Norway

asked on

ESXi host Error "Did not get an IP Address from DHCP server" at scripted usb install

I am doing a scripted usb install.

My boot.cfg looks like this:
bootstate=0
title=My Automated installer
kernel=/tboot.b00
kernelopt=runweasel ks=usb:/KS.CFG
modules=/b.b00 --- /jumpstrt.gz --- /useropts.gz --- /k.b00 --- /chardevs.b00 --- /a.b00 --- /user.b00 --- /sb.v00 --- /s.v00 --- /misc_cni.v00 --- /net_bnx2.v00 --- /net_bnx2.v01 --- /net_cnic.v00 --- /net_tg3.v00 --- /scsi_bnx.v00 --- /scsi_bnx.v01 --- /scsi_bfa.v00 --- /elxnet.v00 --- /ima_be2i.v00 --- /lpfc.v00 --- /scsi_be2.v00 --- /char_hpc.v00 --- /char_hpi.v00 --- /hp_ams.v00 --- /hp_build.v00 --- /hp_conre.v00 --- /hp_esxi_.v00 --- /hp_smx_p.v00 --- /hpbootcf.v00 --- /hpnmi.v00 --- /hponcfg.v00 --- /hpssacli.v00 --- /hptestev.v00 --- /scsi_hpd.v00 --- /scsi_hps.v00 --- /scsi_hpv.v00 --- /net_igb.v00 --- /net_ixgb.v00 --- /scsi_mpt.v00 --- /net_mlx4.v00 --- /net_mlx4.v01 --- /net_mst.v00 --- /ima_qla4.v00 --- /net_nx_n.v00 --- /net_qlcn.v00 --- /qlnative.v00 --- /scsi_qla.v00 --- /ata_pata.v00 --- /ata_pata.v01 --- /ata_pata.v02 --- /ata_pata.v03 --- /ata_pata.v04 --- /ata_pata.v05 --- /ata_pata.v06 --- /ata_pata.v07 --- /block_cc.v00 --- /ehci_ehc.v00 --- /weaselin.t00 --- /esx_dvfi.v00 --- /xlibs.v00 --- /ipmi_ipm.v00 --- /ipmi_ipm.v01 --- /ipmi_ipm.v02 --- /lsi_mr3.v00 --- /lsi_msgp.v00 --- /misc_dri.v00 --- /mtip32xx.v00 --- /net_be2n.v00 --- /net_e100.v00 --- /net_e100.v01 --- /net_enic.v00 --- /net_forc.v00 --- /net_vmxn.v00 --- /ohci_usb.v00 --- /rste.v00 --- /sata_ahc.v00 --- /sata_ata.v00 --- /sata_sat.v00 --- /sata_sat.v01 --- /sata_sat.v02 --- /sata_sat.v03 --- /sata_sat.v04 --- /scsi_aac.v00 --- /scsi_adp.v00 --- /scsi_aic.v00 --- /scsi_fni.v00 --- /scsi_ips.v00 --- /scsi_lpf.v00 --- /scsi_meg.v00 --- /scsi_meg.v01 --- /scsi_meg.v02 --- /scsi_mpt.v01 --- /scsi_mpt.v02 --- /scsi_qla.v01 --- /uhci_usb.v00 --- /tools.t00 --- /xorg.v00 --- /imgdb.tgz --- /imgpayld.tgz
build=
updated=0

Open in new window


My KS.CFG looks like this:
accepteula
clearpart --firstdisk --overwritevmfs
install --firstdisk --overwritevmfs
rootpw mypass123
network --bootproto=static --device=vmnic0 --addvmportgroup=0 --ip=172.0.1.12 --netmask=255.255.255.0 --gateway=172.0.1.1 --hostname=ESXiHost1 --vlanid=100 --nameserver=8.8.8.8

%post --interpreter=busybox --ignorefailure=true
#Blabla here

Open in new window

When the installer starts doing its automated stuff, it says in the beginning:
Did not get an IP Address from DHCP server.

Then it halts for a while until the error message at the installer screen dissappears/times out and the install continues. The ESXi host ends up with the correct IP as stated above, and this test-host has only one network card - and it s being assigned as static IP. The whole install succeeds, but I want the error message to not appear.

I found this in the esxi_install.log - the pnic name is what I noticed as strange:
User generated image
Any ideas on what this might be?
Avatar of vivigatt
vivigatt
Flag of France image

As you have this line:
network --bootproto=static --device=vmnic0 --addvmportgroup=0 --ip=172.0.1.12 --netmask=255.255.255.0 --gateway=172.0.1.1 --hostname=ESXiHost1 --vlanid=100 --nameserver=8.8.8.8

I guess that the error is actually a false-positive.
It seems that the install process wants a DHCP assigned address even if you specified a static one.
Check what options are available to you to pass this detail to the installer process(es).
Another way to bypass this error is to assign a static DHCP reservation in the DHCP config and to use a dhcp-based config in your "network" command.
Avatar of itnifl

ASKER

It is all here under network options:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004582

Doesn't look like anything is missing.
Can't use dhcp in this environment.

I also tried this in boot.cfg, but it did not do any difference:
kernelopt=runweasel ks=usb:/KS.CFG netdevice=vmnic0 ip=172.0.1.12 netmask=255.255.255.0 gateway=172.0.1.1

Open in new window

I guess you should file a bug report to VMWare...
I haven't seen anything wrong with your config.
Too bad I cannot test it myself, I left the job in which I had multiple vSphere environments...
Have you noticed the message "Network choices not specified. Using DHCP" in your log ?
Maybe worth some more investigation. I may be logged sometimes after the first network config has been set...
The complete log might be helpful
Avatar of itnifl

ASKER

I cannot give you the whole install log without heavily parsing it for enviromental information regarding the systems here, so I am pasting in only the portion right before and after the error shows up in the logs:

2015-09-07T09:56:54.910Z DEBUG    Validating command: vnc
2015-09-07T09:56:54.910Z DEBUG    Validating command: volgroup
2015-09-07T09:56:54.910Z DEBUG    Validating command: xconfig
2015-09-07T09:56:54.910Z DEBUG    Validating command: xdisplay
2015-09-07T09:56:54.910Z DEBUG    Validating command: zerombr
2015-09-07T09:56:54.945Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:56:54.945Z INFO     Network choices not specified.  Using DHCP.
2015-09-07T09:56:54.945Z INFO     connectDhcp called for pnic None
2015-09-07T09:56:55.002Z WARNING  no pnicName specified, no changes made to connect via DHCP
2015-09-07T09:56:55.003Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:56:58.003Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:56:58.005Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:01.008Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:01.010Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:04.013Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:04.015Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:07.018Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:07.020Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:10.022Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:10.024Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:13.029Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:13.031Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:16.033Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:16.035Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:19.039Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:19.041Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:22.044Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:22.046Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:25.049Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:25.051Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:28.054Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:28.056Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:31.059Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:31.061Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:34.064Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:34.066Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:37.069Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:37.071Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:40.074Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:40.076Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:43.079Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:43.081Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:46.082Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:46.085Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:49.088Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:49.090Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:52.093Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:52.095Z WARNING  Still waiting for an IP address from DHCP
2015-09-07T09:57:55.097Z DEBUG    Progress happened on a task that has not started
2015-09-07T09:57:55.100Z ERROR    Could not bring up network (Did not get an IP Address from DHCP server)
Traceback (most recent call last):
  File "/usr/lib/vmware/weasel/scripted/cursed_ui.py", line 786, in tryNetworkConnect
    connect()
  File "/usr/lib/vmware/weasel/networking/networking_base.py", line 51, in newFn
    return fn(*args, **kwargs)
  File "/usr/lib/vmware/weasel/networking/networking_base.py", line 187, in connect
    return connectDhcp(None)
  File "/usr/lib/vmware/weasel/networking/networking_base.py", line 51, in newFn
    return fn(*args, **kwargs)
  File "/usr/lib/vmware/weasel/networking/networking_base.py", line 154, in connectDhcp
    raise ConnectException('Did not get an IP Address from DHCP server')
ConnectException: Did not get an IP Address from DHCP server
2015-09-07T09:57:55.101Z WARNING  Could not bring up network (Did not get an IP Address from DHCP server)

Open in new window


I think this is a bug, these pyhon scripts that are a part of the vmware install are reading for input somewhere that vmware has not documented. I have given network configuration information both in the kickstart script and also tried it in the boot.cfg.

kernelopt=runweasel ks=usb:/KS.CFG netdevice=vmnic0 ip=172.0.1.12 netmask=255.255.255.0 gateway=172.0.1.1

Open in new window

Avatar of itnifl

ASKER

I found the solution. Firstly, I think it is worth to mention that the log file /var/log/weasel.log is worth taking a look at if a scripted install fails. It contained information on what flags and arguments were set seen by the runweasel. I could there see that bootproto defaults to dhcp even if static is defined in the kickstart script KS.CFG. This is the line I used in boot.cfg to get rid of the dhcp error message (Did not get an IP Address from DHCP server):  
kernelopt=runweasel ks=usb:/KS.CFG bootproto=static addvmportgroup=0 netdevice=vmnic0 ip=172.0.1.12 netmask=255.255.255.0 gateway=172.0.1.1 hostname=ESXiHost1 vlanid=100 nameserver=8.8.8.8

Open in new window


In addition I specify this in KS.CFG:
network --bootproto=static --addvmportgroup=0 --device=vmnic0 --ip=172.0.1.12 --netmask=255.255.250.0 --gateway=172.0.1.1 --hostname=ESXiHost1 --vlanid=100 --nameserver=8.8.8.8

Open in new window


You can access /var/log/weasel.log during install by pressing ALT+F1 and entering root as user and a blank password. This will give access to the console.
Avatar of itnifl

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for itnifl's comment #a41193110

for the following reason:

Solution found.
ASKER CERTIFIED SOLUTION
Avatar of vivigatt
vivigatt
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of itnifl

ASKER

Cannot confirm it other then that the error message disappeared after I added the  "bootproto=static" explicitly to boot.cfg. When checking /var/log/weasel.log, I see that bootproto is listed as static now instead of dhcp as it was earlier when I did not explicitly define the bootproto.
OK.
It seems then that the lead I gave you (investigate the error message "Network choices not specified. Using DHCP") was not such a bad idea...
Avatar of itnifl

ASKER

Yes you are right. Too much time passed from I got the comment until I pieced together the answer.
Avatar of itnifl

ASKER

Actually, it seems that the error is back. I was too quick to celebrate. I think it is a bug in the python scripts that weasel uses:
/usr/lib/vmware/weasel/scripted/cursed_ui.py line 786, then
/usr/lib/vmware/weasel/networking/networking_base.py line 57, 198, 51 and 156.

Keeping this case solved, will post more here if I find out more.