I got the network to partially work. (DNS resolves and I can get to the host, which is all I wanted anyway.) The problem was that I needed to be able to run as a normal user. Which was a matter of uncommenting this line in file /etc/libvirt/libvirt.conf:
uri_default = "qemu:///system" And perhaps copying that file to ~/.config/libvirt/libvirt.conf As seen in this stack overflow question: From: Leek, Jim <leek2@xxxxxxxx>
It turns out that I had to run virsh dumpxml with sudo, now it works. The requested <interface> block: <interface type='network'>
<mac address='6c:2b:59:e9:44:50'/> <source network='default' portid='8942017c-ace9-4c79-bfc8-3919197c6269' bridge='virbr0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </interface> From: Leek, Jim <leek2@xxxxxxxx> Host ifconfig. The only strange thing here is virbr0, which has the same IP address as the virbr0 on the guest, and I'm not really sure what it does. I did have to add
a bridge and TAP interface for a different QEMU run, but that was on a different IP address, so I don't think it's related? ( eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.251.13.178 netmask 255.255.252.0 broadcast 10.251.15.255 inet6 fe80::bbed:c35d:746a:309f prefixlen 64 scopeid 0x20<link> ether 6c:2b:59:e9:44:49 txqueuelen 1000 (Ethernet) RX packets 37451448 bytes 18352095515 (17.0 GiB) RX errors 15 dropped 130 overruns 0 frame 9 TX packets 110265614 bytes 147787762125 (137.6 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 16 memory 0x90380000-903a0000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 539825 bytes 98281872 (93.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 539825 bytes 98281872 (93.7 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:40:58:59 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 66 bytes 10560 (10.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > Also, can you please post the <interface/> part of the 'virsh dumpxml'? Sorry, I couldn't figure this one out: $ virsh dumpxml # So which domain? $ virsh list --all Id Name State -------------------- $ # there don't seem to be any domains? Even though the VM is currently running? Jim From: Michal Prívozník <mprivozn@xxxxxxxxxx>
Hey, |