temp.vm-help.com
http://www.vm-help.com/forum/

pxe install with custom files
http://www.vm-help.com/forum/viewtopic.php?f=12&t=2747
Page 1 of 1

Author:  jeronimo [ Fri Jan 28, 2011 7:15 am ]
Post subject:  pxe install with custom files

Hi there,

the background: we're installing esxi 4.1 via pxe using the ultimate deployment appliance (www.ultimatedeployment.org).

I'd like to know how it is possible to include an oem.tgz whose content is integrated into the install.

As a matter of fact I don't have a full overview of what archives (vgz,tgz...) get used and extracted at which point so I'm a bit clueless.

I tried putting an oem.tgz onto our tftp boot server and adding "--- oem.tgz" to the kernel line in the boot menu. On the tftp server I saw that it was downloaded, but it's contents couldn't be found after install.

Maybe someone can shed a light on this or provide some useful references?

Regards,
JM

Author:  Varazir [ Fri Jan 28, 2011 9:21 am ]
Post subject:  Re: pxe install with custom files

Hello

Use my script to add the oem file to the dd image.
Use the USB install option and just select exit when
you come to the part you need select USB device.

The files will be saved the save/VMware.usb folder

//Daniel

Author:  Dave.Mishchenko [ Fri Jan 28, 2011 2:21 pm ]
Post subject:  Re: pxe install with custom files

I was going to suggest exactly what Daniel has outlined. When ESXi installs it uses a disk image and you have to modify that to get any changes to stick post install.

Author:  ViennaAustria [ Wed Dec 14, 2011 12:37 pm ]
Post subject:  Re: pxe install with custom files

Dave.Mishchenko wrote:
When ESXi installs it uses a disk image and you have to modify that to get any changes to stick post install.

I must object, but that's not the only way to perform that task!

When you're installing from CD/ISO, it is a formidable choice to modify the installation image. But for PXE installation it is much simpler to add your oem.tgz at the very end of the setup using a kickstart script.

PXE installation is usually choosen, when you're frequently instaling ESXi, like we do. In that case you need new drivers every now and then. Using kickstart script "implementation" of the oem.tgz saves you much time, because you never have to modify the original files from CD/ISO. You can add a new driver on your installation server within a minute and another three minutes later the first ESXi host is installed with it and ready.

If somebody's interested, I can give you a detailed description of how we're doing it.

Author:  jeronimo [ Mon Dec 19, 2011 9:26 am ]
Post subject:  Re: pxe install with custom files

ViennaAustria wrote:
If somebody's interested, I can give you a detailed description of how we're doing it.


For now we don't do esxi deployment anymore because of those intel ixgbe issues.
But yes please, let us know how you do it so we can discuss.

Author:  ViennaAustria [ Wed Jan 04, 2012 8:07 am ]
Post subject:  Re: pxe install with custom files

jeronimo wrote:
But yes please, let us know how you do it so we can discuss.


Sorry for the delay. Vacation... :)

We install using PXE boot. So you have to install an DHCP Server which informs the client about the bootserver and TFTP filename to fetch:
Code:
next-server 1.1.1.1;
filename "pxelinux.0";

In the TFTP root we have the usual pxelinux environment and a directory "esxi41u1", containing all the files from the installation CD.
Code:
 16M cim.vgz
7.1M ienviron.vgz
295M imagedd.bz2
4.0K imagedd.md5
952K install.vgz
4.0K ks.cfg
4.8M oem.tgz
 70M sys.vgz
 48K vmkboot.gz
2.4M vmkernel.gz

You do not need to patch them in any way - not even repack the imagedd.bz2 file! Into this directory we copy our version of the oem.tgz file plus our ks.cfg:
Code:
accepteula
autopart --firstdisk --overwritevmfs
install url http://1.1.1.1/esxi41u1/
keyboard German
network --bootproto=dhcp
reboot
rootpw --iscrypted XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
serialnum --esx=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

%post --unsupported --interpreter=busybox --ignorefailure=true
cd /tmp
wget -q http://1.1.1.1/esxi41u1/oem.tgz
mv -f oem.tgz /vmfs/volumes/Hypervisor1/
sync
sleep 10

%firstboot --unsupported --interpreter=busybox
sed -i 's/^#ssh/ssh/' /etc/inetd.conf
kill -HUP $(pidof inetd)

To enable this kickstart script, we configured the section for the ESXi 4.1 U1 setup as follows:
Code:
LABEL esxi41u1ks
        MENU LABEL VMware ESXi 4.1 Update 1 by ^KS script
        KERNEL mboot.c32
        APPEND esxi41u1/vmkboot.gz ks=http://1.1.1.1/esxi41u1/ks.cfg --- esxi41u1/vmkernel.gz --- esxi41u1/sys.vgz --- esxi41u1/cim.vgz --- esxi41u
1/ienviron.vgz --- esxi41u1/oem.tgz --- esxi41u1/install.vgz
        IPAPPEND 2

The postinstall part fetches http://1.1.1.1/esxi41u1/oem.tgz with `wget´ and puts it into the Hypervisor1 partition of the installed ESXi host - so you don't need to patch it into the installation files.

We use a webserver to transfer the oem.tgz file and to the ks.cfg script by HTTP, because of it's simplicity. We made a symlink from WWW root "esxi41u1" to TFTP root "esxi41u1" (and of course enabled symlinks in the Apache config).

The "firstboot" section of the kickstart script enables SSH on the host.

It works perfectly. When we need another driver, we simply add it to our version of the oem.tgz file and on goes the next setup. :D

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/