1

I'm having a problem with NetPlan, where if I set renderer: networkd, then the guest VM connects to the local network, but the host cannot reach the public internet ping: google.com: Temporary failure in name resolution. Interestingly, I can still xRDP into the host, it just doesn't have a network device available to run apt update | upgrade | install. If I set renderer: NetworkManager, the host can access the internet, but the guest VM cannot connect to the local network.

Host /etc/netplan/config.yaml

network:
  version: 2
    renderer: networkd
    ethernets:
      eno1:
        dhcp4: false
        dhcp6: false
    bridges:
      virbr0:
        interfaces: [eno1]
        addresses: [192.168.0.2/24]
        routes:
          - to: default
            via: 192.168.0.1
        nameservers:
          search: [local]
          addresses: [8.8.8.8,8.8.4.4]
        macaddress: 00:1c:23:d5:c7:d4
        parameters:
          stp: true
          forward-delay: 4
        dhcp4: no
        dhcp6: no

Guest /etc/netplan/config.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    enp1s0:
      optional: true
      addresses: [192.168.0.3/24]
      nameservers:
        search: [local]
        addresses:[8.8.8.8,8.8.4.4]
      routes:
        - to: default
          via: 192.168.0.1

Context I recently upgraded the host from 20.04 to 22.04, and I made some mistakes but worked through them to get my system back up. The last hurdle is configuring networking to allow the host and guest to connect to the same LAN through my home router. Before the upgrade, both host and guest ran 20.04 and were on the local network. I've removed the ifupdown and migrated to netplan. It seems I can get either to work, but not together.

--UPDATE-- Contents /etc/libvirt/qemu/networks

  1. autostart (folder)/host-bridge.xml
  2. default.xml.dpkg-disappear (empty file)
  3. host-bridge.xml

host-bridge.xml (both files are identical)

    <network>
      <name>host-bridge</name>
      <uuid>437f7e39-9966-465a-912f-4d304736973b</uuid>
      <forward mode='bridge'/>
      <bridge name='virbr0'/>
    </network>

0 Answers0