[solved] qemu - no network on W-XP anyore
EDIT: sorry, I forgot "-net user"
Last edited by capoeira (2013-03-09 16:56:27)
EDIT: sorry, I forgot "-net user"
Last edited by capoeira (2013-03-09 16:56:27)
Similar Messages
-
[SOLVED] Qemu and host-only networking
Hi,
I want to setup qemu with one Windows 7 guest. This guest should be able to connect to the hosts samba and postgres server, except external networks such the internet. I've read the archlinux qemu wiki page and it seems i need to use a bridge and a tap device to accomplish this. So far i've did as root:
brctl addbr br0
ip tuntap add dev tap0 mode tap user me
ip link set tap0 up
brctl addif br0 tap0
'brctl show' gives
bridge name bridge id STP enabled interfaces
br0 8000.16cad3ab6bda no tap0
When i start the vm as a user i get
qemu-system-x86_64 -enable-kvm -m 1024 -vga std -device e1000,netdev=tap0,mac=DE:AD:BE:EF:96:32 -netdev tap,id=tap0,script=no,downscript=no hdd1.qcow2
qemu-system-x86_64: -netdev tap,id=tap0: could not configure /dev/net/tun: Operation not permitted
qemu-system-x86_64: -netdev tap,id=tap0: Device 'tap' could not be initialized
Ok. Need to handle some permission issues. If i launch the above command as root, the VM (Windows 7) starts, but i don't have any connection to the host (Windows 7 complains about an unindentified network).
With the example scripts 'qemu-ifup', 'qemu-ifdown', the ip forwarding and the sudo configuration as described in the QEMU - ArchWiki - Creating bridge manually section, Windows 7 can indeed connect to the host, but also to the internet, what i simply don't want. The reason might sound silly, but everytime a Windows guest tries to connect to the internet, thus trying to obtain an ip from the dhcp server, the host completely looses its connection to the router. It seems my network hardware doesn't like this.
Anyway, i think i'm only missing one little thing. I would appreciate any help.
Last edited by ulixes (2014-06-09 20:51:52)Thank you for this, I've tried lots of docs&tutorial, finnaly got this and success.
ulixes wrote:
Ok, found a solution. It's surprisingly simple. I've discarded the libvirt way, because the official archlinux virt-manager package is pretty unusable and configuring a working vlan for libvirt seems pretty complicated. I still couldn't get a working network device on the guest side.
For completeness, here is what i've done. I use a tap and a bridge device and dnsmasq. I did not activate ipv4 forwarding like mentioned in the wiki! The following steps need to be done as root.
First i've created the bridge, set an ip address and started it
brctl addbr br0
ip addr add 192.168.179.1/24 broadcast 192.168.179.255 dev br0
ip link set br0 up
The subnet should differ from any other device. In my case the only other device eth0 has the ip 192.168.178.xxx.
Next i've created the tap device for use by qemu respectively the guest
ip tuntap add dev tap0 mode tap
ip link set tap0 up promisc on
I don't know if 'promics' is really necessary, but there's no need to assign an ip to the tap device.
Now i've connected the tap device to the bridge
brctl addif br0 tap0
Until now this was approximately my first try. I've tried to use static ip on the guest side, but had no succeess. The important point was to run dnsmasq on the bridge
dnsmasq --interface=br0 --bind-interfaces --dhcp-range=192.168.179.10,192.168.179.254
In effect, i finally got working ip on the guest network devices (this may take some seconds). Pinging the host succeded and neither of my guests (SliTaz Linux, Windows 7) were able to connect to external networks, thus the internet.
I've started the guests with
qemu-system-x86_64 -enable-kvm -m 1024 -netdev tap,id=t0,ifname=tap0,script=no,downscript=no -device e1000,netdev=t0,id=nic0 <imagefile>
In my case, i had to omit the automated exection of scripts. This way i was also able to execute the above qemu command as an ordinary user.
Just to finalize this description for samba:
By adding 'br0' to 'interfaces' in smb.conf, guests were able to connect to the host samba service as usual. -
[SOLVED] QEMU networking command line
Hello,
my virtual machine does not have any network devices, when I explicitly give a netdev user,id=... (which is the default, when I remember correctly). This is the commandline which I tried:
qemu-system-x86_64 -enable-kvm -smp 2 -m 384 -netdev user,id=guestnet,restrict=off,net=192.168.1.0/24,dhcpstart=192.168.1.5,hostfwd=tcp::12345-:22 server
But lspci and ip link don't show any devices. This commandline has exactly the same effect (and this should be the default, when no option is given):
qemu-system-x86_64 -enable-kvm -smp 2 -m 384 -netdev user,id=guestnet server
My guest only finds a network device when there are no netdev user,id=... arguments.
What is wrong with the command lines above?
Thanks for your help.
Last edited by Rachus (2013-06-02 10:45:07)65kid wrote:
add
-net nic
Well, then I have a device, but the dhcp server of qemu does not work anymore.
neilzium wrote:IIRC each -netdev argument needs a corresponding -device argument. Here's an example.. This seems to be the newer, preffered method compared to -net and is used by libvirt. There may be no difference for user mode networking though.
Thanks, works perfectly. Sometimes it is hard to find something in the documentation. -
[SOLVED] Qemu with host networking space.
Hello, I'm trying to lunch Qemu with host networking, so the VM's can talk to each other, what I did so far is creating the following bridges ( Actually virt-manager did that for me ):
br0, virbr0 -> virbr0-nic ( the interface )
and have the following network interfaces:
br0, lo, virbr0, wlp1s0
What I think I'm missing is something on the code... I'm lunching with:
qemu-system-x86 -kernel kernel -cpu host -m 2024 -hda image.image
I did review the following manuals
https://wiki.archlinux.org/index.php/QE … networking
https://wiki.archlinux.org/index.php/Network_bridge
I'm missing the right command, thanks.
Last edited by abdullah (2015-02-06 18:00:11)abdullah wrote:
Well, still trying, here is the code that I'm using right now:
./start.sh
#!/bin/bash
bridge=br0
tap=$(sudo tunctl -u $(whoami) -b)
sudo ip link set $tap up
sleep 1s
sudo brctl addif $bridge $tap
qemu-system ..... etc \
-net nic,vlan0,model=virtio,macaddr=00:16:35:AF:94:4B \
-net nic,vlan=0,ifname=$tap,script=no,downscript=no
sudo brctl delif $bridge $tap
sudo ip link set $tap down
sudo tunctl -d $tap
which the reff was in https://activedoc.opensuse.org/book/ope … h-qemu-kvm
any help please?
Sorry if I am late to the party... but here's how I do this with bridged networking.
Let's assume that I have 2 guests, an ArchLinux and Window 7. These are the start scripts:
: cat start-arch.sh
#!/bin/bash
vm_dir="/export/scratch/VMs"
scripts_dir="${vm_dir}/scripts"
. ${scripts_dir}/macaddr-gen.sh
# Generate a random MAC address
gen_macaddr mac
# Start the emulator
qemu-system-x86_64 -enable-kvm -smp 2 \
-net bridge,br=br0 -net nic,macaddr=${mac},model=virtio \
-drive file="${vm_dir}/arch-x86_64-1",if=virtio -nographic
: cat start-win7.sh
#!/bin/bash
vm_dir="/export/scratch/VMs"
scripts_dir="${vm_dir}/scripts"
. ${scripts_dir}/macaddr-gen.sh
# Generate a random MAC address
gen_macaddr mac
# Start the emulator
qemu-system-x86_64 -enable-kvm -m 3G -smp 2 \
-net bridge,br=br0 -net nic,macaddr=${mac},model=virtio \
-drive file="${vm_dir}/win7-x86_64-1",if=virtio \
-usbdevice tablet -vga qxl -spice port=5930,disable-ticketing
: cat macaddr-gen.sh
#!/bin/bash
# Generate a random MAC address
gen_macaddr() {
local str i macaddr _mac=$1
str=$(cat /dev/random | tr -cd '[:xdigit:]' | head -c 12 | \
tr '[:upper:]' '[:lower:]')
i=0
macaddr=""
while [ $i -lt 6 ]; do
macaddr=${macaddr}${str:0:2}":"
str=${str:2}
let i=i+1
done
eval $_mac=\${macaddr%:}
: cat /etc/qemu/bridge.conf
allow br0
Note, that the MAC addresses of virtualized NICs in the VMs must be different. If you now do
: ./start-arch.sh &
: ./start-win7.sh
Assuming that you have already set up a bridge br0, qemu will create several tap? interfaces and insert them into that bridge (using the qemu-bridge-helper suid binary), and you'll have a virtual LAN rooted at br0.
EDIT: Added a slightly faster random MAC generator and comments.
Last edited by Leonid.I (2015-02-09 20:13:50) -
SOLVED: W510 Wired Network Stops working
I had a problem with a W510 I ordered with Windows 7 32 bit. At random times, the exclamation point icon would appear over the network icon in the system tray, and the network adapter would no longer be recognized. I could use the built in Windows facilities to reset the adapter, but it would quickly fail again. The only cure was to restart the machine, which was annoying. Wireless networking was not affected - just the wired Ethernet connection.
I downloaded the latest drivers from the Lenovo site and that did not fix it. I have had numerous Thinkpads over the past 12 years and have NEVER had any sort of hardware fault before, so I doubted that it was a hardware fault. Therefore I wiped the machine clean and installed 64 Bit Windows 7 instead.
The first problem I had after installing Win7 x64 was that the internal USB controller was not recognized by Windows. Therefore, USB devices (i.e. my thumb drive with all the x64 Lenovo drivers on) were no longer recognized. Therefore, I burned the x64 drivers to a CD and used that instead.
All the devices including the USB controller then came to life, and it looks like the problem has been completely solved.
I post this, in case anybody else has such a problem.I just started seeing this issue with my pen silo. The Wacom tablet component has completely stopped working, and I'm seeing "USB device not recognized" every time I insert and draw out the pen. My guess is that all the peripheral components in the tablet are connected to the motherboard via crappy silver trace ribbon cables, and they're susceptible to the tiniest amount of flex, heat, and disruption.
Since the USB device is, at least in my case, still operating well enough to report that it is having trouble, I'm guessing that the issue is transient, but that doesn't fix my problem - and probably won't fix yours. I'd recommend getting a refund.
Here's how to see if the device is reporting a problem:
1) Wait until you see the "USB device not recognized" message again.
2) CTRL+X -> Device Manager
3) Other Devices -> double-click "Unknown device"
4) Go to "Details" tab
5) Select "DevNode status" from the drop-down; the Value pane will have DN_HAS_PROBLEM on one of the lines.
6) Select "Problem code" from the drop-down; the Value pane will likely show "0000002B", or Microsoft USB problem code 43 in decimal. -
Qemu - Bridged networking with wireless adapter
How can I use bridged networking with wireless on Qemu virtual machine? With virtualbox it can be easily done. I don't why in Qemu it is so complicated, maybe virtualbox have completely difference mechacnism on this. I've read the wiki, it looks like impossible to use wireless for bridged networking. If it is really impossible, why virtualbox can do it?
And, in arch wiki's qemu manual, i didn't see how to use NetworkManager there to do bridged networking. Since, I use NetworkManager and disable the others (like netct and dhcpcd), it make it even more complicated. But, maybe it's because me that don't understand. Maybe someone experienced here can give me a way around this?bagol wrote:How can I use bridged networking
It's up to you to set up the bridged network - or use TAP, e.g.:
ip tuntap add dev <devname> mode tap user <youruser>
ip lin set <devname> up
ip route ...
... and proxy_arp
... and iptables forwarding & masquerade
It's a good learning experience, to set up the network yourself, rather than have VirtualBox do similar things by *magic* -
[Solved]All wireless networks have stopped working
Connecting to wireless networks that i have previously connected to times out, both with network manager, and iwconfig.
I have tried on two networks i have previously connected to and both time out.
What is interesting is that i am able to connect if i set a static ip, but i cannot reach any addresses, not even 192.168.1.1
SOLVED:
Issue was determined to be the ath9k module, fixed it by running:
modprobe ath9k nohwcrypt=1
Last edited by seniorsassycat (2012-01-28 23:14:25)Some news:
Networks without security works, right now i am using my tethering features for my Android phone.
I am already checking for last packages, un til now: uninstall usb_modeswitch no offers a solution (was one of the last packages with network relation), looking for more
ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 1c:75:08:21:dd:4d brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 1c:65:9d:69:fa:c1 brd ff:ff:ff:ff:ff:ff
inet 192.168.43.218/24 brd 192.168.43.255 scope global wlan0
inet6 fe80::1e65:9dff:fe69:fac1/64 scope link
valid_lft forever preferred_lft forever
iwconfig
lo no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"AndroidAP"
Mode:Managed Frequency:2.412 GHz Access Point: E0:2A:82:E6:29:06
Bit Rate=54 Mb/s Tx-Power=13 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=62/70 Signal level=-48 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:27 Invalid misc:325 Missed beacon:0
eth0 no wireless extensions.
iwlist scan
lo Interface doesn't support scanning.
wlan0 Scan completed :
Cell 01 - Address: 00:25:86:C5:15:B
Channel:6
Frequency:2.437 GHz (Chan
Quality=50/70 Signal lev
Encryption key:on
ESSID:"4714046"
Bit Rates:1 Mb/s; 2 Mb/s;
12 Mb/s; 24 Mb/
Bit Rates:9 Mb/s; 18 Mb/s
Mode:Master
Extra:tsf=00000000ae9f498
Extra: Last beacon: 400ms
IE: Unknown: 000734373134
IE: Unknown: 010882848B96
IE: Unknown: 030106
IE: Unknown: 2A0104
IE: Unknown: 32041224606C
Cell 02 - Address: 00:25:12:F5:64:F
Channel:6
Frequency:2.437 GHz (Chan
Quality=51/70 Signal lev
Encryption key:on
ESSID:"4714046"
Bit Rates:1 Mb/s; 2 Mb/s;
9 Mb/s; 12 Mb/s
Bit Rates:24 Mb/s; 36 Mb/
Mode:Master
Extra:tsf=00000037ef592b7
Extra: Last beacon: 1036m
IE: Unknown: 000734373134
IE: Unknown: 010882848B96
IE: Unknown: 030106
IE: Unknown: 2A0100
IE: Unknown: 32043048606C
IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
IE: Unknown: DD950050F204104A0001101044000102103B0001031047001063041253101920061228002512F564FD1021001B5265616C74656B2053656D69636F6E647563746F7220436F72702E1023000752544C383637311024000D45562D323030362D30372D32371042000F3132333435363738393031323334371054000800060050F20400011011000A5A585631302057333030100800020086
Cell 03 - Address: E0:2A:82:E6:29:06
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=63/70 Signal level=-47 dBm
Encryption key:off
ESSID:"AndroidAP"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=0000000035539181
Extra: Last beacon: 1673ms ago
IE: Unknown: 0009416E64726F69644150
IE: Unknown: 010882848B0C12961824
IE: Unknown: 030101
IE: Unknown: 0706555320010B1B
IE: Unknown: 2A0100
IE: Unknown: 32043048606C
eth0 Interface doesn't support scanning. -
[Solved] Ping local network timeout 2 times every 20 reply
I just install Windows 8.1 Pro and my internet very slow then I try ping my router and get this result:
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time=1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Request timed out.
Request timed out.
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time=28ms TTL=128
Reply from 192.168.1.1: bytes=32 time=335ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Request timed out.
Request timed out.
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
Reply from 192.168.1.1: bytes=32 time<1ms TTL=128
I've tried:
1) boot into Linux and ping router - 0% loss
2) plug Wireless USB into computer, disable wired network then ping router - 0% loss
3) ping router via wired network by other Windows 8.1 laptop - same problem
4) flash dns and reset winsock not work
Thank you
Solved by change MTU
netsh interface ipv4 set subinterface "Ethernet" mtu=1492 store=persistentHi,
Glad to see your problem resolved, Hope your experience was helpful with others.
Roger Lu
TechNet Community Support -
[SOLVED] Problems restoring network on wake from sleep - Zbox AD04
I have some issues with restoring the wired ethernet connection when waking from sleep. Sometimes it takes 1 or 2 minutes before it comes back up and sometimes it won't work at all unless I restart (usually when it has been in sleep for hours).
The network is configured to a static IP address in rc.conf. Hardware is a Zotac Zbox AD04 (AMD Fusion E450 system) using the r8169 driver. I guess this is probably a driver issue, but I wondered if there's anything else which I could do to solve the issue. I've tried adding r8169 to SUSPEND_MODULES, but that seems to make no difference.
Another issue is that the network is "unreachable" for about 30s to a minute after booting.
Could it be a problem with my router?
Last edited by shaurz (2012-04-13 01:03:13)I haven't really found anything much in my logs. From the kernel message log:
[ 3.457080] r8169 0000:02:00.0: eth0: link down
[ 3.457146] r8169 0000:02:00.0: eth0: link down
[ 3.458714] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 7.573639] EXT4-fs (sda3): re-mounted. Opts: discard,commit=0
[ 88.121693] r8169 0000:02:00.0: eth0: link up
[ 88.123403] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 98.483350] eth0: no IPv6 routers present
It seems it took 84 seconds after initial setup for the network to come up...
Something a bit odd in errors.log:
Apr 12 20:20:07 zedbox kernel: [ 2.030578] SP5100 TCO timer: mmio address 0xbafe00 already in use
Last edited by shaurz (2012-04-12 21:51:05) -
Qemu tap networking method from wiki
The method described in the wiki for tap networking wouldn't work for me unless I ran run-qemu with sudo. I found another method using -net bridge rather than -net tap which seems simpler and more powerful and does not require root. I put an entry in the wiki describing how I did it.
I'm kind of suspicious since it seems to be superior to the other method, which seems to be prevalent all over the web. I'm hoping a few people would be willing to give it a test. It's also my first substantial wiki edit, so advice/criticism in that regard would be welcomed.Maybe I didn't explain myself clearly, what I meant is that the setup of the bridges or the vde switch requires root, but using them can be done as a normal user, so in that regard they are similar.
On another note I was curious about performance, and as I suspected, using a bridge is faster. I did a few tests with iperf and I got something like this:
Using vde2 (-net nic,model=virtio -net vde):
- iperf running as server on the guest
-- unidirectional test: 301Mbit/s
-- bidirectional test : 136Mbit/s + 239MBit/s
- iperf running as server on the host
-- unidirectional test: 338Mbit/s
-- bidirectional test : 237Mbit/s + 135MBit/s
Using the bridge (-net nic,model=virtio -net bridge,br=virbr):
- iperf running as server on the guest
-- unidirectional test: 500Mbit/s
-- bidirectional test : 250Mbit/s + 248MBit/s
- iperf running as server on the host
-- unidirectional test: 544Mbit/s
-- bidirectional test : 251Mbit/s + 266MBit/s
Edit:
I'm now a happy user of the method you suggested
Last edited by R00KIE (2013-03-22 22:29:04) -
Qemu-kvm: network access from host to guest
I need ssh and http access from my host (Arch) to the guest (other Linux). I've failed at setting up Tap networking as described in the wiki. I don't need to have the whole LAN access the guest, so is there another way the host can access the guest? Using the guest's IP of 10.0.2.15 doesn't work, but I'm hoping there is a way to do it.
Thanks.Mr.Elendig wrote:Bridging is the best way todo it, so you should give us some more info on your atempt at it, so that we can help you fix it.
Ok, I've followed the instructions from the wiki.
One problem is that I'm on a laptop. eth0 is wireless and eth1 is wired. I chose to use eth1 since I thought it'd be easier to get working on one device before trying to make it work on both.
1. bridge and tun modules are loaded from rc.conf
2. In /etc/conf.d/bridges I have this:
bridge_br0="eth1"
BRIDGE_INTERFACES=(br0)
3. In /etc/rc.conf I changed my networking portion to this:
eth1="eth1 up"
br0="dhcp"
INTERFACES=(eth1 br0)
4. In /etc/udev/rules.d/65-kvm.rules I have this:
KERNEL=="tun", NAME="net/%k", GROUP="kvm", MODE="0660"
5. My user is part of the kvm group, although I have also tried running qemu-kvm as root.
6. In /etc/qemu-ifup I put:
#!/bin/sh
echo "Executing /etc/qemu-ifup"
echo "Bringing up $1 for bridged mode..."
sudo /sbin/ifconfig $1 0.0.0.0 promisc up
echo "Adding $1 to br0..."
sudo /usr/sbin/brctl addif br0 $1
sleep 2
7. Using visudo I added this to the bottom:
Cmnd_Alias QEMU=/sbin/ifconfig,/sbin/modprobe,/usr/sbin/brctl,/usr/bin/tunctl
%kvm ALL=NOPASSWD: QEMU
8. I launch qemu-kvm with the following script:
USERID=`whoami`
IFACE=`sudo tunctl -b -u $USERID`
qemu-kvm -net nic -net tap,ifname="$IFACE" -vga std -m 1024 -k en-us -usbdevice tablet -localtime /dev/sda
sudo tunctl -d $IFACE &> /dev/null
My system starts with br0 getting the dhcp IP on boot, so that part is working.
When I run the qemu-kvm start script I get this error (running as user or root):
/etc/qemu-ifup: could not launch network script
Could not initialize device 'tap'
/etc/qemu-ifup is executable
Last edited by shakin (2009-06-05 19:13:14) -
Qemu bridged networking -- What is the id parameter?
dear arch experts---I am trying to run arch as a guest, that then serves a website to the internet. I think I got pretty far. I am following https://wiki.archlinux.org/index.php/QE … dge-helper .
on the host:
cat > /etc/qemu/bridge.conf
allow br0
allow bridge0
EOF
chmod u+s /usr/lib/qemu/qemu-bridge-helper
I add the bridge
brctl addbr bridge0 eth0
and bring up the link
ip link set up dev bridge 0
now I need to start up.
qemu-system-x86_64 -enable-kvm -m 2048 $* -hda arch.vmdk -netdev bridge,br=bridge0
almost.
>> qemu-system-x86_64: -netdev bridge,br=bridge0: Parameter 'id' is missing
I tried to add id=eth0, but this only gives me a warning that "netdev eth0 has no peer". it starts up, but then I have no networking in the guest.
for a networking qemu guru, this is probably a 10 second question, but I am stumped. help appreciated.
/iawhmmm...on a ubuntu host, something like
-net nic,model=virtio,netdev=hn0 -netdev bridge,br=bridge0,id=hn0
seems to work. not sure why, but it does ;-). -
[solved] [Qemu+libvirt] Can't emulate e1000 NIC cards
Hi,
I want to emulate 2 e1000 NIC cards. I'm using a virsh template file. I've tried several variantes of the following :
<interface type='bridge'>
<source bridge='br0'/>
<target dev='veth0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<interface type='bridge'>
<source bridge='br1'/>
<target dev='veth1'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
I created myself veth0 and veth1 with :
# ip link add type veth (this create veth0 and veth1 in one cmd, kind of weird)
# ip link set veth0 up
# ip link set veth1 up
I also edited /etc/qemu/bridge.conf :
allow br0
allow br1
But then :
$ virsh define vm.xml
$ virsh start myvm
error: Failed to start domain myvm
error: failed to retrieve file descriptor for interface: Transport endpoint is not connected
I also tried to create myseld br0 and br1, and then attach veth0 to br0 and veth1 to br1. Same results. What's wrong in my conf ?
EDIT : changed title according to WonderWoofy suggestion.
Last edited by emasculateur (2014-05-25 20:44:24)So I finally solved it really easily.
Instead of :
$ virsh connect qemu://system
$ virsh start myvm
I actually did :
$ virsh -c qemu:///system
This gives you a virsh CLI from which I was able to start my VM :
virsh # start myvm
I just wonder why virsh -c <domain> and virsh connect <domain> are doing two different things. -
[solved]qemu-kvm, cant start all guests with latest qemu-kvm
Hi there!
I have a problem when I updated qemu-kvm package from 1.0.1-3 to 1.1.0-1
Some Linux guests can get started without problems but other will die after grub tries to load the kernel.
In my messages log i can find the following error when starting a affected guets:
qemu-kvm[2026]: segfault at 10 ip 00007f2845549d0e sp 00007f283d024c00 error 4 in qemu-system-x86_64[7f2845419000+308000]
After downgrading to the previous version i could start the guests again.
Did anyone had similar problems with the current qemu?
Kind regards
Edit: Upgrade to 1.1.1.1 solves the issue
Last edited by nonsens (2012-07-20 08:17:31)After some reading I found a workaround:
Edit the VM configuration with
#virsh edit <VM NAME>
and replace 'pc-0.15' with "pc-1.1'
<os>
<type arch='x86_64' machine='pc-1.1'>hvm</type>
<boot dev='hd'/>
</os>
The diff output of the changed /etc/libvirt/qemu/<VM_Name>.xml file with the saved one should look like:
#diff test.xml test.xml.sav
15c15
< <type arch='x86_64' machine='pc-1.1'>hvm</type>
> <type arch='x86_64' machine='pc-0.15'>hvm</type>
Now the changed VM start successful -
Clusters problem solved - turned off networking...
Howdy...
For several months my single MacPro (8 core) had no issues running a quick cluster with 4 instances. Then, for some reason, it the cluster would not show up in compressor. Sometimes it would show up after a reboot, or after waiting for a time, and then go away again when I submitted a 2nd job. The instability has become very unnerving...
Then, after reading many posts, I tried making my Ethernet connection inactive.
Oddly enough, this seems to have completely solved my problem. If I turn off my network connection, the cluster shows up immediately and I can submit my jobs with glee. If I reactivate my network connection, the cluster disappears from Compressor and Batch Monitor once again...
I've tried reinstalling FCS2 with no luck, but this is a good temporary work around...
Anyone have any idea why this is happening, or if there is a better fix?
Thanks!
-Ben Freedmananyone ever figure out why this works or what to do to fix the problem?
Maybe you are looking for
-
Payment Program Creation Date and User (is this in any table in SAP R/3)?
Dear Experts! The treasury guy asked me whether there would be a way to recover the "Payment Program" Creation Date and Created by (User) from Payment Program Executions (F110 transaction). I searched on the REGU* tables and I didn't find out this in
-
Hi. I need to purchase InDesign CS6 license. do you where can I buy it?
I need to buy InDesing CS6 license. do you where can I buy it? thanks
-
Invoice Type not being Updated while Posting INVOIC01 - Incoming Invoice
Hello, I am trying to Post Incoming Vendor Invoice in to SAP using INVOIC01 and IDOC_INPUT_INVOIC_MRM Function Module. I am adding values INVO for Invoice, CRMO for Credit Memo in the Field E1EDK01-BSART to Post the Invoice with diffe
-
Virise scan is picking up a virses from you .can't uninstal and re install program
use to be able to get into fire fox but now can't . when i did get in could not log out of anything . now i'm getting a notice from my surecerity that you have sent me a virise
-
Problems uninstalling iTunes data on Windows 7
Hello, Can someone please help me out. I recently had problems with the backup data on my iPhone 5S. Whenever I would try and sync my phone with iTunes on Windows 7 the backup would get stuck. I read on one of the threads that previous backup data ca