The following error is being thrown when a kickstart
file is used to install a CentOS 7 guest virtual machine with static IP networking:
[3.835698] dracut-cmdline[81]: parse-kickstart ERROR:
'network --bootproto=static --ip=12.34.567.8aa --netmask=255.255.255.248 --gateway=12.34.567.8bb --nameserver=xx.xx.xx.xx,xx.xx.yy.yy':
missing --device
I suspect that the problem is that bridge networking with static IP has not been set up at the host to replace the default NAT configuration. But what specific commands need to be typed in order to set resolve this error?
Kickstart file:
The kickstart file is:
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --device=eno1 --onboot=on --activate
network --bootproto=static --ip=12.34.567.8aa --netmask=255.255.255.248 --gateway=12.34.567.8bb --nameserver=xx.xx.xx.xx,xx.xx.yy.yy
network --hostname=localhost.localdomain
# Root password
rootpw --iscrypted someLongHashedPassword
# System timezone
timezone someTimeZone --isUtc --nontp
user --name=someUserName --password=someLongHashedPassword --iscrypted --gecos="someUserName"
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information. Erases all partitions from the sda drive.
clearpart --all --initlabel --drives=sda
# Disk partitioning information
part pv.204 --fstype="lvmpv" --ondisk=sda --size=1902212
part /boot/efi --fstype="efi" --ondisk=sda --size=200 --fsoptions="umask=0077,shortname=winnt"
part /boot --fstype="xfs" --ondisk=sda --size=500
volgroup centos --pesize=4096 pv.204
logvol / --fstype="xfs" --grow --maxsize=51200 --size=1024 --name=root --vgname=centos
logvol /home --fstype="xfs" --size=230400 --name=home --vgname=centos
logvol swap --fstype="swap" --size=7808 --name=swap --vgname=centos
%packages
@base
@compat-libraries
@core
@debugging
@development
@network-file-system-client
@remote-system-management
@security-tools
@smart-card
@virtualization-hypervisor
@virtualization-platform
@virtualization-tools
@virtualization-client
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
virt-install
Command:For reference, the virt-install
command that triggers the install is:
virt-install \
--name=public-centos7 \
--disk path=/dev/mapper/centos-fifth,size=241 \
--graphics none --vcpus=1 --memory=2048 \
--location /tmp/CentOS-7-x86_64-Minimal-1611.iso \
--network bridge=virbr0 --os-type=linux --os-variant=rhel7.0 \
--initrd-inject=/tmp/vm.ks \
--extra-args "ks=file:/tmp/vm.ks console=ttyS0"
Current Config:
Also,
brctl show
on the host machine gives:
[root@remote-host ~]# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.525400c4a345 yes virbr0-nic
vnet0
Adding
--device=eno1
Per @thrig's suggestion, I changed the offending line of the kickstart file to become:
# Network information
network --onboot=on --activate
network --bootproto=static --ip=12.34.567.8aa --netmask=255.255.255.248 --gateway=12.34.567.8bb --nameserver=xx.xx.xx.xx,xx.xx.yy.yy --device=eno1
network --hostname=localhost.localdomain
This seems to have resolved the error. But I am not yet certain because I am still resolving downstream problems.