Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem setting up bridge for qemu virtual machine
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
theseas
n00b
n00b


Joined: 08 Aug 2015
Posts: 2
Location: Athens, Greece

PostPosted: Mon Jan 29, 2018 6:16 pm    Post subject: Problem setting up bridge for qemu virtual machine Reply with quote

Hi everyone,

I have setup a qemu vm with a minimal debian inside (no gui). I would like to be able to see the vm from my home network in its own dedicated IP. The start script that i use is the following:

Code:

#!/bin/bash
exec qemu-system-x86_64 -enable-kvm \
   -cpu host \
   -drive file=images/debian-server.img,if=virtio \
   -net nic,vlan=0 -net tap,ifname=tap0,script=no,downscript=no \
   -m 1024M \
   -monitor stdio \
   -name "Debian Server VM" \
   $@


I followed this guide to configure the bridge. The problems are

  • I cannot connect to the internet from the virtual machine.
  • Using this method the machine doesn't have ip from my local network (192.168.1.0/24) but it belongs to 10.0.1.0/24 network.


I started tests http servers in the guest and the host and both can communicate with each other. It seems that the packets don't get forwarded correctly from the bridge to the ethernet interface. At the guest startup a warning message appears that -net nic,vlan=0 is deprecated but i cannot find any good resources on how to convert this line to the new netdev syntax. If you need more information please let me know. Thanks in advance for your help!
Back to top
View user's profile Send private message
littletux
n00b
n00b


Joined: 08 Dec 2003
Posts: 73

PostPosted: Mon Mar 19, 2018 11:33 pm    Post subject: Reply with quote

Try this Guide. It describes it for gentoo and it describe it for systemd and openrc

wiki.gentoo.org/wiki/Network_bridge
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum