Team, 
 
Am using the following JSON and KS.cfg to build the centos 8 templates. But 
facing an error with floppy disks (which am not using in the config). Can 
someone help me with this? 

CentOS 8 JSON
```
{
  "variables": {
   "vsphere_uid": "Null",
   "vsphere_passwd": "Null",
   "vm_superuser_passwd" : "Null",
   "vsphere_vm_name": "Null",
   "bastion_host": "",
   "bastion_user": "",
   "bastion_password":"Null",
   "datacenter": "",
   "cluster": "",
   "datastore": "",
   "network": "",
   "iso_paths": ""
   },

  "builders": [
    {
      "type": "vsphere-iso",

      "vcenter_server":      "{{user `vsphere_server` }}",
      "username":            "{{user `vsphere_uid` }}",
      "password":            "{{user `vsphere_passwd` }}",
      "insecure_connection": "true",
      "datacenter": "{{user `datacenter` }}",
      "cluster": "{{user `cluster` }}",
      "datastore": "{{user `datastore` }}",
      "network": "{{user `network` }}",
      "vm_name": "{{user `vsphere_vm_name` }}",

      "guest_os_type": "centos7_64Guest",

      "ssh_username": "nubi-admin",
      "ssh_password": "{{user `vm_superuser_passwd` }}",
      "ssh_bastion_host": "{{user `bastion_host` }}",
      "ssh_bastion_username": "{{user `bastion_user` }}",
      "ssh_bastion_agent_auth": true,

      "CPUs":             2,
      "RAM":              5120,
      "RAM_reserve_all": false,

      "convert_to_template": true,

      "disk_controller_type":  "pvscsi",
      "disk_size":        102400,
      "disk_thin_provisioned": true,
      "network_card": "vmxnet3",
      "http_directory" :  "httpks",
      "iso_paths": [
        "[nfs] centos/CentOS-8.2.2004-x86_64-minimal.iso"
      ],
      "iso_checksum": "e15fb0e51726de0a4128448b9bd63e7b",
      "iso_checksum_type": "md5",
      "boot_command": "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort 
}}/ks.cfg <enter><wait>"
          }
  ]

}
```

And  ks.cfg is 

```
#version=RHEL8
ignoredisk --only-use=sda
#autopart --type=lvm

zerombr
clearpart --all --initlabel
clearpart --all --drives=sda
ignoredisk --only-use=sda
part /boot --fstype="xfs" --ondisk=sda --size=512
part / --fstype="xfs" --ondisk=sda --grow --size=1

# Partition clearing information
clearpart --none --initlabel
# Use graphical install
text
repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream
# Use CDROM installation media
cdrom
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

firewall --disabled
selinux --enforcing

# Network information
#network  --bootproto=dhcp --device=enp0s3 --ipv6=auto --activate
#network  --hostname=centos9

network --device enp0s3 --bootproto=static --ip=10.1.23.18 
--netmask=255.255.255.0 --gateway=10.1.23.1  --noipv6
network  --hostname=centos9
# Root password
rootpw --iscrypted 
$6$F7bzgUtNYJpooIdfgsferfgdfggdf56hhbAYgcPdgKCj3OAhOF27zWr6EBt1JU87Uqz.sRP9mcOesxf4xKZoyzI./
# Run the Setup Agent on first boot
firstboot --disabled

reboot
# Do not configure the X Window System
skipx
# System services
services --disabled="chronyd"
# System timezone
timezone Pacific/Auckland --isUtc --nontp

%packages
@^server-product-environment
#@container-management
@performance
#@remote-system-management
#@rpm-development-tools
@security-tools
@system-tools

%end

%addon com_redhat_kdump --disable --reserve-mb='auto'

%end

%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end

%post
# Install open-vm-tools, required to detect IP when building on ESXi
yum -y install open-vm-tools
systemctl enable vmtoolsd
```
Error is :

```
dracut-pre-udev{585}: modprobe: FATAL: Module floppy not found in directory 
/lib/modules/4.18.0-193.2l8.x86_64

— 2020/09/17 05:17:40 ui: ask: ==> 
vsphere-iso: Pausing after run of step 'StepConfigParams'. Press enter to 
continue. 2020/09/17 05:17:40 packer-builder-vsphere-iso.linux: 2020/09/17 
05:17:40 No floppy files specified. Floppy disk will not be made. 
2020/09/17 05:17:40 ui: ask: ==> vsphere-iso: Pausing after run of step 
'StepCreateFloppy'. Press enter to continue. 2020/09/17 05:17:40 ui: ask: 
==> vsphere-iso: Pausing after run of step 'StepAddFloppy'. Press enter to 
continue.
 — Dracut-initqueue: warning : could not boot Entering Emergency 
mode. 


```

-- 
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/hashicorp/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/a89b07be-74a7-40e4-8f18-cfeb18750167n%40googlegroups.com.

Reply via email to