Cannot VirtualBox to find my preseed file - How does preseed files work with Packer

701 views
Skip to first unread message

Savage Hacker

unread,
May 31, 2018, 2:05:38 PM5/31/18
to Packer
Hello everyone,


I'm newbie to packer, I'm trying to install Ubuntu Os in virtualbox. Unfortunately, when I go to boot try and use my preseed file I get the error message above. Could not find kernel image: preseed/url=http:/<some I.P address>ubuntu<preseed file>.

By the way this is all being done by Packer, starting the VM up until when the error message occurs
Below is my template.json

 {
   
"builders": [
     
{
       
"type": "virtualbox-iso",
       
"vm_name": "{{ user `alias` }}",
       
"vboxmanage": [          
           
[ "modifyvm", "{{.Name}}", "--cpus", "1" ],
           
[ "modifyvm", "{{.Name}}", "--memory", "2048" ],
           
[ "modifyvm", "{{.Name}}", "--clipboard", "bidirectional" ],            
           
[ "modifyvm", "{{.Name}}", "--draganddrop", "bidirectional" ],
           
[ "modifyvm", "{{.Name}}", "--boot3", "disk" ],
           
[ "modifyvm", "{{.Name}}", "--audio", "none" ],  
           
[ "modifyvm", "{{.Name}}", "--nic1", "intnet" ],  
           
[ "modifyvm", "{{.Name}}", "--nic2", "null" ]
         
],
       
"guest_os_type": "Ubuntu_64",
       
"iso_url": "{{ user `iso_url` }}",
       
"iso_checksum": "{{ user `iso_checksum` }}",
       
"iso_checksum_type": "md5",
       
"disk_size": "{{ user `disk_size` }}",
       
"ssh_username": "{{ user `ssh_username` }}",
       
"ssh_password": "{{ user `ssh_password` }}",
       
"ssh_timeout": "{{ user `ssh_timeout` }}",
       
"guest_additions_mode": "attach",
       
"headless": "{{ user `headless` }}",
       
"http_directory": "http",
       
"boot_wait": "5s",
       
"boot_command": [
         
"<enter><wait5>",
         
"<esc><enter><wait5>",
         
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/{{user `preseed_file`}} ",
         
"<enter>"
       
],
       
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now"
     
}
   
],
   
"post-processors": [
     
{
       
"type": "vagrant",
       
"output": "C:/Users/{import/automation/packer/boxes/ubuntu/{{ user `box_name` }}.box"
     
}
   
],
   
"variables": {
     
"headless": "false",
     
"iso_checksum": "{{ user `iso_checksum` }}",
     
"iso_url": "{{ user `iso_url` }}",
     
"disk_size": "256000",
     
"alias": "packervm",
     
"box_name": "ubuntu_custom",
     
"ssh_timeout": "10m",
     
"ssh_username": "{{ user `ssh_username` }",
     
"ssh_password": "packer",
     
"preseed_file":"{{user `preseed_file1`}}"
   
}
 
}
This is my file directory structure in case

What's the problem and how to retrive the preseed file?

file directory.docx
pressed error message.PNG
Auto Generated Inline Image 1
Auto Generated Inline Image 2

Alvaro Miranda Aguilera

unread,
May 31, 2018, 2:21:56 PM5/31/18
to packe...@googlegroups.com

--
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/4f1dc949-b0c2-4c4b-ae98-bc8441f9a60b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Savage Hacker

unread,
May 31, 2018, 2:45:13 PM5/31/18
to Packer
Hey Alvaro,
I looked into but I am not understanding how that helps me with my problem?
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
May 31, 2018, 3:19:59 PM5/31/18
to packe...@googlegroups.com
you can start with that and see where is different and find the error.

or you could share yours and I can have a look.



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/3789a977-2c7c-4f19-a46c-f7af28e84d27%40googlegroups.com.

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



--
Alvaro

Rickard von Essen

unread,
May 31, 2018, 3:22:08 PM5/31/18
to packe...@googlegroups.com
Your boot command is incorrect. A correct boot line doesn't look like that. 

It's very hard to create a install from scratch. I always suggest that you start from a known good template such as the one Alvaro suggests or Bento *)


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/3789a977-2c7c-4f19-a46c-f7af28e84d27%40googlegroups.com.

Savage Hacker

unread,
May 31, 2018, 4:31:34 PM5/31/18
to Packer
Hey Alvaro,
I really can't share aside from what I have shown for reasons I can't explain. However, I did try to substituting my boot commands with the boot commands found at the GitHub and my preseed didn't even work. By that I mean my vm was waiting for some answers and instead of my preseed file answering them. I am not entirely sure what does boot commands mean or do if they are applicable. Like I said, I am new Packer.



--
Alvaro

Rickard von Essen

unread,
Jun 1, 2018, 2:59:09 AM6/1/18
to packe...@googlegroups.com

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/3eb4da33-3fa1-4a99-92cf-ef4a6f7ca66c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages