0

I'm trying to (automatedly) virt-install an Ubuntu 16.04 guest on a CentOS 7 libvirtd with a kickstart file. The Ubuntu guest is to have two interfaces which are mapped to two bridged interfaces on the server, br1 and br182. The kickstart configuration is

network --onboot=yes --device=eth0 --noipv6 --bootproto=static --ip=10.0.192.20 --netmask=255.255.255.0 --gateway=10.0.192.253 --nameserver=10.0.192.2,10.0.198.3
network --onboot=yes --device eth1 --noipv6 --bootproto=static --ip=10.0.182.20 --netmask=255.255.255.0
network --hostname buntuguest.centosdom.local

the virt-install command I'm running is:

virt-install  --os-type linux \
              --os-variant ubuntu16.04 \
              --name buntuguest \
              --ram 3072 \
              --disk path=/dev/centos_host/lv_buntuguest,device=disk,bus=virtio \
              --vcpus 4 \
              --os-type linux  \
              --network bridge=br1,model=virtio \
              --network bridge=br182,model=virtio \
              --graphics none \
              --initrd-inject=/var/lib/libvirt/images/buntuguest.ks  \
              --extra-args 'console=ttyS0,115200n8 serial ks=file:/buntuguest.ks' \
              --location="http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/installer-amd64/"

But when the install reaches network, the install complains:

┤ [!] Configure the network ├    │                                                                      
│
│                         Unreachable gateway                          
│
│ The gateway address you entered is unreachable.                          
│ You may have made an error entering your IP address, netmask and/or  │
│ gateway.                                                             

and it refuses to move from this point. This is strange because I've installed multiple vms this exact same way, though they were all RHEL/CentOS (6/7). Please what am I doing wrong?

HBruijn
  • 72,524
  • 21
  • 127
  • 192
SinaOwolabi
  • 219
  • 1
  • 7
  • 18
  • 1
    random idea: what if eth0 and eth1 are inverted or not called like this (but eno1 etc...) for some(to be determined) reason? – A.B Aug 14 '18 at 12:48
  • Not sure I follow – SinaOwolabi Aug 14 '18 at 12:52
  • Network interfaces are rarely named `eth*` on modern Ubuntu. `ens160` is a common name for VMs. Make sure you are applying the config to existing interfaces. – Gerald Schneider Aug 14 '18 at 13:08
  • Oh I see. So using ens160s0 and ens160s1 as network interface names should be ok? – SinaOwolabi Aug 14 '18 at 13:11
  • That's not how the schema works. Create a VM, take a look at how the interfaces are named and create your install accordingly. – Gerald Schneider Aug 14 '18 at 13:17
  • Hmm. I deleted the network configuration lines from the kickstart, tried to run the install again, and I found it chose ens3 and ens4 as interface names. Killed the install, added those interface names to the kickstart names, and it still complained of no gateway. Im trying to complete the vm's re-installation with the network configuration once again deleted from the kickstart. – SinaOwolabi Aug 14 '18 at 13:34
  • Didnt work, so I had to disable the network lines and manually walk through the network and software installation parts of the automated install. Annoying. – SinaOwolabi Aug 14 '18 at 20:06

0 Answers0