Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #220544

Re: Guest can't see hosts network connection using QEMU-KVM

From deloptes <deloptes@gmail.com>
Newsgroups linux.debian.user
Subject Re: Guest can't see hosts network connection using QEMU-KVM
Date 2020-03-27 08:50 +0100
Message-ID <zORUB-3l9-1@gated-at.bofh.it> (permalink)
References <zOL2N-7xY-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Gary L. Roach wrote:

> AMD-64 4 cpu processor
> 
> Host Debian Buster
> 
> Guest kubuntu 18.04
> 
> Virtual Machine QEMU

Why don't you take virtualbox or vmplayer?

Choosing QEMU in such a case is masochism pure.

You've been using https://wiki.debian.org/QEMU - right?
There it says it was tested in Squeeze. Things change with time.

Last week I looked into Qemu again cause I wanted to try RPi emulation,
however recalled pretty fast why I compiled it from scratch few years ago.

OK, about the network: perhaps try without the bridge first and let qemu
configure. Read once again the notes on the QEMU I wrote back then
(2015) -very likely it was stretch. You can replace the variables with
yours and of course eth0 may be something else
----- strat -----
#
# First take eth0 down, then bring it up with IP address 0.0.0.0
#
/sbin/ifdown eth0
/sbin/ifconfig eth0 0.0.0.0 promisc up
#
# Bring up the tap device (name specified as first argument, by QEMU)
#
/usr/sbin/openvpn --mktun --dev $IF --user emanoil
/sbin/ifconfig $IF 0.0.0.0 promisc up
#
# create the bridge between eth0 and the tap device
#
/sbin/brctl addbr br0
/sbin/brctl addif br0 eth0
/sbin/brctl addif br0 $IF
#
# only a single bridge so loops are not possible, turn off spanning tree
protocol
#
/sbin/brctl stp br0 off
#
# Bring up the bridge with ETH0IPADDR and add the default route
#
/sbin/ifconfig br0 $ETH0IPADDR netmask 255.255.255.0 broadcast $BROADCAST
/sbin/route add default gw $GATEWAY
/sbin/ifconfig eth0 $ETH0IPADDR netmask 255.255.255.0 broadcast $BROADCAST
----- end -----

when you finsih

----- strat -----
/sbin/ifdown eth0
/sbin/ifdown br0
/sbin/ifconfig br0 down
#
# Delete the bridge
#
/sbin/brctl delbr br0
#
# bring up eth0 in "normal" mode
#
/sbin/ifconfig eth0 -promisc
/sbin/ifup eth0
#
# delete the tap device
#
/usr/sbin/openvpn --rmtun --dev $IF
----- end -----
I hope it helps

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Guest can't see hosts network connection using QEMU-KVM "Gary L. Roach" <garyroach719.lists@gmail.com> - 2020-03-27 01:30 +0100
  Re: Guest can't see hosts network connection using QEMU-KVM deloptes <deloptes@gmail.com> - 2020-03-27 08:50 +0100
    Re: Guest can't see hosts network connection using QEMU-KVM "Alexander V. Makartsev" <avbetev@gmail.com> - 2020-03-27 09:30 +0100
      Re: Guest can't see hosts network connection using QEMU-KVM deloptes <deloptes@gmail.com> - 2020-03-27 14:20 +0100
      Re: Guest can't see hosts network connection using QEMU-KVM Bob Weber <bobrweber@gmail.com> - 2020-03-27 14:30 +0100
        Re: Guest can't see hosts network connection using QEMU-KVM "Gary L. Roach" <garyroach719.lists@gmail.com> - 2020-03-27 19:30 +0100

csiph-web