VMware Cloud Community
zessaF
Contributor
Contributor
Jump to solution

Install OS with kickstart by passing start-up parameter

I would like to create a VM with PowerCLI and install the OS with kickstart by passing this as a parameter when starting the VM.

Does anyone have any ideas on how to pass the parameter?

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You are correct, intervening in the boot loader is not possible from PowerCLI.

But I'm wondering if setting up a Vagrant framework is that simple.

More so, since Red Hat has the possibility to boot & install from an ISO and a floppy disk.

See STARTING A KICKSTART INSTALLATION

Creating a floppy with content and attaching it to the VM is rather simple from within a PowerCLI script.


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

View solution in original post

Reply
0 Kudos
10 Replies
LucD
Leadership
Leadership
Jump to solution

What OS do you have in mind?

And what do you understand under kickstart?


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

Reply
0 Kudos
sjesse
Leadership
Leadership
Jump to solution

What you may want to look at is https://packer.io/docs/builders/vmware-iso.html  where you supply an iso to the vm and then there are mutliple ways at passing the kickstart information Its not powershell exactly, but you can call if from powershell.

Reply
0 Kudos
zessaF
Contributor
Contributor
Jump to solution

Sorry for not giving all the information. The VM will have the ISO mounted, RHEL8, and my Linux guys have provided me with a string where I put the ip address for the VM and start a kickstart script that installs the OS and then calls Puppet. Right now I create the VM, mount the ISO, and then manually enter the string at boot. So what I would like to do is to automate this step with PowerCLI if possible.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

You have to enter a string for the bootloader if I understand it correctly?

Do you have a link to that procedure?

If I remember correctly, the default option is to install the OS when the fresh VM is booted from the ISO.
Is that what you are doing?


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

Reply
0 Kudos
zessaF
Contributor
Contributor
Jump to solution

That looks a versatile and powerful tool. I will check it out, thanks for the tip!

Reply
0 Kudos
zessaF
Contributor
Contributor
Jump to solution

Yes that is correct. I will check with my colleagues tomorrow if they have a link, and in any case post the string.

Thanks so far Smiley Happy

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

If you just let the VM boot from the ISO, it will install the OS I assume?


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

Reply
0 Kudos
zessaF
Contributor
Contributor
Jump to solution

What I do is start the VM booting from the ISO, highlight the line with “Install RHEL 8.0”, press 'e' to enter the string, which goes at the end of the line starting with linuxefi.

The format of the string is: ip=ip::gw:nm::ens192:none nameserver=dns ks=https://webaddresstokickstartscript.ks rd.noverifyssl

And then press ctrl+x to start the installation

I realize this may not be easy to do with PowerCLI, and maybe the tip from sjessewith VMware builder may work better. I will download it and give it a try.

Here are a couple of links the Linux guys have used for making the procedure:

https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#making-the-kickstart-file-available...

http://man7.org/linux/man-pages/man7/dracut.cmdline.7.html

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

You are correct, intervening in the boot loader is not possible from PowerCLI.

But I'm wondering if setting up a Vagrant framework is that simple.

More so, since Red Hat has the possibility to boot & install from an ISO and a floppy disk.

See STARTING A KICKSTART INSTALLATION

Creating a floppy with content and attaching it to the VM is rather simple from within a PowerCLI script.


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

Reply
0 Kudos
zessaF
Contributor
Contributor
Jump to solution

Using a floppy is a very good solution, thank you.

Reply
0 Kudos