Thanks Rickard. Attached the ks.cfg file 

On Monday, April 15, 2019 at 1:10:34 PM UTC+8, Rickard von Essen wrote:
>
> According to your configuration there should be a file http/ks.cfg
>
>
> On Mon, Apr 15, 2019, 06:48 Benny Chan <[email protected] <javascript:>> 
> wrote:
>
>> Sorry I am totally new to Packer. May i know where can i find the 
>> Kickstart file? 
>>
>> On Mon, Apr 15, 2019 at 12:34 PM Rickard von Essen <[email protected] 
>> <javascript:>> wrote:
>>
>>> And your Kickstart file how does it look like?
>>>
>>> On Mon, Apr 15, 2019, 03:14 Benny Chan <[email protected] <javascript:>> 
>>> wrote:
>>>
>>>> Thanks Rickard. This is the command I run 
>>>>
>>>> /packer/packer build -var-file=myenv_conf.json 
>>>> vmware/local/centos_base.json
>>>>
>>>> All files are zipped. 
>>>>
>>>>
>>>>
>>>> On Saturday, April 13, 2019 at 3:07:11 PM UTC+8, Rickard von Essen 
>>>> wrote:
>>>>>
>>>>> Please provide your full Packer temple, Kickstart/preseed file if 
>>>>> applicable and a full log when running Packer with env var PACKER_LOG=1.
>>>>>
>>>>> On Sat, Apr 13, 2019, 00:47 Benny Chan <[email protected]> wrote:
>>>>>
>>>>>> hi All, 
>>>>>>
>>>>>> I encountered the situation about "Error getting SSH address". The 
>>>>>> log message is listed below. 
>>>>>>
>>>>>>
>>>>>> 2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 Lookup up IP 
>>>>>> information...
>>>>>> 2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 GuestAddress found 
>>>>>> MAC address in VMX: 00:0c:29:64:ff:e1
>>>>>> 2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 Trying DHCP leases 
>>>>>> path: /etc/vmware/vmnet8/dhcpd/dhcpd.leases
>>>>>> 2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 IP lookup failed: 
>>>>>> None of the found device(s) [vmnet8] has a DHCP lease for MAC 
>>>>>> 00:0c:29:64:ff:e1
>>>>>> 2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 [DEBUG] Error getting 
>>>>>> SSH address: IP lookup failed: None of the found device(s) [vmnet8] has 
>>>>>> a 
>>>>>> DHCP lease for MAC 00:0c:29:64:ff:e1
>>>>>> 2019/04/11 17:43:06 packer: 2019/04/11 17:43:06 Located networkmapper 
>>>>>> configuration file using Workstation: /etc/vmware/netmap.conf
>>>>>> 2019/04/11 17:43:06 packer: 2019/04/11 17:43:06 GuestIP discovered 
>>>>>> device matching nat: vmnet8
>>>>>>
>>>>>> Attached the vmx file for reference. 
>>>>>>
>>>>>> I followed a post online to vnc into the ip and I can reach the VM 
>>>>>> but it is one a setup screen or something. I attached the screen capture 
>>>>>> for reference
>>>>>>
>>>>>> Any advice what steps to follow to make it works? 
>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> 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 [email protected].
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/packer-tool/7ae69dc9-a942-470a-8c23-77d6c279e3bf%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/packer-tool/7ae69dc9-a942-470a-8c23-77d6c279e3bf%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> -- 
>>>> 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 [email protected] <javascript:>.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/packer-tool/9c2d7e94-af62-4f9d-a8e5-8a6705501e0a%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/packer-tool/9c2d7e94-af62-4f9d-a8e5-8a6705501e0a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>>> 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 [email protected] <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/packer-tool/CALz9Rt82UkcsdpY_e2qLkqHjZDw-4weFNh4OoGCJoZs0ABQn9g%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/packer-tool/CALz9Rt82UkcsdpY_e2qLkqHjZDw-4weFNh4OoGCJoZs0ABQn9g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/CABWx6rD2UuZpgtCgxDvBb5J_qeBaS47RgvxfRo%3DLrV6g-%2Bftdg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/CABWx6rD2UuZpgtCgxDvBb5J_qeBaS47RgvxfRo%3DLrV6g-%2Bftdg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/0dbee59d-38e6-4a8a-a1ad-57380ede0a52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# CentOS 7.x kickstart file - centos7.ks
#
# For more information on kickstart syntax and commands, refer to the
# CentOS Installation Guide:
# 
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
#
# For testing, you can fire up a local http server temporarily.
# cd to the directory where this ks.cfg file resides and run the following:
#    $ python -m SimpleHTTPServer
# You don't have to restart the server every time you make changes.  Python
# will reload the file from disk every time.  As long as you save your changes
# they will be reflected in the next HTTP download.  Then to test with
# a PXE boot server, enter the following on the PXE boot prompt:
#    > linux text ks=http://<your_ip>:8000/ks.cfg

# Required settings
lang en_US.UTF-8
keyboard us
rootpw root
authconfig --enableshadow --enablemd5
timezone UTC

# Optional settings
install
cdrom
user --name=centos --plaintext --password centos
unsupported_hardware
network --device eth0 --bootproto=dhcp --noipv6 --onboot=on
firewall --disabled
selinux --permissive
# The biosdevname and ifnames options ensure we get "eth0" as our interface
# even in environments like virtualbox that emulate a real NW card
bootloader --location=mbr --append="no_timer_check console=tty0 
console=ttyS0,115200 net.ifnames=0 biosdevname=0 ipv6.disable=1"
text
skipx
zerombr
clearpart --all --initlabel
autopart
firstboot --disabled
reboot

%packages --nobase --ignoremissing --excludedocs
# centos needs this to copy initial files via scp
openssh-clients
# Prerequisites for installing VMware Tools or VirtualBox guest additions.
# Put in kickstart to ensure first version installed is from install disk,
# not latest from a mirror.
kernel-headers
kernel-devel
gcc
make
perl
curl
wget
bzip2
dkms
patch
net-tools
selinux-policy-devel
# Core selinux dependencies installed on 7.x, no need to specify
# Other stuff
sudo
nfs-utils
-fprintd-pam
-intltool

# Microcode updates cannot work in a VM
-microcode_ctl
# unnecessary firmware
-aic94xx-firmware
-alsa-firmware
-alsa-tools-firmware
-atmel-firmware
-b43-openfwwf
-bfa-firmware
-ipw*-firmware
-irqbalance
-ivtv-firmware
-iwl*-firmware
-kernel-firmware
-libertas-usb8388-firmware
-ql*-firmware
-rt61pci-firmware
-rt73usb-firmware
-xorg-x11-drv-ati-firmware
-zd1211-firmware
# Don't build rescue initramfs
-dracut-config-rescue
%end

%post
# configure centos user in sudoers
echo "%centos ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/centos
chmod 0440 /etc/sudoers.d/centos
cp /etc/sudoers /etc/sudoers.orig
sed -i "s/^\(.*requiretty\)$/#\1/" /etc/sudoers
# keep proxy settings through sudo
echo 'Defaults env_keep += "HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY 
NO_PROXY"' >> /etc/sudoers

echo > /etc/udev/rules.d/70-persistent-net.rules
echo > /etc/udev/rules.d/75-persistent-net-generator.rules
mv /etc/sysconfig/network-scripts/ifcfg-ens* 
/etc/sysconfig/network-scripts/ifcfg-eth0
sed -i 's/ens[0-9]*/eth0/' /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i 's/IPV6INIT=yes/IPV6INIT=no/' /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i 's/IPV6_AUTOCONF=yes/IPV6_AUTOCONF=no/' 
/etc/sysconfig/network-scripts/ifcfg-eth0
sed -i 's/IPV6_DEFROUTE=yes/IPV6_DEFROUTE=no/' 
/etc/sysconfig/network-scripts/ifcfg-eth0
sed -i 's/ONBOOT=no/ONBOOT=yes/' /etc/sysconfig/network-scripts/ifcfg-eth0

%end

Reply via email to