https://bbs.archlinux.org/viewtopic.php?id=147134
@Graysky, I apologize for hijacking your thread, this was not my intention.
--nixIT
]]>I appreciate your help in this.
I was digging round in /etc/rc.d/network and also noticed that there were many of calls to ifconfig.
I would love to set up my network/bridge with iproute2, but, I'm not sure how to do that.
I am currently at a loss with this, since it's over my head. I guess I will give up on the bridge network for right now, and just live with my VM not being on my internal lan.
--nixIT
]]>Here is what happened when I changed my rc.conf to match yours:
# rc.d restart network
Warning: Your network settings are deprecated.
Please refer to 'man 5 rc.conf' on how to define a single wired
connection, or use a utility such as netcfg.
:: Stopping network [BUSY] /etc/rc.d/network: line 149: route: command not found
can't delete bridge br0: Package not installed
[FAIL]
Warning: Your network settings are deprecated.
Please refer to 'man 5 rc.conf' on how to define a single wired
connection, or use a utility such as netcfg.
:: Starting network [BUSY] add bridge failed: Package not installed
bridge br0 does not exist!
/etc/rc.d/network: line 66: ifconfig: command not found
/etc/rc.d/network: line 76: ifconfig: command not found
/etc/rc.d/network: line 66: ifconfig: command not found
/etc/rc.d/network: line 76: ifconfig: command not found
/etc/rc.d/network: line 134: route: command not found
[FAIL]
I am at a loss at what's going on.
--nixIT
]]>Thanx. Will give this a try when i get home.
]]>eth0="eth0 0.0.0.0"
br0="br0 192.168.1.20 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(eth0 br0)
gateway="default gw 192.168.1.1"
ROUTES=(gateway)
NETWORK_PERSIST="no"
I'm not sure if it matters, but the kvm_amd module in your modules list has an underscore instead of a hyphen.
Just make a backup of rc.conf, and in order to test your network setup just run:
rc.d restart network
If you want to set a fixed IP for your VM as well, you will need to configure that once the VM is running and/or set a DHCP lease on your router based on a fixed MAC address that you give the VM when running QEMU.
]]>You will need to install sudo only if you want to run QEMU as a non root user. This user must also be in the KVM group. This is the recommended way to do it and is more secure, but is not necessary if you want to run as root.
gotcha, understand that, so I will go back to the install guide and get that done.
hmmm, the message I posted last night isn't here.
Anyway, I followed the steps for the qemu-ifup and -ifdown.
When I rebooted my system for the networking changes in rc.conf to take effect I did not have a network connection.
Here is what I had in rc.conf
MODULES=(kvm kvm-amd bridge tun)
eth0="eth0 192.168.0.2"
br0="br0 192.168.0.3 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(eth0 br0)
gateway="default gw 192.168.0.1"
netmask=255.255.255.0
broadcast=192.168.0.255
ROUTES=(gateway)
not sure why I had no network.
I would love to get this troubleshot/shooted?? what info can I provide you that will help solve this issue?
--nixIT
]]>Thanx, worked on this last night but didn't get a chance to test. I do have a question, and this may be an install issue, so here goes:
How bit of an issue is the visudo step in the wiki? During install I never installed visudo, since it was optional. Do I Need to go back and install it? or can I just skip this step in the QEMU wiki?
--nixIT
]]>#!/bin/sh
/sbin/ip link set $1 down
/usr/sbin/brctl delif br0 $1
/sbin/ip link delete dev $1
I could never get tunctl -d to work in the ifdown script for some reason, so I used ip link delete instead.
Note that if you do not run QEMU as root, you will have to run each line with sudo and edit your sudoers file accordingly
Thanks I will give that a shot when I get home. will QEMU also bring down the tap device when it exits?
--nixIT
]]>chown root:kvm /etc/qemu-ifup
chmod g+x /etc/qemu-ifup
qemu will then automatically run this script when you start it in order to bring up the tap device before it connects it to the emulated device.
]]>I am following the script, and I get to this point:
6. Install the script that QEMU uses to bring up the tap adapter in /etc/qemu-ifup with root:kvm 750 permissions:
I'm not sure what to do from this point on.
--nixIT
]]>ip link set $1 up promisc on
I'm not a networking expert, so I don't know if this is completely correct.
The bigger issue I think is that both the wiki and the QEMU manual is out of date reguarding tap networking. As far as I know, using -netdev tap instead of -net tap is now the preffered method.
Using vhosts with tap networking is also not mentioned, which further increases performance.
Using these techniques, I get practically full thoughtput on my VM using iperf on a gigabit LAN.
Despite all of this, the setup on the wiki should work but if you're still having problems, post some more info.
I'm with you, I'm not sure how to set up a network bridge for QEMU/KVM either. Any help with this is appreciated.
--nixIT
]]>