Hello,
I am trying to boot a VM in libvirt that has 2 interfaces. The first interface is connected to the default network and the second connects to a bridge interface on the host. When the VM boots the first interface doesn't receive an IP address from DHCP. It works when the VM only has one interface though.
If I login to the VM using virsh console I noticed that in NetworkManager the connection name and device are mixed
[root@localhost ~]# nmcli con showNAME UUID TYPE DEVICEeth0 cc31f368-0a43-4c85-bd15-6aaa3ca23b3d ethernet eth1
If I run 'dhclient eth0' the interface gets an IP address from the default network as expected.
[root@localhost ~]# dhclient eth0[root@localhost ~]# ip a1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope hostvalid_lft forever preferred_lft forever2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 52:54:00:00:01:00 brd ff:ff:ff:ff:ff:ffinet 192.168.122.10/24 brd 192.168.122.255 scope global dynamic eth0valid_lft 3599sec preferred_lft 3599sec3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 52:54:00:48:e3:b8 brd ff:ff:ff:ff:ff:ffinet6 fe80::5054:ff:fe48:e3b8/64 scope link noprefixroutevalid_lft forever preferred_lft forever
The VM is created using the following command
virt-install --import --name ${VM_HOST_NAME} \--memory 2048 --vcpus 2 --cpu host \--disk path=/var/lib/libvirt/images/${VM_HOST_NAME}.qcow2,format=qcow2,bus=virtio \--network network=default \--network bridge=bridge0,model=virtio \--os-type=linux \--os-variant=rhel7.6 \--graphics none
Any ideas what could cause this problem? The guest OS is CentOS 7.7 and the host is CentOS 8, but I have the same problem with a CentOS 7 hypervisor.