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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to