RHEL 8 virt-manager with qemu-4.2.0, can't connect network
Leek, Jim
leek2 at llnl.gov
Wed Jul 14 14:50:24 UTC 2021
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:
https://serverfault.com/questions/803283/how-do-i-list-virsh-networks-without-sudo
From: Leek, Jim <leek2 at llnl.gov>
Sent: Wednesday, July 14, 2021 6:49 AM
To: Michal Prívozník <mprivozn at redhat.com>; virt-tools-list at redhat.com
Subject: Re: RHEL 8 virt-manager with qemu-4.2.0, can't connect network
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 at llnl.gov<mailto:leek2 at llnl.gov>>
Sent: Monday, July 12, 2021 11:40 AM
To: Michal Prívozník <mprivozn at redhat.com<mailto:mprivozn at redhat.com>>; virt-tools-list at redhat.com<mailto:virt-tools-list at redhat.com> <virt-tools-list at redhat.com<mailto:virt-tools-list at redhat.com>>
Subject: Re: RHEL 8 virt-manager with qemu-4.2.0, can't connect network
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? (ifconfig br0 192.168.2.1 netmask 255.255.255.0 promisc up; ip tuntap add tap0 mode tap; ifconfig tap0 192.168.2.2/30 ) I think that go removed on a reboot. Anyway, here's the Host ifconfig. :
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
error: command 'dumpxml' requires <domain> option
# 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 at redhat.com<mailto:mprivozn at redhat.com>>
Sent: Monday, July 12, 2021 2:52 AM
To: Leek, Jim <leek2 at llnl.gov<mailto:leek2 at llnl.gov>>; virt-tools-list at redhat.com<mailto:virt-tools-list at redhat.com> <virt-tools-list at redhat.com<mailto:virt-tools-list at redhat.com>>
Subject: Re: RHEL 8 virt-manager with qemu-4.2.0, can't connect network
Hey,
On 7/10/21 2:49 AM, Leek, Jim wrote:
> This seems like it should be very easy, so I must be missing something,
> but I cannot get my guest to communicate with my host or with the
> internet. I really jsut need some way to get files across, the guest
> doesn't even need internet access.
> The host is RHEL 8.4, the guest is CentOS 8.
> Everything is installed from the yum repos, so it's all default, but my
> corporate IT environment is pretty locked down. So that might be related.
> I tried to use a shared drive, but apparently that is disabled in RHEL 8.
> By default the network is 'NAT' with virtio.
> Here's my guest ifconfig:
> enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> ether 6c:2b:59:e9:44:50 txqueuelen 1000 (Ethernet)
> RX packets 38 bytes 4953 (4.8 KiB)
> RX errors 0 dropped 7 overruns 0 frame 0
> TX packets 0 bytes 0 (0.0 B)
> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
>
> 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 1840 bytes 159880 (156.1 KiB)
> RX errors 0 dropped 0 overruns 0 frame 0
> TX packets 1840 bytes 159880 (156.1 KiB)
> 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:a8:4e:b8 txqueuelen 1000 (Ethernet)
> RX packets 0 bytes 0 (0.0 B)
> RX errors 0 dropped 0 overruns 0 frame 0
> TX packets 0 bytes 0 (0.0 B)
> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
>
I wonder what does your host ifconfig look like. I mean, 192.168.122.1
is the default IP address of the libvirt's network and this might
suggest that you have clashing addresses if the network on your host
uses the same range. Also, can you please post the <interface/> part of
the 'virsh dumpxml'?
Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20210714/6561a476/attachment.htm>
More information about the virt-tools-list
mailing list