Add "disk_image": "true", in builder section.

--Virt

On Mon, Jun 3, 2019 at 12:38 PM Rickard von Essen <
[email protected]> wrote:

> I guess there is some problem with you settings in the kickstart file
> compared to the template.json file. I would try and create an image
> manually and see if that works and try to troubleshoot there. Also have a
> look at an existing, known good template like bentos 1) and compare with
> that.
>
>
> 1) https://github.com/chef/bento/blob/master/centos/centos-7.6-x86_64.json
>
> On Thu, May 30, 2019 at 5:57 PM Mike <[email protected]> wrote:
>
>> I can now successfully create an image, however it's not bootable - "disk
>> is not bootable". I'm not really sure what I'm missing.
>>
>> My JSON file:
>>
>> {
>>  "builders":
>>  [
>>    {
>>      "type": "qemu",
>>      "accelerator": "kvm",
>>      "headless": false,
>>      "qemuargs": [
>>        [ "-m", "2048M" ],
>>        [ "-smp", "cpus=1,maxcpus=16,cores=4" ]
>>      ],
>>      "disk_interface": "virtio",
>>      "disk_size": 100000,
>>      "format": "qcow2",
>>      "net_device": "virtio-net",
>>
>>       "floppy_dirs": [ "docroot" ],
>>
>>       "iso_url": "/home/mike/CentOS-6.10-x86_64-minimal.iso",
>>      "iso_checksum": "0da4a1206e7642906e33c0f155d2f835",
>>        "iso_checksum_type": "md5",
>>
>>       "vm_name": "centos6-base.iso",
>>      "output_directory": "centos6-base-img",
>>
>>       "http_directory": "docroot",
>>      "http_port_min": 10082,
>>      "http_port_max": 10089,
>>
>>       "ssh_host_port_min": 2222,
>>      "ssh_host_port_max": 2229,
>>
>>       "ssh_username": "root",
>>      "ssh_password": "password",
>>      "ssh_port": 22,
>>      "ssh_wait_timeout": "1200s",
>>
>>       "boot_wait": "10s",
>>      "boot_command": [
>>        "<up><wait><tab><wait> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort
>> }}/base-ks.cfg<enter><wait>"
>>      ],
>>
>>       "shutdown_command": "shutdown -P now"
>>    }
>>  ],
>>  "provisioners":
>>  [
>>    {
>>      "type": "shell",
>>      "inline": [
>>        "mkdir /mnt/floppy",
>>        "mount /dev/fd0 /mnt/floppy"
>>      ]
>>    }
>>  ]
>> }
>>
>> My kickstart:
>>
>> install
>>
>> firstboot --disabled
>> reboot --eject
>>
>> # Note: this nodename will become the hostname of the machine and
>> # tells other scripts what machine type to install.
>> network --device eth0 --bootproto dhcp --hostname pxy1
>>
>> rootpw  "password"
>>
>> key --skip
>>
>> text
>> skipx
>>
>> lang en_US.UTF-8
>> keyboard us
>> firewall --disabled
>> authconfig --enableshadow --passalgo=sha512
>> selinux --disabled
>> timezone --utc Etc/UTC
>>
>> bootloader --location=mbr --append="crashkernel=auto"
>> # Clear any invalid master boot records (required for new drives)
>> zerombr yes
>> # Clear the partition table
>> clearpart --all --initlabel
>> # Configure basic partitions.
>> # part swap --recommended
>> # Auto partition.
>> autopart
>>
>> repo --name="CentOS" --baseurl="
>> http://mirror.centos.org/centos/6/os/x86_64/";
>> repo --name="EPEL" --baseurl="
>> http://dl.fedoraproject.org/pub/epel/6/x86_64/";
>>
>> %packages
>> @base
>> @core
>> %end
>>
>> %post --log=/root/kickstart.post.log
>> %end
>>
>>
>> Do I need to define a drive in my JSON file? Thanks
>>
>> --
>> 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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/packer-tool/a472dadd-52cd-42dd-929a-675a09f18192%40googlegroups.com
>> <https://groups.google.com/d/msgid/packer-tool/a472dadd-52cd-42dd-929a-675a09f18192%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/CALz9Rt8bmcNuFTvpJ8HEz-4rUDZNdcfHW1-mszeh77Z8S60OSA%40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CALz9Rt8bmcNuFTvpJ8HEz-4rUDZNdcfHW1-mszeh77Z8S60OSA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CANu2A1BveAb1F%2BWumM8rS6epfRNts%2BnjrFrmHhn1r2zLztvexQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to