Closed ericxnhu closed 4 years ago
Rhel 8, and most newer distros don't have floppy support anymore. See the release notes.
This applys to centos 8 as well.
Got it, thanks!
So how to use vsphere-iso to build rhel 8 image? I tried placing the ks.cfg on a nfs server, and pointing to it in boot command (like install.ks=nfs:.../ks.cfg), but it still couldn't load the file.
Thanks in advance.
Eric
On Thu, Oct 17, 2019 at 2:15 PM Bryan Hundven notifications@github.com wrote:
Rhel 8, and most newer distros don't have floppy support anymore. See the release notes.
This applys to centos 8 as well.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jetbrains-infra/packer-builder-vsphere/issues/276?email_source=notifications&email_token=AIBNRRPO4P4W7L744S5VRNLQPCTUJA5CNFSM4JB5HY3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBRBEAI#issuecomment-543298049, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBNRRLJECR32TJ7YC63IM3QPCTUJANCNFSM4JB5HY3A .
We stuck it on a http server, so first we defined which folder we have placed our kickstart in locally:
"http_directory": "http/kickstart",
Packer will then serve that directory and its contents on a http server. You can then in the boot command point to the http server and the kickstart using the following (Assuming your kickstart is called ks.cfg)
"boot_command": [
"<up><wait><tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks.cfg <enter>"
]
This HTTP way is working fine with RHEL 7.x. but anyone has done it with RHEL 8.x? because it's not working!!!
Same for me http is working on CentOS 7 but not for CentOS 8.x. Can someone please post any working examples of their boot command. Or if anything was done to their KS file.
I had to use
genisoimage -o rhel8_ks.iso -V "OEMDRV" ks.cfg
and then place the iso where vsphere could reach it to attach with CDROM.
I had to use
genisoimage -o rhel8_ks.iso -V "OEMDRV" ks.cfg
and then place the iso where vsphere could reach it to attach with CDROM.
Can you give a hint how the boot_command in the template should look like to use the generated rhel8_ks.iso?
@iacuser for boot command I just used the below
"variables": {
"ks_iso": "[datastore] ISOs/rhel8_ks.iso",
"iso_paths": [
"{{user `rhel_iso`}}",
"{{user `vmtools_iso`}}",
"{{user `ks_iso`}}"
...
"boot_command": "<enter> <enter>"
just to get through the bootup selection for installing. When it senses the Image it loads iso, reads the "OEMDRV" label and continues from there with kickstarter. hope that helps.
@MarcoM65 This was indeed helpful thank you.
I had to adapt the boot command though, to make sure the correct kickstart file is used.
"boot_command": "<wait10><tab>linux inst.ks=hd:/dev/sr1:ks_rhel8.cfg<enter>"
On my side its working for RHEL8 with following boot command :
"boot_command": [ "<up><wait><tab> text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks-rhel8-{{user
vsphere_datacenter}}-integration.cfg ip={{user
template_ip}}::{{user
template_gateway}}:{{user
template_cidr}}:templaterhel8:ens192:none <enter>" ]
Hope this will help
This will probably help a bunch of people here. In order to use this on your local machine with vcenter, all you have to do is:
cd_files
cd_label = "OEMDRV"
boot_command
do the following linux inst.ks=hd:/dev/sr1:<path_to_ks_file>
http_content = null
Packer will add your kickstart file to the datastore in an iso or whatever you want to make and attach the image to the VM. If a CD has a label of OEMDRV
then RHEL8 and above will use that images kickstart file to boot the current one. Let me know if this helped.
Trying to use vspsher-iso to build a RHEL v8 template, the build failed at loading kickstart file.
The terminal output is like this:
==> rhel80-opcs-xfs-vsphere: Creating VM... ==> rhel80-opcs-xfs-vsphere: Customizing hardware... ==> rhel80-opcs-xfs-vsphere: Mount ISO images... ==> rhel80-opcs-xfs-vsphere: Creating floppy disk... rhel80-opcs-xfs-vsphere: Copying files flatly from floppy_files rhel80-opcs-xfs-vsphere: Copying file: ../centos/http/8/ks.cfg rhel80-opcs-xfs-vsphere: Done copying files from floppy_files rhel80-opcs-xfs-vsphere: Collecting paths from floppy_dirs rhel80-opcs-xfs-vsphere: Resulting paths from floppy_dirs : [] rhel80-opcs-xfs-vsphere: Done copying paths from floppy_dirs ==> rhel80-opcs-xfs-vsphere: Uploading created floppy image ==> rhel80-opcs-xfs-vsphere: Adding generated Floppy... ==> rhel80-opcs-xfs-vsphere: Set boot order temporary... ==> rhel80-opcs-xfs-vsphere: Power on VM... ==> rhel80-opcs-xfs-vsphere: Waiting 10s for boot... ==> rhel80-opcs-xfs-vsphere: Typing boot command... ==> rhel80-opcs-xfs-vsphere: Waiting for IP...
On vm console I got the following: " boot: linux inst.text inst.ks=hd:fd0:/ks.cfg Loading ... failed: No such file or directory boot: " After a while it would go back to manual install screen.
My build json file is like this: "........ "iso_paths": [ "[{{ user linux inst.text inst.ks=hd:fd0:/ks.cfg ",
"boot_wait": "10s",
"convert_to_template": false
......"
vsphere_datastore
}}] ISO/rhel-8.0-x86_64-dvd.iso" ], "floppy_files": [ "../centos/http/8/ks.cfg" ], "boot_command": "The same json build file would work for rhel7.7 build: if I change "iso_paths" to "[{{ user
vsphere_datastore
}}] ISO/rhel-server-7.7-x86_64-dvd.iso", the build would go through.Any thoughts?