Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Boot command #53

Merged
merged 11 commits into from
Feb 18, 2018
Merged

Boot command #53

merged 11 commits into from
Feb 18, 2018

Conversation

mkuzmin
Copy link
Contributor

@mkuzmin mkuzmin commented Feb 18, 2018

boot_command parameter for keyboard typing.

Special keys like <bs>, <leftAltOn>, and <wait> are supported.
PACKER_KEY_INTERVAL environment variable is supported.

vSphere 6.5 is required as new API is used to send USB codes instead of VNC connection.

http_directory parameter is not implemented but preseed files can be placed onto a floppy drive, see an example for Ubuntu.

@mkuzmin mkuzmin merged commit b636eb2 into master Feb 18, 2018
@mkuzmin mkuzmin deleted the boot-command branch February 18, 2018 02:14
@mkuzmin mkuzmin mentioned this pull request Feb 18, 2018
@patrickmslatteryvt
Copy link

patrickmslatteryvt commented Mar 3, 2018

Any chance of getting the http_directory parameter for support of Fedora?
As of Fedora 18 support for kickstart files on a floppy was removed.

ks=floppy
Specified a floppy disk as the Kickstart file source. Floppy drives are not supported anymore.

Alternatively Fedora supports USB media for the kickstarts.
https://docs.fedoraproject.org/f27/install-guide/advanced/Kickstart_Installations.html

Edit:
I just noticed your comment on #16 where you state that http_directory would not work reliably with remote builds. I think you are right there. I'll just try a simple external http server (or use GitHub) to serve up the kickstart file for now.

Update: This works, and has the side benefit that the same kickstart file will work for VirtualBox builds as well:

"floppy_files":           ["http/fedora27-server.ks"],
"boot_command": [
  "<tab> ",
  "inst.ks=hd:/dev/fd0:/fedora27-server.ks ",
  "biosdevname=0 ",
  "net.ifnames=0 ",
  "<enter>"
],

I guess a floppy is just another file to a UNIX system, right? ;-)

@seanmalloy
Copy link
Contributor

@patrickmslatteryvt have you considered adding a kickstart file into a custom install ISO?

I have successfully done this with RHEL, but have never tried doing this with Fedora. I've also not been able to successfully use this plugin in my environment due to lack to ESXi cluster support. But once cluster support is added my plan is to test the custom install ISO approach. I'm restricted to vCenter v6.0 in my environment, so using the boot_command option will not work for me.

Here are some docs for how to embed a kickstart file into a custom RHEL install ISO. You may be able to adapt these instructions to work with Fedora. I'd be fascinated to know if you are able to get this to work with Fedora with the vsphere-iso plugin.

https://access.redhat.com/solutions/60959
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/anaconda_customization_guide/
http://www.smorgasbork.com/2014/07/16/building-a-custom-centos-7-kickstart-disc-part-1/

@patrickmslatteryvt
Copy link

@seanmalloy I didn't find it necessary to do that since Fedora 27 simply treated the floppy image as if it were a hard disk as I showed in code above. (everything's just a file!)
I was trying this against a single node vSphere v6.5.x deployment that I use for development so the cluster limitation did not impact me. You might consider trying a nested instance of vSphere v6.5.x running in your v6.0.x cluster, that would allow you to test the new plugin at least (assuming that security restrictions are not preventing you from doing that)
See:
Nested ESXi Enhancements in vSphere 6.5
Updated Nested ESXi 6.0u3 & 6.5d Virtual Appliances

@mkuzmin
Copy link
Contributor Author

mkuzmin commented Mar 3, 2018

you don't have to modify ISO images, the plugin now allows to mount multiple CD-ROM devices in parallel.

Right now I'm automating macOS installation. It also doesn't have floppy drives, so the scripts are placed onto a custom ISO image.
Probably, in future we will need to add a functionality to generate and upload such ISO files the same way as we do it for floppies.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants