Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[libvirt] Gestion du Bridge réseau avec KVM (resolu KO)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
dapsaille
Advocate
Advocate


Joined: 02 Aug 2004
Posts: 2366
Location: Paris

PostPosted: Fri Aug 24, 2012 7:43 am    Post subject: [libvirt] Gestion du Bridge réseau avec KVM (resolu KO) Reply with quote

Bonjour à tous.

Voila, j'ai refait le grand saut arrière, mon serveur est redevenu une Gentoo et Centos est passé à la trappe ..

Seulement .. je rencontre quelques difficultés avec le mode bridge sous libvirt/kvm .. en effet, si j'arrête ma VM, impossible de la redémarrer sans rebooter le serveur, redémarrer les services libvirt et/ou réseau ne change rien.

Message affiché par virt-manager si je tente de démarrer ma VM une fois qu'elle as été stoppée :

Code:

Error starting domain: Cannot set interface MAC on 'vnet0': Device or resource busy"


Fichier de conf pour la VM

Code:

localhost ~ # cat /etc/libvirt/qemu/IPBX.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit IPBX
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>IPBX</name>
  <uuid>bcb1b4e3-6efc-1bd7-f4e6-169d3afca91b</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-1.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/datas/VM/IPBX.img'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='00:00:18:5e:0d:fd'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <video>
      <model type='vga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
</domain>
localhost ~ #


Les USE utilisés pour la suite KVM/libvirt

Code:

localhost ~ # emerge app-emulation/libvirt qemu-kvm virt-manager -av

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-emulation/qemu-kvm-1.1.1-r3  USE="aio alsa caps curl ncurses sdl spice usbredir vde vhost-net -bluetooth -brltty -debug -doc -fdt -mixemu -opengl -pulseaudio -python (-rbd) -sasl -smartcard -static -systemtap -tci -tls -virtfs -xattr -xen -xfs" QEMU_SOFTMMU_TARGETS="arm i386 x86_64 -alpha -cris -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -ppc -ppc64 -ppcemb -s390x -sh4 -sh4eb -sparc -sparc64 -xtensa -xtensaeb" QEMU_USER_TARGETS="arm i386 x86_64 -alpha -armeb -cris -m68k -microblaze -microblazeel -mips -mipsel -ppc -ppc64 -ppc64abi32 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -unicore32" 0 kB
[ebuild   R    ] app-emulation/libvirt-0.9.13-r1  USE="caps libvirtd lxc macvtap nls pcap phyp python qemu udev vepa virt-network -audit -avahi -debug -iscsi -lvm -nfs -numa -openvz -parted -policykit -rbd -sasl (-selinux) -uml -virtualbox -xen" 0 kB
[ebuild   R    ] app-emulation/virt-manager-0.9.4  USE="spice -gnome-keyring -policykit -sasl" 0 kB



La conf réseau de la machine

Code:

localhost ~ # cat /etc/conf.d/net
config_eth0=("null")
bridge_br0="eth0"
config_br0=("192.168.1.254 netmask 255.255.255.0")
routes_br0=("default via 192.168.1.1")
dns_servers_br0="192.168.1.1"



Petit extrait des logs libvirtd =

Code:

localhost ~ # cat /var/log/libvirt/libvirtd.log
2012-08-24 07:40:46.568+0000: 12161: error : virConnectNumOfInterfaces:10466 : this function is not supported by the connection driver: virConnectNumOfInterfaces
2012-08-24 07:40:48.228+0000: 12157: error : virNetDevSetMAC:170 : Cannot set interface MAC on 'vnet0': Device or resource busy


... le tout marchait sans soucis sous Centos, je suis légèrement désapointé ^^ ..

Surtout que je n'utilise pas le vnet0 mais le bridge sur br0, lui même ponté sur eth0 ..

Rien dans les confs rapport à vnet0 ...

Auriez vous un début de piste ?

Merci d'avance


Last edited by dapsaille on Tue Aug 28, 2012 8:44 am; edited 1 time in total
Back to top
View user's profile Send private message
dapsaille
Advocate
Advocate


Joined: 02 Aug 2004
Posts: 2366
Location: Paris

PostPosted: Fri Aug 24, 2012 10:58 am    Post subject: Reply with quote

j'ai fait un emerge de la version git de libvirt ... même constat ...

Il semblerait que cela soit du au manque de support de netfc sous Gentoo ..
un framework de gestion réseau d'après ce que j'en ai compris ^^, qui , bizarement, est supporté sous centos ...

damned, vas falloir que je trouve une alternative à libvirt du coup .. pas gagné ..
Back to top
View user's profile Send private message
dapsaille
Advocate
Advocate


Joined: 02 Aug 2004
Posts: 2366
Location: Paris

PostPosted: Tue Aug 28, 2012 8:43 am    Post subject: Reply with quote

Bon et bien .. installation d'une Debian qui est gérée par NETCF et tout roule ...

Dommage que libvirt se base sur ce framework pour la gestion réseau .. ou bien que rien ne soit fait pour Gentoo :/
Back to top
View user's profile Send private message
El_Goretto
Moderator
Moderator


Joined: 29 May 2004
Posts: 3166
Location: Paris

PostPosted: Tue Aug 28, 2012 8:50 am    Post subject: Reply with quote

Ah, ben dans un sens, ça me rassure, parce que j'avais fait un test sur 1 WeekEnd sous gentoo il y a qq mois, j'étais arrivé à rien non plus... alors que c'était du clicka-clicka sous bubuntu... sniff.
_________________
-TrueNAS & jails: µ-serv Gen8 E3-1260L, 16Go ECC + µ-serv N40L, 10Go ECC
-Réseau: APU2C4 (OpenWRT) + GS726Tv3 + 2x GS108Tv2 + Archer C5v1 (OpenWRT)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum