ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] как поднять сеть в qemu
@ 2008-05-08 14:13 Mikhail Kuligin
  2008-05-08 15:29 ` Хихин Руслан
  0 siblings, 1 reply; 7+ messages in thread
From: Mikhail Kuligin @ 2008-05-08 14:13 UTC (permalink / raw)
  To: ALT Linux Community general discussions

Доброго времени суток
пытаюсь поднять сеть для qemu
система - текущий бранч с ядром
Linux home.desktop 2.6.24-std-def-alt8 #1 SMP Mon Apr 28 15:47:17 MSD
2008 i686 GNU/Linux

в гостевой системе сетевой интерфейс поднял 172.16.0.3  - пингуется
на хосте  172.16.0.2 - пингуется
запускаю qemu -m 256 -hda image.img -cdrom /dev/cdrom -boot c
-localtime -net nic,vlan=0 -net
tap,ifname=tap0,vlan=0,script=/etc/qemu-ifup
получаю
TUNSETIFF: Device or resource busy
гостевая не пигуется из хоста и наоборот
что еще нужно, что бы пользователь смог получить доступ к tun интерфейсу?

cat /etc/qemu-ifup
#!/bin/sh
sudo /usr/sbin/tunctl -b -u budda -t tap0
sudo /sbin/ifconfig tap0 172.16.0.2 netmask 255.255.255.0 up


ifconfig
tap0      Link encap:Ethernet  HWaddr 00:FF:15:A7:97:D3
          inet addr:172.16.0.2  Bcast:172.16.0.255  Mask:255.255.255.0

cat /etc/net/ifaces/tap0/options
TYPE=tuntap
TUNTAP_USER=budda

cat /etc/net/ifaces/tap0/ipv4route
default via 192.168.16.132

cat /etc/net/ifaces/tap0/ipv4address
172.16.0.2/24

cat /etc/group
tun:x:57:budda

cat /etc/udev/rules.d/90-tun.rules
KERNEL=="tun", GROUP="tun" MODE="0660"

tunctl -u 'budda' -t tap0
Set 'tap0' persistent and owned by uid 500

[budda@home ~]$ id
uid=500(budda) gid=500(budda)
группы=10(wheel),14(uucp),16(rpm),19(proc),22(cdrom),35(kqemu),51(ftpadmin),56(screen),57(tun),71(floppy),80(cdwriter),81(audio),83(radio),119(xgrp),422(camera),423(scanner),500(budda)

ls -l /dev/net/tun
crwxrwxrwx 1 root tun 10, 200 May  8 14:59 /dev/net/tun

rpm -qa | grep qemu
qemu-system-0.9.0.cvs20070420-alt8
qemu-user-0.9.0.cvs20070420-alt8
kernel-modules-kqemu-std-def-1.3.0-alt0.1.pre11.132632.8
kqemu-common-1.3.0-alt0.2.pre11
qemu-common-0.9.0.cvs20070420-alt8
qemu-0.9.0.cvs20070420-alt8

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-05-09  4:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-08 14:13 [Comm] как поднять сеть в qemu Mikhail Kuligin
2008-05-08 15:29 ` Хихин Руслан
2008-05-08 18:02   ` Mikhail Kuligin
2008-05-08 18:15     ` Хихин Руслан
2008-05-08 20:12       ` Mikhail Kuligin
2008-05-09  4:01         ` Хихин Руслан
2008-05-09  4:08         ` Хихин Руслан

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git