qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re (2): Connection of a qemu guest to the 'net.


From: peter
Subject: Re (2): Connection of a qemu guest to the 'net.
Date: Thu, 18 Mar 2021 21:07:23 -0700

From:   "Berto Furth" <bertofurth@sent.com>
Date:   Fri, 19 Mar 2021 07:59:31 +1100
> Can you try again making sure that the /etc/qemu-ifup script exists, 
> ... and that it's executable (chmod a+x /etc/sh")

peter@joule:/home/peter$ ls -ld /etc/qemu*
-rwxr-xr-x 1 root root  161 Mar 15 07:20 /etc/qemu-ifdown
-rwxr-xr-x 1 root root 1148 Mar 15 07:47 /etc/qemu-ifup
-rwxr-xr-x 1 root root  315 Mar 17 20:40 /etc/qemu-ifup.Berto

> ... that it's first line is "!#/bin/sh" ...

Problem 1.  I damaged the head of the script you provided.
After correcting the error, qemu succeeds to create tap0 and the guest is able 
to communicate with the host.

Problem 2.  The qemu-ifup script provided in Debian 10 has this statement.

switch=$(ip route ls | \
    awk '/^default / {
          for(i=0;i<NF;i++) { if ($i == "dev") { print $(i+1); next; } }
         }'
        )

To see what it does, I added,
echo switch = $switch
.

Also,
peter@joule:/home/peter$ ip route ls
default via 172.20.10.1 dev wlxe894f6248352
172.20.10.0/28 dev wlxe894f6248352 proto kernel scope link src 172.20.10.3
172.23.4.0/24 dev eth0 proto kernel scope link src 172.23.4.1 linkdown
172.23.5.0/24 dev enx0050b60be9be proto kernel scope link src 172.23.5.1 
linkdown
172.23.6.0/24 dev br0 proto kernel scope link src 172.23.6.1 linkdown
.

(To follow the established pattern here, I'm using subnet 
172.23.6.0/24 rather than 10.0.9.0/24.)

Execution shows,
switch = wlxe894f6248352
.

Consequently /etc/qemu-ifup finds wlxe894f6248352 rather than br0 and 
the network connection to the qemu guest fails.

If I make br0 the default route, the Debian script will work but the 
current Shorewall configuration will be spoiled.

I can try to adapt the shorewall configuration to give the qemu guest 
full connectivity.

Observation: tap0 has IPv6 address fe80::1486:4bff:fe3e:3732/64.
tap0 has no IPv4 address.

I still wonder whether a bridge is fundamentally necessary or simply a choice 
of 
the author of the qemu networking software.

Thanks for the help,                   ... P.

-- 
cell: +1 236 464 1479            Bcc: peter at easthope. ca
VoIP: +1 604 670 0140




reply via email to

[Prev in Thread] Current Thread [Next in Thread]