VMware Cloud Community
KellyOlivier
Enthusiast
Enthusiast
Jump to solution

ESXi scripted install ks.cfg question

I am trying to build an environment to test scripted install of esxi 4.1. I am having trouble finding or getting the default ks.cfg file. The doco shows the location as /etc/vmware/weasel/ks.cfg but I cannot find the file. How do you extract the image to simply get this start file? Why don't they just place it in the installed product like before?

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

The default ks.cfg is the same as listed in the ESXi documentation on page 34 - http://www.vmware.com/pdf/vsphere4/r41/vsp_41_esxi_i_vc_setup_guide.pdf

You can just copy that since it's the exact same one if you were to extract it. The default ks.cfg is also embedded in a python script in the ESXi 4.1 iso, but you'll need to extract that out of ienviron.vgz. Copy that file to a UNIX/Linux or even ESX host and make sure you put it in a new temporarily directory.

You'll then run the following:

tar -zxvf ienviron.vgz

Now you should see 3 new directories created: etc,lib and usr and if you cat out the following file, you'll also see where the default ks.cfg is created from:

cat usr/lib/vmware/weasel/scripted/cursed_ui.py

usr/lib/vmware/weasel/scripted/__init__.py0000444000031100003110000000000011374626617017321 0visor  mtsmtsusr/lib/vmware/weasel/scripted/grammar.py0000555000031100003110000010310111374626617017122 0visor  mtsmts¤sr/lib/vmware/weasel/scripted/preparser.py0000555000031100003110000015625711374626617017734 0visor  mtsmts,usr/lib/vmware/weasel/scripted/kickstartfile.py0000555000031100003110000000627511374626617020521 0visor  mtsmts
usr/lib/vmware/weasel/scripted/scriptwriter.py0000555000031100003110000002747511374626617020446 0visor  mtsmtsusr/lib/vmware/weasel/scripted/ui.py0000555000031100003110000001602511374626617016367 0visor  mtsmtsHusr/lib/vmware/weasel/scripted/util.py0000555000031100003110000000303411374626617016761 0visor  mtsmtsfusr/lib/vmware/weasel/task_progress.py0000555000031100003110000002630411374626617017072 0visor  mtsmtsnusr/lib/vmware/weasel/singleton.py0000555000031100003110000000300111374626617015651 0visor  mtsmtsusr/lib/vmware/weasel/thin_partitions.py0000444000031100003110000000652511374626617017110 0visor  mtsmts¤usr/lib/vmware/weasel/usbmedia.py0000555000031100003110000000526211374626617015501 0visor  mtsmts²usr/lib/vmware/weasel/tidy.py0000555000031100003110000000246511374626617014677 0visor  mtsmts¾usr/lib/vmware/weasel/userchoices.py0000555000031100003110000003704711374626617016254 0visor  mtsmtsÄusr/lib/vmware/weasel/users.py0000555000031100003110000001054311374626617015172 0visor  mtsmtsusr/lib/vmware/weasel/util/0000755000031100003110000000000011374626617014364 5visor  mtsmtsusr/lib/vmware/weasel/util/_util.py0000555000031100003110000004720011374626617016144 0visor  mtsmtsusr/lib/vmware/weasel/util/__init__.py0000555000031100003110000000051011374626617016700 0visor  mtsmtsfusr/lib/vmware/weasel/util/regexlocator.py0000555000031100003110000000234411374626617017650 0visor  mtsmtshusr/lib/vmware/weasel/visor_cdrom.py0000444000031100003110000000453011374626617016525 0visor  mtsmtsnusr/lib/vmware/weasel/workarounds.py0000555000031100003110000001061311374626617016571 0visor  mtsmtsxetc/chkconfig.db0101644000031100003110000000041311374626615012134 0visor  mtsmts#
# Sample scripted installation file
#

# Accept the VMware End User License Agreement
vmaccepteula

# Set the root password for the DCUI and Tech Support Mode
rootpw mypassword

# Choose the first disk (in channel/target/lun order) to install onto
autopart --firstdisk --overwritevmfs

# The install media is in the CD-ROM drive
install cdrom

# Set the network to DHCP on the first network adapter
network --bootproto=dhcp --device=vmnic0

# A sample post-install script
%post --unsupported --interpreter=python --ignorefailure=true
import time
stampFile = open('/finished.stamp', mode='w')
stampFile.write( time.asctime() )
VMWARE MASTER END USER LICENSE AGREEMENT
.....

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
2 Replies
lamw
Community Manager
Community Manager
Jump to solution

The default ks.cfg is the same as listed in the ESXi documentation on page 34 - http://www.vmware.com/pdf/vsphere4/r41/vsp_41_esxi_i_vc_setup_guide.pdf

You can just copy that since it's the exact same one if you were to extract it. The default ks.cfg is also embedded in a python script in the ESXi 4.1 iso, but you'll need to extract that out of ienviron.vgz. Copy that file to a UNIX/Linux or even ESX host and make sure you put it in a new temporarily directory.

You'll then run the following:

tar -zxvf ienviron.vgz

Now you should see 3 new directories created: etc,lib and usr and if you cat out the following file, you'll also see where the default ks.cfg is created from:

cat usr/lib/vmware/weasel/scripted/cursed_ui.py

usr/lib/vmware/weasel/scripted/__init__.py0000444000031100003110000000000011374626617017321 0visor  mtsmtsusr/lib/vmware/weasel/scripted/grammar.py0000555000031100003110000010310111374626617017122 0visor  mtsmts¤sr/lib/vmware/weasel/scripted/preparser.py0000555000031100003110000015625711374626617017734 0visor  mtsmts,usr/lib/vmware/weasel/scripted/kickstartfile.py0000555000031100003110000000627511374626617020521 0visor  mtsmts
usr/lib/vmware/weasel/scripted/scriptwriter.py0000555000031100003110000002747511374626617020446 0visor  mtsmtsusr/lib/vmware/weasel/scripted/ui.py0000555000031100003110000001602511374626617016367 0visor  mtsmtsHusr/lib/vmware/weasel/scripted/util.py0000555000031100003110000000303411374626617016761 0visor  mtsmtsfusr/lib/vmware/weasel/task_progress.py0000555000031100003110000002630411374626617017072 0visor  mtsmtsnusr/lib/vmware/weasel/singleton.py0000555000031100003110000000300111374626617015651 0visor  mtsmtsusr/lib/vmware/weasel/thin_partitions.py0000444000031100003110000000652511374626617017110 0visor  mtsmts¤usr/lib/vmware/weasel/usbmedia.py0000555000031100003110000000526211374626617015501 0visor  mtsmts²usr/lib/vmware/weasel/tidy.py0000555000031100003110000000246511374626617014677 0visor  mtsmts¾usr/lib/vmware/weasel/userchoices.py0000555000031100003110000003704711374626617016254 0visor  mtsmtsÄusr/lib/vmware/weasel/users.py0000555000031100003110000001054311374626617015172 0visor  mtsmtsusr/lib/vmware/weasel/util/0000755000031100003110000000000011374626617014364 5visor  mtsmtsusr/lib/vmware/weasel/util/_util.py0000555000031100003110000004720011374626617016144 0visor  mtsmtsusr/lib/vmware/weasel/util/__init__.py0000555000031100003110000000051011374626617016700 0visor  mtsmtsfusr/lib/vmware/weasel/util/regexlocator.py0000555000031100003110000000234411374626617017650 0visor  mtsmtshusr/lib/vmware/weasel/visor_cdrom.py0000444000031100003110000000453011374626617016525 0visor  mtsmtsnusr/lib/vmware/weasel/workarounds.py0000555000031100003110000001061311374626617016571 0visor  mtsmtsxetc/chkconfig.db0101644000031100003110000000041311374626615012134 0visor  mtsmts#
# Sample scripted installation file
#

# Accept the VMware End User License Agreement
vmaccepteula

# Set the root password for the DCUI and Tech Support Mode
rootpw mypassword

# Choose the first disk (in channel/target/lun order) to install onto
autopart --firstdisk --overwritevmfs

# The install media is in the CD-ROM drive
install cdrom

# Set the network to DHCP on the first network adapter
network --bootproto=dhcp --device=vmnic0

# A sample post-install script
%post --unsupported --interpreter=python --ignorefailure=true
import time
stampFile = open('/finished.stamp', mode='w')
stampFile.write( time.asctime() )
VMWARE MASTER END USER LICENSE AGREEMENT
.....

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
RS_1
Enthusiast
Enthusiast
Jump to solution

@William : you mean vmtar -x ./ienviron.vgz -o ./ienviron.tgz ?

0 Kudos