ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Mikhail Kuligin" <mail4network@gmail.com>
To: "ALT Linux Community general discussions" <community@lists.altlinux.org>
Subject: [Comm] как поднять сеть в qemu
Date: Thu, 8 May 2008 17:13:01 +0300
Message-ID: <e9913ae20805080713u814a147u83324622872b6e49@mail.gmail.com> (raw)

Доброго времени суток
пытаюсь поднять сеть для 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

             reply	other threads:[~2008-05-08 14:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 14:13 Mikhail Kuligin [this message]
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         ` Хихин Руслан

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9913ae20805080713u814a147u83324622872b6e49@mail.gmail.com \
    --to=mail4network@gmail.com \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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