0

I use libvirt-manager to manager my VMs. I create a new VM, and a default virtual network, which uses NAT.

virsh net-edit default gives me:

<network>
  <name>default</name>
  <uuid>ec2b5979-dd0c-43db-ab16-99f2e48ef0dd</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:00:0e:b1:4f'/>
  <domain name='default'/>
  <ip address='192.168.110.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.110.128' end='192.168.110.254'/>
    </dhcp>
  </ip>
</network>

I have configured my Linux guest to use this network, and the device is set to rtl8139. After I started the VM, it can see the device, but it cannot get network address.

brctl show gives me:

bridge name     bridge id               STP enabled     interfaces
virbr0          8000.5254000eb14f       yes             virbr0-nic

ip link show gives me:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
    link/ether c8:ff:28:78:44:01 brd ff:ff:ff:ff:ff:ff
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:0e:b1:4f brd ff:ff:ff:ff:ff:ff
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:0e:b1:4f brd ff:ff:ff:ff:ff:ff

One odd thing I found is that in "Connection Details"/"Network Interfaces" page, the virbr0 is shown as inactive, and I cannot activate it. Trying to activate it gives me:

libvirtError: this function is not supported by the connection driver: virInterfaceCreate

0

If you expect to see virbr0-nic with an IP address, you are mistaken - it will not have an address on the host.

You need to log into the guest and set an IP or DHCP there, the guest NIC will have an IP assigned from the default network range if you choose dhcp, and the address will be visible inside the guest, not from the host.

  • It turns out some kernel feature related to network and bridging was not set... – David S. Jan 1 '17 at 3:13
-2

For me I found that restarting the interface inside the guest OS worked:

ifdown ens3
ifup ens3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.