Centos unable to get kickstarter to work

1,023 views
Skip to first unread message

Scott Bailey

unread,
Jan 19, 2017, 6:23:50 AM1/19/17
to Packer
Hey,

Unable to get : "linux ks=http://{{.HTTPIP}}:{{.HTTPPort}}/kickstart.cfg<enter>"




To load. 

{
  "builders": [{
    "type": "virtualbox-iso",
    "guest_os_type": "RedHat_64",
    "iso_checksum_type": "md5",
    "iso_checksum": "df0d8f6b12116c653fa60394e4430b57",
    "ssh_username": "vagrant",
    "ssh_password": "vagrant",
"http_directory": "http",
"http_port_min": 10082,
"http_port_max": 10089,
"ssh_host_port_min": 2222,
"ssh_host_port_max": 2229,
"ssh_port": 22,
        "ssh_wait_timeout": "30s",
"vm_name": "tdhtest",
    "boot_command": [
      "<wait><esc><esc>",
      "linux ks=http://{{.HTTPIP}}:{{.HTTPPort}}/kickstart.cfg<enter>"
    ]
  }],
  "post-processors": ["vagrant"]
}

Rickard von Essen

unread,
Jan 19, 2017, 7:51:52 AM1/19/17
to packe...@googlegroups.com
Please supply _full_ config.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/97dac0e5-4966-4d27-8cc9-97efe0fda001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alvaro Miranda Aguilera

unread,
Jan 19, 2017, 12:24:07 PM1/19/17
to packe...@googlegroups.com
whats the content of http folder

a github link to your repo will help

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/97dac0e5-4966-4d27-8cc9-97efe0fda001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Scott Bailey

unread,
Jan 19, 2017, 3:39:30 PM1/19/17
to Packer
Hi,

I am new to all this kinda of stuff sorry:


To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

Rickard von Essen

unread,
Jan 19, 2017, 4:27:39 PM1/19/17
to packe...@googlegroups.com
Your kickstart file is called kickstarter.cfg but your boot_command references kickstart.cfg. Also you should not use remote_host since your kickstart uses dhcp. Let packer handle networking as much as possible. 

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/a1990a50-f33e-47f4-aca1-0e900f311062%40googlegroups.com.

Alvaro Miranda Aguilera

unread,
Jan 19, 2017, 5:08:46 PM1/19/17
to packe...@googlegroups.com

Scott Bailey

unread,
Jan 19, 2017, 5:35:32 PM1/19/17
to Packer
I've tried a couple of different files just haven't cleaned up some of those attemptes. 

I've tried your code Alvaro, but it still unable to find the ks.cfg.

What possible could i be doing differently?

It starts up the vm and wants to find a 10.0.x.x ip. i don't know any ips on that range/

Alvaro Miranda Aguilera

unread,
Jan 19, 2017, 5:42:24 PM1/19/17
to packe...@googlegroups.com
That ip is the IP Virtualbox gives to the VM.

can you share the output of

if windows:
set PACKER_LOG=1

rest:
export PACKER_LOG=1

then packer build example.json




--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/2e159bac-90a5-4c37-b678-d476e98241b8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Scott Bailey

unread,
Jan 19, 2017, 6:29:13 PM1/19/17
to Packer
okay i followed this hope this is okay:
set PACKER_LOG=1
set PACKER_LOG_PATH=c:\temp\packer log
packer build -debug c:/packer/example.json




On Friday, 20 January 2017 08:42:24 UTC+10, Alvaro Miranda Aguilera wrote:
That ip is the IP Virtualbox gives to the VM.

can you share the output of

if windows:
set PACKER_LOG=1

rest:
export PACKER_LOG=1

then packer build example.json



On Thu, Jan 19, 2017 at 11:35 PM, Scott Bailey <bailey...@gmail.com> wrote:
I've tried a couple of different files just haven't cleaned up some of those attemptes. 

I've tried your code Alvaro, but it still unable to find the ks.cfg.

What possible could i be doing differently?

It starts up the vm and wants to find a 10.0.x.x ip. i don't know any ips on that range/

On Friday, 20 January 2017 08:08:46 UTC+10, Alvaro Miranda Aguilera wrote:

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Jan 19, 2017, 10:16:44 PM1/19/17
to packe...@googlegroups.com
Hello.

So, i did edit the template and did add:

      "headless": "false",

And modified:
      "ssh_wait_timeout": "10000s",

on my machine the boot was working fine, but did exit due time out was 30 seconds, but installation took more.

on your logs seems packer is complaining about format

what editor are you using? the best will be you run dos2unix on example.json and ks.cfg to ensure they are with unix end of line.

test without editing the attached zip.



To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/2e4e28d4-eabf-4631-8981-4803da5fb5f1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

learningpacker.zip

Alvaro Miranda Aguilera

unread,
Jan 19, 2017, 10:28:55 PM1/19/17
to packe...@googlegroups.com
from there, the next error will be:

==> virtualbox-iso: Connected to SSH!
==> virtualbox-iso: Uploading VirtualBox version info (5.1.14)
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error uploading VirtualBox version: SCP failed to start. This usually means that SCP is not
properly installed on the remote system.


that is yoi need to have scp command installed in the guest VM.

you can add it to the ks.cfg into the packages section

and seems that is on this package:
openssh-clients

from there you will probably end with a VM without virtualbox additions installed

but I am assuming you want to move step by step and learn, so I will wait for you to ask for help if needed :)

alvaro
--
Alvaro

Scott Bailey

unread,
Jan 19, 2017, 10:53:44 PM1/19/17
to Packer
Hi,

I'm using Notepad++,

I have made the same changes you have outlined with no luck still get to a to the screen that says error downloading kickstart file. 
I've tried using your file provided as well and the same thing occurs. 



--
Alvaro

Alvaro Miranda Aguilera

unread,
Jan 19, 2017, 11:06:06 PM1/19/17
to packe...@googlegroups.com
hi

so with the headless false, it will display the virtualbox screen, whats the error on the screen?

another thing i can imagine is windows firewall may be causing isses, low probability but worth check



To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/b83f0aea-fb03-4953-b6af-0604d0dba03a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Scott Bailey

unread,
Jan 19, 2017, 11:20:36 PM1/19/17
to Packer
still this same issue: http://imgur.com/a/TIXSm

and "==> virtualbox-iso: Waiting for SSH to become available..." is the last line in packer.



--
Alvaro

Scott Bailey

unread,
Jan 20, 2017, 1:45:41 AM1/20/17
to Packer
Do i need a linux image that has ssh enabled already? is that what my issue is?

Rickard von Essen

unread,
Jan 20, 2017, 2:22:52 AM1/20/17
to packe...@googlegroups.com
No, sshd is installed and enabled by default. 

The best way to troubleshoot this is by setting an incredible high ssh_timeout, say 12h and use headless false. After that start packer and use the VirtualBox ui to access the console where you can login as root. Now you can troubleshoot the network from both your host and the guest. But if you used Alvaros repository it should work without modification and the only thing that I can guess at is an evil Windows(/macOS)  firewall or a very odd network setup. 

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/0bf6f13d-9cbc-4ed5-af03-f5cb962418ad%40googlegroups.com.

Alvaro Miranda Aguilera

unread,
Jan 20, 2017, 6:44:35 AM1/20/17
to packe...@googlegroups.com
ensure you are on the latest version of packer and virtualbox

try disable windows firewall and any anti virus, this is only part of the troubleshooting, enable them back after the test.

aslo,  what I have seen in the past is the network cable on the VM looks like disconnected

raise the timeout, add another zero to the end
run a new build

try to access the url from your desktop browser, i expect this to work

then, go to settings of the VM and check if the cable is connected or not



To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/d6d236f3-d8c1-4e19-9ecf-d26b92382b20%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Screenshot from 2017-01-20 09-51-46.png

Scott Bailey

unread,
Jan 20, 2017, 7:08:54 AM1/20/17
to Packer
So i've gotten sick and tired of work on Windows... moved over to my mac... took me longer to figure out how to set my PATH for packer then it did to get this to work :'(

Windows sucks.... mac loved the good old vagrant and packer more.... guess i'll just develop on here from now on.

Thank you both for your patience and help, its been greatly appreciated. 



--
Alvaro

Alvaro Miranda Aguilera

unread,
Jan 20, 2017, 8:37:31 AM1/20/17
to packe...@googlegroups.com
packer and vagrant are in homebrew

so if you install homebrew, will be easier :D

it does all for you.

in the repo are still pending steps. ie install virtualbox, etc.

Virtualbox requires some packages, say kernel-devel, kernel-headers, gcc

are plenty of examples on the internet, check  chef/bento on github for ideas.

or, have a look at this


pixel fairy

unread,
Jan 28, 2017, 10:26:53 AM1/28/17
to Packer
if your stuck on windows again, vmware-player is free and has solid nested virtualization support.
Reply all
Reply to author
Forward
0 new messages