Author Topic: fedora 18 kvm-qemu i freebsd kao gost  (Read 2120 times)

z0ran

  • Full Member
  • ***
  • Posts: 150
fedora 18 kvm-qemu i freebsd kao gost
« on: March 15, 2013, 07:36:12 pm »
znaci, rec je o fedori 18, kao gosta na hostu u kvm-qemu imam freebsd, sve je u redu sto se tice instalacije, naknadno zahvaljujuci obadu sam ubacio i 'virtio drajver' i fecera samo tako, ali, sa hosta nikako ne mogu da pingujem gosta, prilikom pingovanja mi daje da je:

Code: [Select]
From 192.168.0.10 icmp_seq=1 Destination Host Unreachable
a kada pingujem sa gosta host, daje:

Code: [Select]
ping: sendto: Host is down
medjutim, sa hosta i sa gosta mogu da pingujem sve u lokalu i van lokala, kao sto mogu da pingujem i hosta i gosta iz lokala i van lokala,  oboje koriste gw sa mog rutera i raspon ip-a, selinux sam iskljucio i nikako ne mogu da vidim u cemu je problem....da li neko ima ideju o cemu se radi, i zasto su tako surovo odvojeni, tj, oni vide sve oko sebe, svi vide i hosta i gosta, jedino se ne vide medju sobom.

unapred zahvalan!
"If you aim the gun at your foot and pull the trigger, it's UNIX's job to ensure reliable delivery of the bullet to where you aimed the gun (in this case, Mr. Foot)."

uporna_neznalica

  • Sr. Member
  • ****
  • Posts: 450
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #1 on: March 15, 2013, 10:57:05 pm »
Koliko ja vidim, po default konfiguraciji nije predvidjeno da se host i guest medjusobno pinguju
http://wiki.qemu.org/Documentation/Networking

Mora neki tweak da bi se to postiglo.

Zeleni_Obad

  • Administrator
  • Hero Member
  • *****
  • Posts: 969
    • BSDSrbija
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #2 on: March 15, 2013, 11:32:20 pm »
....da li neko ima ideju o cemu se radi, i zasto su tako surovo odvojeni, tj, oni vide sve oko sebe, svi vide i hosta i gosta, jedino se ne vide medju sobom.

Pogledaj i uradi kako kaze http://www.linux-kvm.org/page/Networking sekcija "public bridge" da podesis sve tako kako zelis...

z0ran

  • Full Member
  • ***
  • Posts: 150
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #3 on: March 16, 2013, 12:20:20 am »
kad sve uradim kako upustvo za 'public bridge' kaze, izgubim ceo net, idemo redom, ka restartujem net sa

Code: [Select]
# /etc/init.d/network restart
dobijem

Code: [Select]
Job for network.service failed.  See 'systemctl status network.service' and 'journalctl -xn' .
kad proverim sa

Code: [Select]
# systemctl status network
network.service - LSB: Bring up/down networking
          Loaded: loaded (/etc/rc.d/init.d/network)
          Active: failed (Result: exit-code) since Fri 2013-03-15 23:53:46 CET; 5min ago
         Process: 10459 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Mar 15 23:53:46 localhost.localdomain network[10459]: RTNETLINK answers: File exists
Mar 15 23:53:46 localhost.localdomain network[10459]: RTNETLINK answers: File exists
Mar 15 23:53:46 localhost.localdomain network[10459]: RTNETLINK answers: File exists
Mar 15 23:53:46 localhost.localdomain network[10459]: RTNETLINK answers: File exists
Mar 15 23:53:46 localhost.localdomain network[10459]: RTNETLINK answers: File exists
Mar 15 23:53:46 localhost.localdomain network[10459]: RTNETLINK answers: File exists
Mar 15 23:53:46 localhost.localdomain systemd[1]: network.service: control process e...1
Mar 15 23:53:46 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down....
Mar 15 23:53:46 localhost.localdomain systemd[1]: Unit network.service entered faile...e
Mar 15 23:54:05 localhost.localdomain network[9750]: Bringing up interface br0:  Err....

Code: [Select]
# journalctl -xn
 Mar 15 23:54:05 localhost.localdomain network[9750]: Bringing up interface br0:  Error: Timeout 90 sec expired.
 Mar 15 23:55:06 localhost.localdomain dbus-daemon[687]: dbus[687]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper)

@uporna_neznalica hvala za link druze....nisam vise ni za neki tweak, ne bi da kopromitujem sigurnost svega nekom mojom nepaznjom.
« Last Edit: March 16, 2013, 12:23:01 am by z0ran »
"If you aim the gun at your foot and pull the trigger, it's UNIX's job to ensure reliable delivery of the bullet to where you aimed the gun (in this case, Mr. Foot)."

uporna_neznalica

  • Sr. Member
  • ****
  • Posts: 450
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #4 on: March 16, 2013, 12:36:21 am »
Sorry, upotrebio sam pogresan termin. Nije tweak, nego konfigurisanje.

Zeleni_Obad

  • Administrator
  • Hero Member
  • *****
  • Posts: 969
    • BSDSrbija
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #5 on: March 16, 2013, 12:53:47 am »
daj sadrzaje /etc/sysconfig/network-scripts/ifcfg-tvoj_uredjaj (p1p1 za Fedoru 18, ili ne?) i /etc/sysconfig/network-scripts/ifcfg-br0, stvari poput UUID i HWADDR slobodno skloni, da ne ostaju na forumu...

Zeleni_Obad

  • Administrator
  • Hero Member
  • *****
  • Posts: 969
    • BSDSrbija
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #6 on: March 16, 2013, 12:55:27 am »
RTNETLINK answers: File exist je verovatno posledica toga sto uredjajima upravlja NetworkManager, ali to cemo videti iz ifcfg datoteka

z0ran

  • Full Member
  • ***
  • Posts: 150
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #7 on: March 16, 2013, 01:18:25 am »
/etc/sysconfig/network-scripts/ifcfg-p6p1
Code: [Select]

  2 TYPE=Ethernet
  3 #BOOTPROTO=dhcp
  4 BRIDGE=br0
  5 DEFROUTE=yes
  6 PEERDNS=yes
  7 PEERROUTES=yes
  8 IPV4_FAILURE_FATAL=no
  9 IPV6INIT=yes
 10 IPV6_AUTOCONF=yes
 11 IPV6_DEFROUTE=yes
 12 IPV6_PEERDNS=yes
 13 IPV6_PEERROUTES=yes
 14 IPV6_FAILURE_FATAL=no
 15 NAME=p6p1
 17 ONBOOT=yes

 /etc/sysconfig/network-scripts/ifcfg-br0

Code: [Select]
DEVICE=br0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Bridge

ja prilikom restart izgubim ip na p6p1 i dobijem br0, ali bez ip i bez ikakvog protoka

Code: [Select]
br0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1  bytes 90 (90.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

naravno, da bi vratio net nazad posle sam obrisao ifcfg-br0 i odkomentarisoa BOOTPROTO....interesantno, da cim sam odkomentarisao BOOTPROTO,  net je dosao bez restarta ili start-a manuelno...
« Last Edit: March 16, 2013, 01:25:47 am by z0ran »
"If you aim the gun at your foot and pull the trigger, it's UNIX's job to ensure reliable delivery of the bullet to where you aimed the gun (in this case, Mr. Foot)."

Zeleni_Obad

  • Administrator
  • Hero Member
  • *****
  • Posts: 969
    • BSDSrbija
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #8 on: March 16, 2013, 02:05:41 am »
Samo da rascistim sta pokusavamo ovde: imas jednu mreznu karticu u tom racunaru, p6p1, i na njoj pokusavas da drzis "vanjsku" adresu na kojoj dobija javni IP od ISP-a preko dhcp-a, te nekako (aliasi?) na njoj drzis i adrese s LAN-a, i sad jos kombinujemo bridge na sve? :) Obraduj me, i reci da je ono "dhcp" za br0 greska... :)

z0ran

  • Full Member
  • ***
  • Posts: 150
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #9 on: March 16, 2013, 10:32:18 am »
Ovako, u p6p1 "BOOTPROTO=dhcp" je zakomentarisan, posto je dobio da bude BRIDGE=br0, br0 kao bridge je dobio da bude dhcp, znaci p6p1 ispada kao dhcp, samo je bridge....tako kaze i instrukcija na KVM strani http://www.linux-kvm.org/page/Networking....jer u tom slucaju p6p1 gubi ip, sto je i slucaj, jedino u ovom slucaju nista ne prolazi kroz br0....a trebalo bi

Code: [Select]
br0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1  bytes 90 (90.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
"If you aim the gun at your foot and pull the trigger, it's UNIX's job to ensure reliable delivery of the bullet to where you aimed the gun (in this case, Mr. Foot)."

Zeleni_Obad

  • Administrator
  • Hero Member
  • *****
  • Posts: 969
    • BSDSrbija
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #10 on: March 16, 2013, 07:04:55 pm »
preformulisacu; prvo: koliko stvarnih, realnih, fizickih mreznih kartica imas u tom racunaru? Jednu, ili vise?

z0ran

  • Full Member
  • ***
  • Posts: 150
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #11 on: March 16, 2013, 08:14:51 pm »
Imam jednu 'p6p1' i druga je integrisana koja davno ne radi...vrisnula je, a ona je 'p8p1'...evo pogledaj
Code: [Select]
# ifconfig
br0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether                                        txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1  bytes 90 (90.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 2092996  bytes 376114047 (358.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2092996  bytes 376114047 (358.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

macvtap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::5054:ff:fe27:ae8e  prefixlen 64  scopeid 0x20<link>
        ether                                           txqueuelen 500  (Ethernet)
        RX packets 35794  bytes 24191890 (23.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16044  bytes 4434727 (4.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

macvtap1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::5054:ff:feef:2813  prefixlen 64  scopeid 0x20<link>
        ether                                         txqueuelen 500  (Ethernet)
        RX packets 242  bytes 29672 (28.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 468 (468.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

p6p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.10  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::221:97ff:fe08:1422  prefixlen 64  scopeid 0x20<link>
        ether                                               txqueuelen 1000  (Ethernet)
        RX packets 3280870  bytes 3295109196 (3.0 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2820957  bytes 1428693148 (1.3 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

p8p1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether                                         txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

"If you aim the gun at your foot and pull the trigger, it's UNIX's job to ensure reliable delivery of the bullet to where you aimed the gun (in this case, Mr. Foot)."

Zeleni_Obad

  • Administrator
  • Hero Member
  • *****
  • Posts: 969
    • BSDSrbija
Re: fedora 18 kvm-qemu i freebsd kao gost
« Reply #12 on: March 16, 2013, 09:23:07 pm »
Dakle, pogodio sam kada sam se zapitao da li ti to zelis "vanjski", "unutrasnji", i "bridge" interfejs, te virtuelnu mrezu i virtuelne interfejse za KVM, sve na istom, jednom jedinom fizickom uredjaju? :)
Mislim da ce to bude malo problematicno... :) nije nemoguce, ali...