<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Malgun Gothic";
        panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
        {font-family:"\@Malgun Gothic";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p>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:
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">uri_default = "qemu:///system"<o:p></o:p></span></p>
<p><o:p> </o:p></p>
<p>And perhaps copying that file to <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">~/.config/libvirt/libvirt.conf<o:p></o:p></span></p>
<p><o:p> </o:p></p>
<p>As seen in this stack overflow question:<br>
<a href="https://serverfault.com/questions/803283/how-do-i-list-virsh-networks-without-sudo">https://serverfault.com/questions/803283/how-do-i-list-virsh-networks-without-sudo</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b>From:</b> Leek, Jim <leek2@llnl.gov>
<br>
<b>Sent:</b> Wednesday, July 14, 2021 6:49 AM<br>
<b>To:</b> Michal Prívozník <mprivozn@redhat.com>; virt-tools-list@redhat.com<br>
<b>Subject:</b> Re: RHEL 8 virt-manager with qemu-4.2.0, can't connect network<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">It turns out that I had to run virsh dumpxml with sudo, now it works.  The requested <interface> block:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">    <interface type='network'>
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">      <mac address='6c:2b:59:e9:44:50'/><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">      <source network='default' portid='8942017c-ace9-4c79-bfc8-3919197c6269' bridge='virbr0'/><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">      <target dev='vnet0'/><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">      <model type='virtio'/><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">      <alias name='net0'/><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/><o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">    </interface><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="margin-left:.5in;text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="color:black">From:</span></b><span style="color:black"> Leek, Jim <<a href="mailto:leek2@llnl.gov">leek2@llnl.gov</a>><br>
<b>Sent:</b> Monday, July 12, 2021 11:40 AM<br>
<b>To:</b> Michal Prívozník <<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>>;
<a href="mailto:virt-tools-list@redhat.com">virt-tools-list@redhat.com</a> <<a href="mailto:virt-tools-list@redhat.com">virt-tools-list@redhat.com</a>><br>
<b>Subject:</b> Re: RHEL 8 virt-manager with qemu-4.2.0, can't connect network</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">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?  (</span><code><span style="font-size:10.0pt;color:black">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</span></code><span style="font-size:12.0pt;color:black"> )  I think that go removed on a reboot.  Anyway, here's the Host ifconfig. :<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        inet 10.251.13.178  netmask 255.255.252.0  broadcast 10.251.15.255<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        inet6 fe80::bbed:c35d:746a:309f  prefixlen 64  scopeid 0x20<link><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        ether 6c:2b:59:e9:44:49  txqueuelen 1000  (Ethernet)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        RX packets 37451448  bytes 18352095515 (17.0 GiB)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        RX errors 15  dropped 130  overruns 0  frame 9<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        TX packets 110265614  bytes 147787762125 (137.6 GiB)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        device interrupt 16  memory 0x90380000-903a0000  <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        inet 127.0.0.1  netmask 255.0.0.0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        inet6 ::1  prefixlen 128  scopeid 0x10<host><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        loop  txqueuelen 1000  (Local Loopback)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        RX packets 539825  bytes 98281872 (93.7 MiB)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        RX errors 0  dropped 0  overruns 0  frame 0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        TX packets 539825  bytes 98281872 (93.7 MiB)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        ether 52:54:00:40:58:59  txqueuelen 1000  (Ethernet)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        RX packets 0  bytes 0 (0.0 B)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        RX errors 0  dropped 0  overruns 0  frame 0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        TX packets 66  bytes 10560 (10.3 KiB)<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="color:black">> Also, can you please post the <interface/> part of the 'virsh dumpxml'?</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="color:black">Sorry, I couldn't figure this one out:</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">$ virsh dumpxml<br>
error: command 'dumpxml' requires <domain> option<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"># So which domain?<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">$ virsh list --all <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"> Id   Name   State<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">--------------------<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">$<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"># there don't seem to be any domains?  Even though the VM is currently running?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt;color:black">Jim<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="margin-left:.5in;text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="x_divRplyFwdMsg">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="color:black">From:</span></b><span style="color:black"> Michal Prívozník <<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>><br>
<b>Sent:</b> Monday, July 12, 2021 2:52 AM<br>
<b>To:</b> Leek, Jim <<a href="mailto:leek2@llnl.gov">leek2@llnl.gov</a>>; <a href="mailto:virt-tools-list@redhat.com">
virt-tools-list@redhat.com</a> <<a href="mailto:virt-tools-list@redhat.com">virt-tools-list@redhat.com</a>><br>
<b>Subject:</b> Re: RHEL 8 virt-manager with qemu-4.2.0, can't connect network</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
Hey,<br>
<br>
On 7/10/21 2:49 AM, Leek, Jim wrote:<br>
> This seems like it should be very easy, so I must be missing something,<br>
> but I cannot get my guest to communicate with my host or with the<br>
> internet.   I really jsut need some way to get files across, the guest<br>
> doesn't even need internet access.<br>
> The host is RHEL 8.4, the guest is CentOS 8.  <br>
> Everything is installed from the yum repos, so it's all default, but my<br>
> corporate IT environment is pretty locked down.  So that might be related.<br>
> I tried to use a shared drive, but apparently that is disabled in RHEL 8.<br>
> By default the network is 'NAT' with virtio.  <br>
> Here's my guest ifconfig:<br>
> enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500<br>
>         ether 6c:2b:59:e9:44:50  txqueuelen 1000  (Ethernet)<br>
>         RX packets 38  bytes 4953 (4.8 KiB)<br>
>         RX errors 0  dropped 7  overruns 0  frame 0<br>
>         TX packets 0  bytes 0 (0.0 B)<br>
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<br>
> <br>
> lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536<br>
>         inet 127.0.0.1  netmask 255.0.0.0<br>
>         inet6 ::1  prefixlen 128  scopeid 0x10<host><br>
>         loop  txqueuelen 1000  (Local Loopback)<br>
>         RX packets 1840  bytes 159880 (156.1 KiB)<br>
>         RX errors 0  dropped 0  overruns 0  frame 0<br>
>         TX packets 1840  bytes 159880 (156.1 KiB)<br>
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<br>
> <br>
> virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500<br>
>         inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255<br>
>         ether 52:54:00:a8:4e:b8  txqueuelen 1000  (Ethernet)<br>
>         RX packets 0  bytes 0 (0.0 B)<br>
>         RX errors 0  dropped 0  overruns 0  frame 0<br>
>         TX packets 0  bytes 0 (0.0 B)<br>
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<br>
> <br>
<br>
I wonder what does your host ifconfig look like. I mean, 192.168.122.1<br>
is the default IP address of the libvirt's network and this might<br>
suggest that you have clashing addresses if the network on your host<br>
uses the same range. Also, can you please post the <interface/> part of<br>
the 'virsh dumpxml'?<br>
<br>
Michal<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>