VMware Cloud Community
Trupti123
Contributor
Contributor
Jump to solution

Need to automate ESXi5.1 through PowerCLI

I need To automate Vshield Environment.For that I need to first Automate ESX 5.1 through PXE.For PXE i have My DHCP server on Virtual M/c having Windows 2008 R2 Server and TFTP on Ubuntu 11.10.I tested Unattended PXE installation of ESXi 5.1 which is working.Need to write script for Same.Help me.

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Sorry but I have no clue what you are actually asking to do with PowerCLI.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
20 Replies
LucD
Leadership
Leadership
Jump to solution

Have a look at Step by Step Deployment of ESXi using Auto Deploy


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

What i need to do is on bare-Metal installation of ESXi5.1 shuld get started on 1 trigger.for whole this i need to write one script. in powershell.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Sorry, but I'm not getting the question.

Do you want to prepare and trigger a bare-metal ESXi installation from a script ?

Perhaps you could give some more details on what you want that script you have in mind to be doing ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

I need to automate ESXi 5.1 installation from a powershell script.

For This to understand how PXE works we done with setup of DHCP on Virtual m/c having Windows 2008 R2 and TFTP server on Ubuntu 11.10 nd also PXE setup on Ubuntu virtual m/c.

Now using PXe setup i need to automate ESXi5.1 installation through script.

Not getting how to start..?Smiley Sad

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

When your AutoDeploy is set up correctly and you have prepared the ESXi image, it's only a matter of powering on the HW.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

but till now we used to create one VM .on that console we need to write what we need to install e.g ESXi5 which is written in /var/lib/tftpboot/pxelinux.cfg/default.  

my question is how let communicate bare-matel to ubuntu VM.?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Sorry but I have no clue what you are actually asking to do with PowerCLI.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

shuld i explain u in broader way??

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

That would be helpful


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

ok..Previously we had done PXE boot of ESXi5.1.for this out setup is like this..

=>Virtual m/c Windows 2008 R2 having DHCP setup

=>tftp server on ubuntu 11.10.also in /var/lib/tftpboot/ESX  we had mounted ESX.iso  again in ESX/ks.cfg file was kickstart file for ESX5.1

=>When we create new VM and try to power on it ;On Console we need to write name of OS we need to network boot.after that all the booting does get started automatically.

Now upto this whatever we had done we need to automate this using powershell and powerCLI commands .No  need to automate DHCP nd TFTP setup.By using that PXE server which is in our case ubuntu 11.10 we need to install ESX5.1 on bare metal.

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

Hey LucD have u understood my issue..?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Not really I must admit :smileyblush:

I get the fact that you have a DHCP server on a W2K8R2 box and a tftp server on an Ubuntu box.

But where is your PXE server ? Also on that Ubuntu box ?

When you setup the auto-deploy environment, the PXE server should reply to the network boot of the bare metal box, and the deployment of ESXi should start.

But that last line confuses me. Why is that VM there ? And where is that VM created ?

Is that already on the newly deployed ESXi box ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

My PXE setup is also already on the ubuntu setup.

nd New VM is nthg but we'r testing whether PXE works or not..

now we need to deploy ESX on bare metal instead of VM..

what i think to do i'l create 1 file named MAC address of that bare metal Containt of that file wil b lyk this

LABEL ESXI5

KERNEL ESX/mboot.c32

APPEND -c ESX/boot.cfg pxebooting= ks=nfs://10.210.156.138/var/lib/tftpboot/ESX/ks.cfg

MENU LABEL ESXi-5.0.0

nd keep in it /var/lib/tftpboot/pxelinux.cfg

whever i start host i.e bare metal in our case installation get started.

is this rite??

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

That is right, if you want to keep using the kickstart script method to deploy an ESXi server.

But since vSphere 5 the AutoDeployment was introduced. See vSphere 5.1 – Auto Deploy Stateless Caching and Stateful Installs for some info.

Check out how such an autodeploy works in this HoL called HOL-INF-03-m1 and more importantly, how you can script this from PowerCLI


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

its our internship project..nd we are not supposed to use Auto Deployment.Everything needs to be done through scripts.

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

whats the use of the installer file useropts.gz?

whenver i tried to pxe boot ESXi it showed me error as:Fatal Error 8:useropts.gz

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

I propose to move this thread to the ESXi Community.

I suspect you have a better chance of getting answers on the use of kickstart scripts over there.

Do you agree ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Trupti123
Contributor
Contributor
Jump to solution

yup..i agree..Smiley Happy

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Moved to the ESXi Community since this is actually a question about kickstart scripts.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos