3 deleted 406 characters in body
source | link
# 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 --device=eno1
network  --hostname=localhost.localdomain  

This resulted inseems to have resolved the following error appearing instead when. But I run the virt-install command:am not yet certain because I am still resolving downstream problems.

[    3.839212] dracut-cmdline[80]: /usr/lib/python2.7/site-packages/pykickstart/commands/network.py:376: UserWarning: A network device with the name eno1 has already been defined.
[    3.840753] dracut-cmdline[80]: warnings.warn(_("A network device with the name %s has already been defined.") % nd.device)
[  OK  ] Started dracut cmdline hook.
         Starting dracut pre-udev hook...
# 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 --device=eno1
network  --hostname=localhost.localdomain  

This resulted in the following error appearing instead when I run the virt-install command:

[    3.839212] dracut-cmdline[80]: /usr/lib/python2.7/site-packages/pykickstart/commands/network.py:376: UserWarning: A network device with the name eno1 has already been defined.
[    3.840753] dracut-cmdline[80]: warnings.warn(_("A network device with the name %s has already been defined.") % nd.device)
[  OK  ] Started dracut cmdline hook.
         Starting dracut pre-udev hook...
# 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.

2 added 932 characters in body
source | link


Adding --device=eno1

Per @thrig's suggestion, I changed the offending line of the kickstart file to become:

# 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 --device=eno1
network  --hostname=localhost.localdomain  

This resulted in the following error appearing instead when I run the virt-install command:

[    3.839212] dracut-cmdline[80]: /usr/lib/python2.7/site-packages/pykickstart/commands/network.py:376: UserWarning: A network device with the name eno1 has already been defined.
[    3.840753] dracut-cmdline[80]: warnings.warn(_("A network device with the name %s has already been defined.") % nd.device)
[  OK  ] Started dracut cmdline hook.
         Starting dracut pre-udev hook...


Adding --device=eno1

Per @thrig's suggestion, I changed the offending line of the kickstart file to become:

# 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 --device=eno1
network  --hostname=localhost.localdomain  

This resulted in the following error appearing instead when I run the virt-install command:

[    3.839212] dracut-cmdline[80]: /usr/lib/python2.7/site-packages/pykickstart/commands/network.py:376: UserWarning: A network device with the name eno1 has already been defined.
[    3.840753] dracut-cmdline[80]: warnings.warn(_("A network device with the name %s has already been defined.") % nd.device)
[  OK  ] Started dracut cmdline hook.
         Starting dracut pre-udev hook...
1
source | link

Static IP addresses with kickstart installation of CentOS 7

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