Joined: 08 Aug 2015
Location: Athens, Greece
|Posted: Mon Jan 29, 2018 6:16 pm Post subject: Problem setting up bridge for qemu virtual machine
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:
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!