Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redhat 8 Installation using EFI based installation, After completed the boot command with Ctrl-x, VM goes to poweroff state #426

Closed
prabahar-subramani opened this issue May 9, 2023 · 3 comments
Assignees
Labels
Milestone

Comments

@prabahar-subramani
Copy link

Hi All,

I'm trying to provision EFI based Redhat OS installation using packer with Vcenter. Here i'm using Kickstart file for preseeding. After typed the Boot Command and then do the Ctrl-X and then VM goes to poweroff state.

Below the Packer Information:
boot_order = "disk,cdrom,floppy"
boot_wait = "10s"
boot_command = [
"",
"e",
"",
"",
"linuxefi /images/pxeboot/vmlinuz inst.ks=hd:sr1:ks.cfg inst.stage2=hd:LABEL=RHEL-8-6-0-BaseOS-x86_64 quiet",
"",
"x",
""
]

Packer Version:
Packer v1.8.0

And also tried on Packer : 1.9.0

Still the issue exist.

@tenthirtyam
Copy link
Collaborator

@lbajolet-hashicorp - could you transfer this issue to hashicorp/packer-plugin-vsphere, please? Thanks!

@lbajolet-hashicorp lbajolet-hashicorp transferred this issue from hashicorp/packer May 6, 2024
@tenthirtyam
Copy link
Collaborator

Hi @prabahar-subramani

The following boot_command can be used recommended on RHEL 8 and 9 (and related variants:

HTTP-based:

  boot_command = [
    // This sends the "up arrow" key, typically used to navigate through boot menu options.
    "<up>",
    // This sends the "e" key. In the GRUB boot loader, this is used to edit the selected boot menu option.
    "e",
    // This sends two "down arrow" keys, followed by the "end" key, and then waits. This is used to navigate to a specific line in the boot menu option's configuration.
    "<down><down><end><wait>",
    // This types the string "text" followed by the value for the method used.
    // This is used to modify the boot menu option's configuration to boot in text mode and specify the kickstart data source configured in the common variables.
    "text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg",
    // This sends the "enter" key, waits, turns on the left control key, sends the "x" key, and then turns off the left control key. This is used to save the changes and exit the boot menu option's configuration, and then continue the boot process.
    "<enter><wait><leftCtrlOn>x<leftCtrlOff>"
  ]

CD-based:

  boot_command = [
    // This sends the "up arrow" key, typically used to navigate through boot menu options.
    "<up>",
    // This sends the "e" key. In the GRUB boot loader, this is used to edit the selected boot menu option.
    "e",
    // This sends two "down arrow" keys, followed by the "end" key, and then waits. This is used to navigate to a specific line in the boot menu option's configuration.
    "<down><down><end><wait>",
    // This types the string "text" followed by the value for the method used.
    // This is used to modify the boot menu option's configuration to boot in text mode and specify the kickstart data source configured in the common variables.
    "text inst.ks=cdrom:/ks.cfg",
    // This sends the "enter" key, waits, turns on the left control key, sends the "x" key, and then turns off the left control key. This is used to save the changes and exit the boot menu option's configuration, and then continue the boot process.
    "<enter><wait><leftCtrlOn>x<leftCtrlOff>"
  ]

@tenthirtyam
Copy link
Collaborator

Marking as closed. Solution provided in #426 (comment).

@hashicorp hashicorp locked and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants