I was trying to do a kickstart installation for CentOS 6.4 but it always show me a warning of re-initializing the HDD as it say may contain invalid partition table or a virtual disk. I have added below is the snapshot of the kickstart file I am trying to use
# System bootloader configuration
bootloader --append="crashkernel=auto rhgb quiet" --location=mbr --driveorder="sda"
autopart
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel --drives=sda
part /boot --fstype ext4 --size=300
part / --fstype="ext4" --grow --size=1 --asprimary
Even I have created partitions to try as workaround but no resort. Any thoughts how to make this warning go away. I am trying to do this through Packer-tools for ESXI host (which has 5.5 version) running. Below is the JSON template I am using
# cat base-packer.json
{
"builders": [
{
"vm_name": "Centos6.5",
"type": "vmware-iso",
"iso_url": "http://127.0.0.1:8000/CentOS-6.5-x86_64-minimal.iso",
"iso_checksum": "0d9dc37b5dd4befa1c440d2174e88a87",
"iso_checksum_type": "md5",
"disk_size": "20480",
"disk_type_id": "thin",
"http_directory": "~/packertemplatebuilding",
"remote_host": "191.168.42.3",
"remote_datastore": "52dfe32b-a996d262-9b46-2c4138a85a23/Centos6.5",
"remote_username": "root",
"remote_password": "rootpass",
"remote_type": "esx5",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "250s",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"headless": "false",
"boot_command": [
"<tab> text ks=http://148.147.206.152:8000/ks_new.cfg<enter><wait>"
],
"boot_wait": "20s",
"vmx_data": {
"ethernet0.virtualDev": "vmxnet3",
"ethernet0.networkName": "VM Network",
"ethernet0.addressType": "generated",
"ethernet0.present": "TRUE",
"ethernet1.virtualDev": "vmxnet3",
"ethernet1.networkName": "VM Network 2",
"ethernet1.addressType": "generated",
"ethernet1.present": "TRUE",
"ide0:0.fileName": "disk.vmdk",
"ide0:0.present": "TRUE",
"ide0:0.redo": "",
"scsi0:0.present": "FALSE",
"memsize": "2048",
"numvcpus": "2",
"cpuid.coresPerSocket": "1"
}
}
],
"provisioners": [
{
"type": "shell",
"script": "ssh-commands.sh"
}
]
}
Below is the snapshot of the error I am getting.
PS The image I am using is a custom spin from CentOS 6.4. But I don't think that kickstart config should have an impact on the same.
text
to your kickstart? Also, please correct theclearpart --all
line.