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

boot_command not working #3

Open
Gokul-C opened this issue Sep 29, 2023 · 3 comments
Open

boot_command not working #3

Gokul-C opened this issue Sep 29, 2023 · 3 comments

Comments

@Gokul-C
Copy link

Gokul-C commented Sep 29, 2023

Hi, I have cloned your code and modified your code to work with HyperV-iso builder. I have not touched boot_command. Since it is failing and the Packer is not taking the kickstart files. It is popping up a GUI installer to select the language. While the packer build starts it automatically serve kickstart files via HTTP, I also checked in the browser with IP:PORT here I can see user-data and meta-data file present. I don't know what went wrong. Can you please help me here?

@hswong3i
Copy link
Member

Assuming you are referencing this boot_command (

"boot_command": [
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"c<wait5>",
"set gfxpayload=keep<enter><wait5>",
"linux /casper/vmlinuz <wait5>",
"autoinstall quiet fsck.mode=skip <wait5>",
"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait5>",
"ds=\"nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/\" <wait5>",
"---<enter><wait5>",
"initrd /casper/initrd<enter><wait5>",
"boot<enter>"
],
).

The initial keys pressed are those <tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>, so if you could see something keep typing to the console then these boot_command is passing from packer to the console correctly. Therefore sometime boot_wait may be the root cause, since the VM may take more time to bootup.

If those boot_command seems not passing to the console, then something else from packer + HyperV-iso builder may happened. Therefore you should report the issue to packer.

@Gokul-C
Copy link
Author

Gokul-C commented Sep 29, 2023

Yes I can see this packer typing automatically

"set gfxpayload=keep<enter><wait5>", 
   "linux /casper/vmlinuz <wait5>", 
   "autoinstall quiet fsck.mode=skip <wait5>", 
   "net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait5>", 
   "ds=\"nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/\" <wait5>", 
   "---<enter><wait5>", 
   "initrd /casper/initrd<enter><wait5>", 
   "boot<enter>" 

Okay will increase the boot_wait time and share the results here. Thank you so much for your reply.

@hswong3i
Copy link
Member

Would that possible if hyperv default with UEFI mode? If so the boot_command may also need to update accordingly. You could googling with some else UEFI example from github.

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

No branches or pull requests

2 participants