How can I use PowerCLI to boot a new Linux VM, and pass the kernel some startup parameters?
Which would be easiest: (a) to make and use a VM template, or (b) to boot from an ISO image, or (c) to start with a Linux VM and clone that?
The base Linux is RedHat on an ISO image currently on the network (ISO could be on a local path where the PowerCLI script is running if needed). If a template would be simplest then an outline how to make one from my ISO would be great!
RedHat Linux can be configured by passing startup parameters to the kernel, so kickstart configures the system, something like
ks=/my/path/ks.cfg otherparams
where ks.cfg tells kickstart what to do.
how do I pass startup parameters into the new VM?
(It's probably totally irrelevant, but I've got this working with Xen using bash scripting and
$UUID= xe vm-install template="RedHatLinux64bit"
xe vm-param-set uuid=$UUID PV-args="ks=/my/path/ks.cfg"
xe vm-start uuid=$UUID
now it has to be implemented on ESX. To determine when the new VM is fuly configured, my kickstart scripts writes a semaphore to be detected by the bash script.)
I know very little about ESX and PowerCLI so details will be especially helpful please!
Thanks!