network configuration issue in booting RHEL

407 views
Skip to first unread message

Edward Liu

unread,
Aug 17, 2015, 5:31:52 AM8/17/15
to Packer
Hi experts, 


Thanks if you can give me any help, I’m doing a packer testing on local servers.

 

The Server Env:

 

10.56.224.174 (a vm where packer installed and executed)

10.56.224.153 (ESXi host)

10.56.224.187 (vm named as pakcer)

Both vms are resided on the host 10.56.224.153 


I enabled the packer log (attached the log: packer_test.log)

 

If you are able to analysis the log, do you think what is the reason of the issue ?

 

 

The issue seems happened in this step :

 

“==> vmware-iso: Waiting for SSH to become available...

2015/08/07 08:13:59 packer-builder-vmware-iso: 2015/08/07 08:13:59 starting remote command: esxcli --formatter csv network vm list

2015/08/07 08:14:00 packer-builder-vmware-iso: 2015/08/07 08:14:00 remote command exited with '0': esxcli --formatter csv network vm list

2015/08/07 08:14:00 packer-builder-vmware-iso: 2015/08/07 08:14:00 [DEBUG] Error getting SSH address: EOF

2015/08/07 08:14:05 packer-builder-vmware-iso: 2015/08/07 08:14:05 opening new ssh session

2015/08/07 08:14:05 packer-builder-vmware-iso: 2015/08/07 08:14:05 starting remote command: esxcli --formatter csv network vm list

2015/08/07 08:14:05 packer-builder-vmware-iso: 2015/08/07 08:14:05 remote command exited with '0': esxcli --formatter csv network vm list

2015/08/07 08:14:05 packer-builder-vmware-iso: 2015/08/07 08:14:05 [DEBUG] Error getting SSH address: EOF

….. repeat this for a long time until CTRL+C


If I also checked the vm console to see what's going on, I can see the process is hang in error window "Unable to download kickstart file", also I can get attached screenshot (CTRL-F3) shows "Unable to activate eth0", I suppose this is the reason since no IP set on the node, and not able to download kickstart file. 


By vSphere client, I can see there shows the network connection issue in Network Conenction on the right panel of the screenshot as attached  (network_adapter)



PS: if anything not clear, feel free to let me know.



Thanks


Br,Edward



packer_test.json
packer_test.log
CTRL-F3.jpg
2015-7-29 15-55-33.jpg
network_adapter.jpg

Alvaro Miranda Aguilera

unread,
Aug 17, 2015, 6:03:16 AM8/17/15
to packe...@googlegroups.com
Hello,

Looking some examples on the net, looks like is easier if you use floppy to pass the kickstart 
Taken from here

Alvaro

          "floppy_files": [
                "/home/kickstart/ks.cfg"
            ],
..
            "boot_command": "<tab> text ks=floppy <enter><wait>",
            "boot_wait": "5s"


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/eb3d11c5-7302-4162-8040-82f20e18a176%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edward Liu

unread,
Aug 18, 2015, 5:26:13 AM8/18/15
to Packer
Hi, Alvaro

Still facing issue: 

I followed the suggestion and modified the .json file by using floppy, it asked to input IP address, even I feed the proper one, still reported configuration error on nw i/f. 

Would you pls help check if the .json file is correct? 

Thanks
Br,Edward




在 2015年8月17日星期一 UTC+8下午6:03:16,Alvaro Miranda Aguilera写道:
packer_test2.json
packer_test2_1.jpg
packer_test2_2.json.jpg
packer_test2_3.jpg
packer_test2_4.jpg
ks.cfg

Alvaro Miranda Aguilera

unread,
Aug 18, 2015, 5:53:25 AM8/18/15
to packe...@googlegroups.com
Hello,

The issue is on the IP.

IF you get any question in the installation that mean the anaconda (installer) is not able to get the information from the kickstart.

So in this case, I think the error is on this line:

network --onboot yes --device eth0 --bootproto static --ip 10.56.224.187 --netmask 255.255.255.0 --gateway 10.56.224.1 --noipv6  --

Couple of options.

a. ensure the device is what the vm have. Since RH7 they get funny names, not longer eth0
b. tell the installer on the boot, to not use funny names, and use old names.

I can't suggest A or B, but I can share how you can do A or B and you make your way.

For A:

Update ks.cfg to use a device like:
--device=p2p1

For B:

Update template to include this in the boot line:
net.ifnames=0 biosdevname=0 

And update the kickstart to replace:

From:
bootloader --location=mbr

To:
bootloader --location=mbr --boot-drive=sda --append="net.ifnames=0 biosdevname=0"

Any issue, let me know.

Thanks
Alvaro.



Edward Liu

unread,
Aug 19, 2015, 4:12:29 AM8/19/15
to Packer
Hi Alvaro, 


Sorry but the issue is still there, I still be asked to input IP address when doing installation (even input the proper one, still failed), looks kickstart file still not properly be fetched: 


[root@edward_ium kickstart]# cat ks.cfg

install
lang en_US.UTF-8
keyboard us

network --onboot yes --device eth0 --bootproto static --ip 10.56.224.187 --netmask 255.255.255.0 --gateway 10.56.224.1 --noipv6  --hostname packer
rootpw nls72NSN
firewall --disabled
selinux --disable
authconfig --enableshadow --passalgo=sha512
timezone --isUtc Europe/Helsinki
text

bootloader --location=mbr --boot-drive=sda --append="net.ifnames=0 biosdevname=0"
#bootloader --location=mbr
zerombr

### cciss/c0d0 for HP or sda for VMware or IBM servers --- NOT VALID IN RHEL 6
#clearpart --all --initlabel --drives=sda
clearpart --all --initlabel --linux
ignoredisk --only-use=sda
part /boot --fstype ext4 --size=150 --asprimary --ondisk=sda
part pv.1 --size=1 --grow --ondisk=sda
volgroup rootVG pv.1
logvol / --fstype ext4 --name=root --vgname=rootVG --size=10000 --grow
logvol /var --fstype ext4 --name=var --vgname=rootVG --size=6144 --grow --percent=25
logvol /tmp --fstype ext4 --name=tmp --vgname=rootVG --size=2048 --grow --maxsize=4096
%include /tmp/swappart

%include /tmp/netconf

I also pulled the vmware.log and packer.vmx file from virtual machine if these are useful. 



Thanks
Br,Edward




在 2015年8月18日星期二 UTC+8下午5:53:25,Alvaro Miranda Aguilera写道:
vmware.log
packer.vmx
packer_test2.json
2015-8-19 15-57-47.jpg

Alvaro Miranda Aguilera

unread,
Aug 19, 2015, 5:22:34 AM8/19/15
to packe...@googlegroups.com
Hello,

With my RedHat linux hat, I can tell your kickstart file seems to be wrong.

So I suggest do the installation by hand without packer, and improve that until it works. And then automate.

Will be very hard troubleshoot by email I am afraid.



Let me enumerate some of the errors i see.

1. this packer template is for redhat 6, so the suggestion I did don't apply for network here.  The other was rh7 (??)

So let me share some documentation you will need to review:

kickstart in redhat 6

kickstart in redhat 7



url is to tell the installer from where get the installation media.

If you are using a full dvd, then the installation media is on the dvd tray, so you can comment out url and use cdrom



if you are using the boot.img, then you need to have the full media shared by http/ftp/nfs

3. packer require a reboot after the installation

your kickstart is missing a reboot, otherwise at the end of the installation will be waiting for manual intervention to shutdown server



4. Not sure if those include will work, usually the include files are created or pulled from %pre script, I don't see any of those.


So I will ask try to get some un-attended installation working first, and then try to automate that.

Sorry for not being more helpful.
Alvaro



Reply all
Reply to author
Forward
0 new messages